mirror of
https://github.com/apache/superset.git
synced 2026-08-12 11:11:01 +00:00
feat: completely migrate from DeprecatedThemeColors to Antd semantic tokens (#34732)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
31e2143c84
commit
1f482b42eb
+1
-1
@@ -25,7 +25,7 @@ import {
|
|||||||
export interface <%= packageLabel %>StylesProps {
|
export interface <%= packageLabel %>StylesProps {
|
||||||
height: number;
|
height: number;
|
||||||
width: number;
|
width: number;
|
||||||
headerFontSize: keyof typeof supersetTheme.typography.sizes;
|
headerFontSize: 'fontSizeSM' | 'fontSize' | 'fontSizeLG' | 'fontSizeXL' | 'fontSizeHeading1' | 'fontSizeHeading2' | 'fontSizeHeading3' | 'fontSizeHeading4' | 'fontSizeHeading5';
|
||||||
boldText: boolean;
|
boldText: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import { css, styled, useTheme, t } from '@superset-ui/core';
|
|||||||
|
|
||||||
const StyledCalculatorIcon = styled(CalculatorOutlined)`
|
const StyledCalculatorIcon = styled(CalculatorOutlined)`
|
||||||
${({ theme }) => css`
|
${({ theme }) => css`
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorIcon};
|
||||||
font-size: ${theme.fontSizeSM}px;
|
font-size: ${theme.fontSizeSM}px;
|
||||||
& svg {
|
& svg {
|
||||||
margin-left: ${theme.sizeUnit}px;
|
margin-left: ${theme.sizeUnit}px;
|
||||||
|
|||||||
+2
-2
@@ -27,8 +27,8 @@ export default function FallbackComponent({ error, height, width }: Props) {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
css={(theme: SupersetTheme) => ({
|
css={(theme: SupersetTheme) => ({
|
||||||
backgroundColor: theme.colors.grayscale.dark2,
|
backgroundColor: theme.colorBgContainer,
|
||||||
color: theme.colors.grayscale.light5,
|
color: theme.colorText,
|
||||||
overflow: 'auto',
|
overflow: 'auto',
|
||||||
padding: 32,
|
padding: 32,
|
||||||
})}
|
})}
|
||||||
|
|||||||
+2
-2
@@ -52,7 +52,7 @@ export const CheckboxHalfChecked = () => {
|
|||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
d="M16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0Z"
|
d="M16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0Z"
|
||||||
fill={theme.colors.grayscale.light1}
|
fill={theme.colorFill}
|
||||||
/>
|
/>
|
||||||
<path d="M14 10H4V8H14V10Z" fill="white" />
|
<path d="M14 10H4V8H14V10Z" fill="white" />
|
||||||
</svg>
|
</svg>
|
||||||
@@ -71,7 +71,7 @@ export const CheckboxUnchecked = () => {
|
|||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
d="M16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0Z"
|
d="M16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0Z"
|
||||||
fill={theme.colors.grayscale.light2}
|
fill={theme.colorFillSecondary}
|
||||||
/>
|
/>
|
||||||
<path d="M16 2V16H2V2H16V2Z" fill="white" />
|
<path d="M16 2V16H2V2H16V2Z" fill="white" />
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const StyledDiv = styled.div`
|
|||||||
padding-top: 8px;
|
padding-top: 8px;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
label {
|
label {
|
||||||
color: ${({ theme }) => theme.colors.grayscale.base};
|
color: ${({ theme }) => theme.colorTextLabel};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ const MenuDots = styled.div`
|
|||||||
width: ${({ theme }) => theme.sizeUnit * 0.75}px;
|
width: ${({ theme }) => theme.sizeUnit * 0.75}px;
|
||||||
height: ${({ theme }) => theme.sizeUnit * 0.75}px;
|
height: ${({ theme }) => theme.sizeUnit * 0.75}px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background-color: ${({ theme }) => theme.colors.grayscale.light1};
|
background-color: ${({ theme }) => theme.colorFill};
|
||||||
|
|
||||||
font-weight: ${({ theme }) => theme.fontWeightNormal};
|
font-weight: ${({ theme }) => theme.fontWeightNormal};
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
@@ -53,7 +53,7 @@ const MenuDots = styled.div`
|
|||||||
width: ${({ theme }) => theme.sizeUnit * 0.75}px;
|
width: ${({ theme }) => theme.sizeUnit * 0.75}px;
|
||||||
height: ${({ theme }) => theme.sizeUnit * 0.75}px;
|
height: ${({ theme }) => theme.sizeUnit * 0.75}px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background-color: ${({ theme }) => theme.colors.grayscale.light1};
|
background-color: ${({ theme }) => theme.colorFill};
|
||||||
}
|
}
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
|
|||||||
+5
-5
@@ -325,13 +325,13 @@ export const DropdownContainer = forwardRef(
|
|||||||
}
|
}
|
||||||
::-webkit-scrollbar-thumb {
|
::-webkit-scrollbar-thumb {
|
||||||
border-radius: 9px;
|
border-radius: 9px;
|
||||||
background-color: ${theme.colors.grayscale.light1};
|
background-color: ${theme.colorFillSecondary};
|
||||||
border: 3px solid transparent;
|
border: 3px solid transparent;
|
||||||
background-clip: content-box;
|
background-clip: content-box;
|
||||||
}
|
}
|
||||||
::-webkit-scrollbar-track {
|
::-webkit-scrollbar-track {
|
||||||
background-color: ${theme.colors.grayscale.light4};
|
background-color: ${theme.colorFillQuaternary};
|
||||||
border-left: 1px solid ${theme.colors.grayscale.light2};
|
border-left: 1px solid ${theme.colorFillTertiary};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
@@ -368,7 +368,7 @@ export const DropdownContainer = forwardRef(
|
|||||||
color={
|
color={
|
||||||
(dropdownTriggerCount ?? overflowingCount) > 0
|
(dropdownTriggerCount ?? overflowingCount) > 0
|
||||||
? theme.colorPrimary
|
? theme.colorPrimary
|
||||||
: theme.colors.grayscale.light1
|
: theme.colorTextSecondary
|
||||||
}
|
}
|
||||||
showZero
|
showZero
|
||||||
css={css`
|
css={css`
|
||||||
@@ -377,7 +377,7 @@ export const DropdownContainer = forwardRef(
|
|||||||
/>
|
/>
|
||||||
<Icons.DownOutlined
|
<Icons.DownOutlined
|
||||||
iconSize="m"
|
iconSize="m"
|
||||||
iconColor={theme.colors.grayscale.light1}
|
iconColor={theme.colorIcon}
|
||||||
css={css`
|
css={css`
|
||||||
.anticon {
|
.anticon {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -28,14 +28,17 @@ export default {
|
|||||||
component: BaseIconComponent,
|
component: BaseIconComponent,
|
||||||
};
|
};
|
||||||
|
|
||||||
const palette: Record<string, string | null> = { Default: null };
|
const palette: Record<string, string | null> = {
|
||||||
Object.entries(supersetTheme.colors).forEach(([familyName, family]) => {
|
Default: null,
|
||||||
Object.entries(family as Record<string, string>).forEach(
|
Primary: supersetTheme.colorPrimary,
|
||||||
([colorName, colorValue]) => {
|
Success: supersetTheme.colorSuccess,
|
||||||
palette[`${familyName} / ${colorName}`] = colorValue;
|
Warning: supersetTheme.colorWarning,
|
||||||
},
|
Error: supersetTheme.colorError,
|
||||||
);
|
Info: supersetTheme.colorInfo,
|
||||||
});
|
Text: supersetTheme.colorText,
|
||||||
|
'Text Secondary': supersetTheme.colorTextSecondary,
|
||||||
|
Icon: supersetTheme.colorIcon,
|
||||||
|
};
|
||||||
|
|
||||||
const IconSet = styled.div`
|
const IconSet = styled.div`
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import type { LabelProps } from './types';
|
|||||||
|
|
||||||
export function Label(props: LabelProps) {
|
export function Label(props: LabelProps) {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { transitionTiming } = theme;
|
// Use Ant Design's motion duration instead of deprecated transitionTiming
|
||||||
const {
|
const {
|
||||||
type = 'default',
|
type = 'default',
|
||||||
monospace = false,
|
monospace = false,
|
||||||
@@ -46,7 +46,7 @@ export function Label(props: LabelProps) {
|
|||||||
const borderColorHover = onClick ? baseColor.borderHover : borderColor;
|
const borderColorHover = onClick ? baseColor.borderHover : borderColor;
|
||||||
|
|
||||||
const labelStyles = css`
|
const labelStyles = css`
|
||||||
transition: background-color ${transitionTiming}s;
|
transition: background-color ${theme.motionDurationMid};
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
cursor: ${onClick ? 'pointer' : 'default'};
|
cursor: ${onClick ? 'pointer' : 'default'};
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ const StyledCard = styled(Card)`
|
|||||||
|
|
||||||
const Cover = styled.div`
|
const Cover = styled.div`
|
||||||
height: 264px;
|
height: 264px;
|
||||||
border-bottom: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
|
border-bottom: 1px solid ${({ theme }) => theme.colorSplit};
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.cover-footer {
|
.cover-footer {
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ const StyledMenuItem = styled(AntdMenu.Item)`
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
transition: background-color ${theme.motionDurationMid}s;
|
transition: background-color ${theme.motionDurationMid};
|
||||||
&:after {
|
&:after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -63,7 +63,7 @@ const StyledMenuItem = styled(AntdMenu.Item)`
|
|||||||
height: 3px;
|
height: 3px;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
transition: translate ${theme.motionDurationMid}s;
|
transition: translate ${theme.motionDurationMid};
|
||||||
}
|
}
|
||||||
&:focus {
|
&:focus {
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
@@ -140,7 +140,7 @@ const StyledSubMenu = styled(AntdMenu.SubMenu)`
|
|||||||
height: 3px;
|
height: 3px;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
transition: all ${theme.transitionTiming}s;
|
transition: all ${theme.motionDurationMid};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ const MetadataWrapper = styled.div`
|
|||||||
|
|
||||||
const MetadataText = styled.span`
|
const MetadataText = styled.span`
|
||||||
font-size: ${({ theme }) => theme.fontSizeXS}px;
|
font-size: ${({ theme }) => theme.fontSizeXS}px;
|
||||||
color: ${({ theme }) => theme.colors.grayscale.light1};
|
color: ${({ theme }) => theme.colorTextSecondary};
|
||||||
font-weight: ${({ theme }) => theme.fontWeightStrong};
|
font-weight: ${({ theme }) => theme.fontWeightStrong};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -60,12 +60,12 @@ const menuItemStyles = (theme: any) => css`
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: ${theme.colors.grayscale.light3};
|
background: ${theme.colorFillQuaternary};
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
font-weight: ${theme.fontWeightStrong};
|
font-weight: ${theme.fontWeightStrong};
|
||||||
background: ${theme.colors.grayscale.light2};
|
background: ${theme.colorFillTertiary};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,16 +66,14 @@ export default function PopoverSection({
|
|||||||
<Icons.InfoCircleOutlined
|
<Icons.InfoCircleOutlined
|
||||||
role="img"
|
role="img"
|
||||||
iconSize="s"
|
iconSize="s"
|
||||||
iconColor={theme.colors.grayscale.light1}
|
iconColor={theme.colorIcon}
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
<Icons.CheckOutlined
|
<Icons.CheckOutlined
|
||||||
iconSize="s"
|
iconSize="s"
|
||||||
role="img"
|
role="img"
|
||||||
iconColor={
|
iconColor={isSelected ? theme.colorPrimary : theme.colorIcon}
|
||||||
isSelected ? theme.colorPrimary : theme.colors.grayscale.base
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ const RefreshLabel = ({
|
|||||||
onClick={disabled ? undefined : onClick}
|
onClick={disabled ? undefined : onClick}
|
||||||
css={(theme: SupersetTheme) => ({
|
css={(theme: SupersetTheme) => ({
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
color: theme.colors.grayscale.base,
|
color: theme.colorIcon,
|
||||||
'&:hover': { color: theme.colorPrimary },
|
'&:hover': { color: theme.colorPrimary },
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -104,17 +104,17 @@ export const StyledLoadingText = styled.div`
|
|||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
margin-left: ${theme.sizeUnit * 3}px;
|
margin-left: ${theme.sizeUnit * 3}px;
|
||||||
line-height: ${theme.sizeUnit * 8}px;
|
line-height: ${theme.sizeUnit * 8}px;
|
||||||
color: ${theme.colors.grayscale.light1};
|
color: ${theme.colorTextSecondary};
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const StyledHelperText = styled.div`
|
export const StyledHelperText = styled.div`
|
||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
padding: ${theme.sizeUnit * 2}px ${theme.sizeUnit * 3}px;
|
padding: ${theme.sizeUnit * 2}px ${theme.sizeUnit * 3}px;
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorText};
|
||||||
font-size: ${theme.fontSizeSM}px;
|
font-size: ${theme.fontSizeSM}px;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
border-bottom: 1px solid ${theme.colors.grayscale.light2};
|
border-bottom: 1px solid ${theme.colorBorderSecondary};
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -140,6 +140,6 @@ export const StyledErrorMessage = styled.div`
|
|||||||
export const StyledBulkActionsContainer = styled(Flex)`
|
export const StyledBulkActionsContainer = styled(Flex)`
|
||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
padding: ${theme.sizeUnit}px;
|
padding: ${theme.sizeUnit}px;
|
||||||
border-top: 1px solid ${theme.colors.grayscale.light3};
|
border-top: 1px solid ${theme.colorSplit};
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ import { styled } from '../../../..';
|
|||||||
import { Constants } from '../../..';
|
import { Constants } from '../../..';
|
||||||
|
|
||||||
const GrayCell = styled.span`
|
const GrayCell = styled.span`
|
||||||
color: ${({ theme }) => theme.colors.grayscale.light1};
|
color: ${({ theme }) => theme.colorTextSecondary};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
function NullCell() {
|
function NullCell() {
|
||||||
|
|||||||
+1
-1
@@ -74,7 +74,7 @@ function HeaderWithRadioGroup(props: HeaderWithRadioGroupProps) {
|
|||||||
>
|
>
|
||||||
<Icons.SettingOutlined
|
<Icons.SettingOutlined
|
||||||
iconSize="m"
|
iconSize="m"
|
||||||
iconColor={theme.colors.grayscale.light1}
|
iconColor={theme.colorIcon}
|
||||||
css={css`
|
css={css`
|
||||||
margin-top: ${theme.sizeUnit * 0.75}px;
|
margin-top: ${theme.sizeUnit * 0.75}px;
|
||||||
margin-right: ${theme.sizeUnit}px;
|
margin-right: ${theme.sizeUnit}px;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ const Tabs = Object.assign(StyledTabs, {
|
|||||||
const StyledEditableTabs = styled(StyledTabs)`
|
const StyledEditableTabs = styled(StyledTabs)`
|
||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
.ant-tabs-content-holder {
|
.ant-tabs-content-holder {
|
||||||
background: ${theme.colors.grayscale.light5};
|
background: ${theme.colorBgContainer};
|
||||||
}
|
}
|
||||||
|
|
||||||
& > .ant-tabs-nav {
|
& > .ant-tabs-nav {
|
||||||
@@ -99,7 +99,7 @@ const StyledEditableTabs = styled(StyledTabs)`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledCloseOutlined = styled(Icons.CloseOutlined)`
|
const StyledCloseOutlined = styled(Icons.CloseOutlined)`
|
||||||
color: ${({ theme }) => theme.colors.grayscale.base};
|
color: ${({ theme }) => theme.colorIcon};
|
||||||
`;
|
`;
|
||||||
export const EditableTabs = Object.assign(StyledEditableTabs, {
|
export const EditableTabs = Object.assign(StyledEditableTabs, {
|
||||||
TabPane: StyledTabPane,
|
TabPane: StyledTabPane,
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ const StyledVisibleItem = styled.span`
|
|||||||
|
|
||||||
const StyledTooltipItem = styled.div`
|
const StyledTooltipItem = styled.div`
|
||||||
.link {
|
.link {
|
||||||
color: ${({ theme }) => theme.colors.grayscale.light5};
|
color: ${({ theme }) => theme.colorTextTertiary};
|
||||||
display: block;
|
display: block;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,8 +58,9 @@ describe('Theme', () => {
|
|||||||
// Verify default font family is set
|
// Verify default font family is set
|
||||||
expect(theme.theme.fontFamily).toContain('Inter');
|
expect(theme.theme.fontFamily).toContain('Inter');
|
||||||
|
|
||||||
// Verify the theme is initialized with colors
|
// Verify the theme is initialized with semantic color tokens
|
||||||
expect(theme.theme.colors).toBeDefined();
|
expect(theme.theme.colorText).toBeDefined();
|
||||||
|
expect(theme.theme.colorBgBase).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('creates a theme with custom tokens when provided', () => {
|
it('creates a theme with custom tokens when provided', () => {
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ import {
|
|||||||
} from '@emotion/react';
|
} from '@emotion/react';
|
||||||
import createCache from '@emotion/cache';
|
import createCache from '@emotion/cache';
|
||||||
import { noop } from 'lodash';
|
import { noop } from 'lodash';
|
||||||
import { isThemeDark } from './utils/themeUtils';
|
|
||||||
import { GlobalStyles } from './GlobalStyles';
|
import { GlobalStyles } from './GlobalStyles';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -53,15 +52,9 @@ import {
|
|||||||
SupersetTheme,
|
SupersetTheme,
|
||||||
allowedAntdTokens,
|
allowedAntdTokens,
|
||||||
SharedAntdTokens,
|
SharedAntdTokens,
|
||||||
DeprecatedThemeColors,
|
|
||||||
} from './types';
|
} from './types';
|
||||||
|
|
||||||
import {
|
import { normalizeThemeConfig, serializeThemeConfig } from './utils';
|
||||||
normalizeThemeConfig,
|
|
||||||
serializeThemeConfig,
|
|
||||||
getSystemColors,
|
|
||||||
getDeprecatedColors,
|
|
||||||
} from './utils';
|
|
||||||
|
|
||||||
/* eslint-disable theme-colors/no-literal-colors */
|
/* eslint-disable theme-colors/no-literal-colors */
|
||||||
|
|
||||||
@@ -166,15 +159,8 @@ export class Theme {
|
|||||||
...Theme.defaultTokens,
|
...Theme.defaultTokens,
|
||||||
...antdConfig.token, // Passing through the extra, superset-specific tokens
|
...antdConfig.token, // Passing through the extra, superset-specific tokens
|
||||||
...tokens,
|
...tokens,
|
||||||
colors: {} as DeprecatedThemeColors, // Placeholder that will be filled in the second phase
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Second phase: Now that theme is initialized, we can determine if it's dark
|
|
||||||
// and generate the legacy colors correctly
|
|
||||||
const systemColors = getSystemColors(tokens);
|
|
||||||
const isDark = isThemeDark(this.theme); // Use utility function with theme
|
|
||||||
this.theme.colors = getDeprecatedColors(systemColors, isDark);
|
|
||||||
|
|
||||||
// Update the providers with the fully formed theme
|
// Update the providers with the fully formed theme
|
||||||
this.updateProviders(
|
this.updateProviders(
|
||||||
this.theme,
|
this.theme,
|
||||||
|
|||||||
@@ -108,36 +108,6 @@ export interface ColorVariants {
|
|||||||
textActive: string;
|
textActive: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DeprecatedColorVariations {
|
|
||||||
base: string;
|
|
||||||
light1: string;
|
|
||||||
light2: string;
|
|
||||||
light3: string;
|
|
||||||
light4: string;
|
|
||||||
light5: string;
|
|
||||||
dark1: string;
|
|
||||||
dark2: string;
|
|
||||||
dark3: string;
|
|
||||||
dark4: string;
|
|
||||||
dark5: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DeprecatedThemeColors {
|
|
||||||
primary: DeprecatedColorVariations;
|
|
||||||
error: DeprecatedColorVariations;
|
|
||||||
warning: DeprecatedColorVariations;
|
|
||||||
success: DeprecatedColorVariations;
|
|
||||||
info: DeprecatedColorVariations;
|
|
||||||
grayscale: DeprecatedColorVariations;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface LegacySupersetTheme {
|
|
||||||
// Old colors structure with light/dark semantics still heavily referenced in code base
|
|
||||||
// TODO: replace/realign with antd-type tokens
|
|
||||||
colors: DeprecatedThemeColors;
|
|
||||||
transitionTiming: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SupersetSpecificTokens {
|
export interface SupersetSpecificTokens {
|
||||||
// Font-related
|
// Font-related
|
||||||
fontSizeXS: string;
|
fontSizeXS: string;
|
||||||
@@ -391,10 +361,8 @@ export type AllowedAntdTokenKeys = Extract<
|
|||||||
|
|
||||||
export type SharedAntdTokens = Pick<AntdTokens, AllowedAntdTokenKeys>;
|
export type SharedAntdTokens = Pick<AntdTokens, AllowedAntdTokenKeys>;
|
||||||
|
|
||||||
/** The final shape for our custom theme object, combining old theme + shared antd + superset specifics. */
|
/** The final shape for our custom theme object, combining shared antd + superset specifics. */
|
||||||
export type SupersetTheme = LegacySupersetTheme &
|
export type SupersetTheme = SharedAntdTokens & SupersetSpecificTokens;
|
||||||
SharedAntdTokens &
|
|
||||||
SupersetSpecificTokens;
|
|
||||||
|
|
||||||
export interface ThemeStorage {
|
export interface ThemeStorage {
|
||||||
getItem(key: string): string | null;
|
getItem(key: string): string | null;
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ import {
|
|||||||
normalizeThemeConfig,
|
normalizeThemeConfig,
|
||||||
getAntdConfig,
|
getAntdConfig,
|
||||||
getSystemColors,
|
getSystemColors,
|
||||||
getDeprecatedColors,
|
|
||||||
genDeprecatedColorVariations,
|
|
||||||
} from './utils';
|
} from './utils';
|
||||||
import {
|
import {
|
||||||
type AnyThemeConfig,
|
type AnyThemeConfig,
|
||||||
@@ -34,17 +32,6 @@ import {
|
|||||||
ThemeAlgorithm,
|
ThemeAlgorithm,
|
||||||
} from './types';
|
} from './types';
|
||||||
|
|
||||||
// Mock tinycolor2 for consistent testing
|
|
||||||
jest.mock('tinycolor2', () => {
|
|
||||||
const mockMix = jest.fn().mockImplementation(() => ({
|
|
||||||
toHexString: jest.fn().mockReturnValue('#mixed-color'),
|
|
||||||
}));
|
|
||||||
|
|
||||||
return {
|
|
||||||
mix: mockMix,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Theme utilities', () => {
|
describe('Theme utilities', () => {
|
||||||
describe('isSerializableConfig', () => {
|
describe('isSerializableConfig', () => {
|
||||||
it('returns true when algorithm is undefined', () => {
|
it('returns true when algorithm is undefined', () => {
|
||||||
@@ -362,43 +349,4 @@ describe('Theme utilities', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('genDeprecatedColorVariations', () => {
|
|
||||||
it('generates color variations for light mode', () => {
|
|
||||||
const result = genDeprecatedColorVariations('#base-color', false);
|
|
||||||
|
|
||||||
expect(result.base).toBe('#base-color');
|
|
||||||
expect(result.light1).toBe('#mixed-color');
|
|
||||||
expect(result.dark1).toBe('#mixed-color');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('generates color variations for dark mode', () => {
|
|
||||||
const result = genDeprecatedColorVariations('#base-color', true);
|
|
||||||
|
|
||||||
expect(result.base).toBe('#base-color');
|
|
||||||
expect(result.light1).toBe('#mixed-color');
|
|
||||||
expect(result.dark1).toBe('#mixed-color');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('getDeprecatedColors', () => {
|
|
||||||
it('generates deprecated colors from system colors', () => {
|
|
||||||
const systemColors = {
|
|
||||||
colorPrimary: '#primary',
|
|
||||||
colorError: '#error',
|
|
||||||
colorWarning: '#warning',
|
|
||||||
colorSuccess: '#success',
|
|
||||||
colorInfo: '#info',
|
|
||||||
};
|
|
||||||
|
|
||||||
const result = getDeprecatedColors(systemColors, false);
|
|
||||||
|
|
||||||
expect(result.primary.base).toBe('#primary');
|
|
||||||
expect(result.error.base).toBe('#error');
|
|
||||||
expect(result.warning.base).toBe('#warning');
|
|
||||||
expect(result.success.base).toBe('#success');
|
|
||||||
expect(result.info.base).toBe('#info');
|
|
||||||
expect(result.grayscale.base).toBe('#666');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -17,13 +17,10 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { theme as antdThemeImport } from 'antd';
|
import { theme as antdThemeImport } from 'antd';
|
||||||
import tinycolor from 'tinycolor2';
|
|
||||||
import {
|
import {
|
||||||
type AntdThemeConfig,
|
type AntdThemeConfig,
|
||||||
type AnyThemeConfig,
|
type AnyThemeConfig,
|
||||||
type SerializableThemeConfig,
|
type SerializableThemeConfig,
|
||||||
type DeprecatedColorVariations,
|
|
||||||
type DeprecatedThemeColors,
|
|
||||||
type SystemColors,
|
type SystemColors,
|
||||||
type SupersetTheme,
|
type SupersetTheme,
|
||||||
ThemeAlgorithm,
|
ThemeAlgorithm,
|
||||||
@@ -144,50 +141,6 @@ export function getAntdConfig(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate deprecated color variations from a base color
|
|
||||||
*/
|
|
||||||
export function genDeprecatedColorVariations(
|
|
||||||
color: string,
|
|
||||||
isDark: boolean,
|
|
||||||
): DeprecatedColorVariations {
|
|
||||||
const bg = isDark ? '#FFF' : '#000';
|
|
||||||
const fg = isDark ? '#000' : '#FFF';
|
|
||||||
const adjustColor = (c: string, perc: number, tgt: string): string =>
|
|
||||||
tinycolor.mix(c, tgt, perc).toHexString();
|
|
||||||
return {
|
|
||||||
base: color,
|
|
||||||
light1: adjustColor(color, 20, fg),
|
|
||||||
light2: adjustColor(color, 45, fg),
|
|
||||||
light3: adjustColor(color, 70, fg),
|
|
||||||
light4: adjustColor(color, 90, fg),
|
|
||||||
light5: adjustColor(color, 95, fg),
|
|
||||||
dark1: adjustColor(color, 10, bg),
|
|
||||||
dark2: adjustColor(color, 20, bg),
|
|
||||||
dark3: adjustColor(color, 40, bg),
|
|
||||||
dark4: adjustColor(color, 60, bg),
|
|
||||||
dark5: adjustColor(color, 80, bg),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate deprecated theme colors from system colors
|
|
||||||
*/
|
|
||||||
export function getDeprecatedColors(
|
|
||||||
systemColors: SystemColors,
|
|
||||||
isDark: boolean,
|
|
||||||
): DeprecatedThemeColors {
|
|
||||||
const sc: SystemColors = systemColors;
|
|
||||||
return {
|
|
||||||
primary: genDeprecatedColorVariations(sc.colorPrimary, isDark),
|
|
||||||
error: genDeprecatedColorVariations(sc.colorError, isDark),
|
|
||||||
warning: genDeprecatedColorVariations(sc.colorWarning, isDark),
|
|
||||||
success: genDeprecatedColorVariations(sc.colorSuccess, isDark),
|
|
||||||
info: genDeprecatedColorVariations(sc.colorInfo, isDark),
|
|
||||||
grayscale: genDeprecatedColorVariations('#666', isDark),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract system colors from Ant Design tokens
|
* Extract system colors from Ant Design tokens
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ import { ResizeCallbackData } from 'react-resizable';
|
|||||||
import ResizablePanel, { Size } from './ResizablePanel';
|
import ResizablePanel, { Size } from './ResizablePanel';
|
||||||
|
|
||||||
export const SupersetBody = styled.div`
|
export const SupersetBody = styled.div`
|
||||||
background: ${({ theme }) => theme.colors.grayscale.light4};
|
background: ${({ theme }) => theme.colorBgLayout};
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -84,7 +84,7 @@ export const BasicCountryMapStory = (
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
color: theme.colors.grayscale.base,
|
color: theme.colorTextLabel,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
padding: 20,
|
padding: 20,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ function Calendar(element, props) {
|
|||||||
colorScale,
|
colorScale,
|
||||||
min: legendColors[0],
|
min: legendColors[0],
|
||||||
max: legendColors[legendColors.length - 1],
|
max: legendColors[legendColors.length - 1],
|
||||||
empty: theme.colors.grayscale.light5,
|
empty: theme.colorBgElevated,
|
||||||
},
|
},
|
||||||
displayLegend: showLegend,
|
displayLegend: showLegend,
|
||||||
itemName: '',
|
itemName: '',
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ const Calendar = ({ className, ...otherProps }) => {
|
|||||||
.d3-tip {
|
.d3-tip {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
padding: ${theme.sizeUnit * 3}px;
|
padding: ${theme.sizeUnit * 3}px;
|
||||||
background: ${theme.colors.grayscale.dark2};
|
background: ${theme.colorBgElevated};
|
||||||
color: ${theme.colors.grayscale.light5};
|
color: ${theme.colorTextLightSolid};
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
@@ -46,7 +46,7 @@ const Calendar = ({ className, ...otherProps }) => {
|
|||||||
font-size: ${theme.fontSizeXS};
|
font-size: ${theme.fontSizeXS};
|
||||||
width: 100%;
|
width: 100%;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
color: ${theme.colors.grayscale.dark2};
|
color: ${theme.colorBgElevated};
|
||||||
position: absolute;
|
position: absolute;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
@@ -112,8 +112,8 @@ export default styled(Calendar)`
|
|||||||
.superset-legacy-chart-calendar .d3-tip {
|
.superset-legacy-chart-calendar .d3-tip {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
padding: ${theme.sizeUnit * 3}px;
|
padding: ${theme.sizeUnit * 3}px;
|
||||||
background: ${theme.colors.grayscale.dark2};
|
background: ${theme.colorBgElevated};
|
||||||
color: ${theme.colors.grayscale.light5};
|
color: ${theme.colorTextLightSolid};
|
||||||
border-radius: ${theme.borderRadius}px;
|
border-radius: ${theme.borderRadius}px;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
@@ -124,7 +124,7 @@ export default styled(Calendar)`
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cal-heatmap-container .graph-label {
|
.cal-heatmap-container .graph-label {
|
||||||
fill: ${theme.colors.grayscale.base};
|
fill: ${theme.colorTextTertiary};
|
||||||
font-size: ${theme.fontSizeXS}px;
|
font-size: ${theme.fontSizeXS}px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,11 +134,11 @@ export default styled(Calendar)`
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cal-heatmap-container .graph-rect {
|
.cal-heatmap-container .graph-rect {
|
||||||
fill: ${theme.colors.grayscale.light2};
|
fill: ${theme.colorBorder};
|
||||||
}
|
}
|
||||||
|
|
||||||
.cal-heatmap-container .graph-subdomain-group rect:hover {
|
.cal-heatmap-container .graph-subdomain-group rect:hover {
|
||||||
stroke: ${theme.colors.grayscale.dark2};
|
stroke: ${theme.colorBgElevated};
|
||||||
stroke-width: 1px;
|
stroke-width: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,23 +152,23 @@ export default styled(Calendar)`
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cal-heatmap-container .qi {
|
.cal-heatmap-container .qi {
|
||||||
background-color: ${theme.colors.grayscale.base};
|
background-color: ${theme.colorTextTertiary};
|
||||||
fill: ${theme.colors.grayscale.base};
|
fill: ${theme.colorTextTertiary};
|
||||||
}
|
}
|
||||||
|
|
||||||
.cal-heatmap-container .q1 {
|
.cal-heatmap-container .q1 {
|
||||||
background-color: ${theme.colors.warning.light2};
|
background-color: ${theme.colorWarningBg};
|
||||||
fill: ${theme.colors.warning.light2};
|
fill: ${theme.colorWarningBg};
|
||||||
}
|
}
|
||||||
|
|
||||||
.cal-heatmap-container .q2 {
|
.cal-heatmap-container .q2 {
|
||||||
background-color: ${theme.colors.warning.light1};
|
background-color: ${theme.colorWarning};
|
||||||
fill: ${theme.colors.warning.light1};
|
fill: ${theme.colorWarning};
|
||||||
}
|
}
|
||||||
|
|
||||||
.cal-heatmap-container .q3 {
|
.cal-heatmap-container .q3 {
|
||||||
background-color: ${theme.colors.success.light1};
|
background-color: ${theme.colorSuccess};
|
||||||
fill: ${theme.colors.success.light1};
|
fill: ${theme.colorSuccess};
|
||||||
}
|
}
|
||||||
|
|
||||||
.cal-heatmap-container .q4 {
|
.cal-heatmap-container .q4 {
|
||||||
@@ -177,8 +177,8 @@ export default styled(Calendar)`
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cal-heatmap-container .q5 {
|
.cal-heatmap-container .q5 {
|
||||||
background-color: ${theme.colors.success.dark1};
|
background-color: ${theme.colorSuccessActive};
|
||||||
fill: ${theme.colors.success.dark1};
|
fill: ${theme.colorSuccessActive};
|
||||||
}
|
}
|
||||||
|
|
||||||
.cal-heatmap-container rect.highlight {
|
.cal-heatmap-container rect.highlight {
|
||||||
@@ -207,7 +207,7 @@ export default styled(Calendar)`
|
|||||||
.ch-tooltip {
|
.ch-tooltip {
|
||||||
padding: ${theme.sizeUnit * 2}px;
|
padding: ${theme.sizeUnit * 2}px;
|
||||||
background: ${theme.colorText};
|
background: ${theme.colorText};
|
||||||
color: ${theme.colors.grayscale.light1};
|
color: ${theme.colorTextLightSolid};
|
||||||
font-size: ${theme.fontSizeSM}px;
|
font-size: ${theme.fontSizeSM}px;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
width: 140px;
|
width: 140px;
|
||||||
@@ -215,7 +215,7 @@ export default styled(Calendar)`
|
|||||||
z-index: 99999;
|
z-index: 99999;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-radius: ${theme.borderRadius}px;
|
border-radius: ${theme.borderRadius}px;
|
||||||
box-shadow: 2px 2px 2px ${theme.colors.grayscale.dark2};
|
box-shadow: 2px 2px 2px ${theme.colorBorder};
|
||||||
display: none;
|
display: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ const CountryMap = ({ className, ...otherProps }) => (
|
|||||||
export default styled(CountryMap)`
|
export default styled(CountryMap)`
|
||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
.superset-legacy-chart-country-map svg {
|
.superset-legacy-chart-country-map svg {
|
||||||
background-color: ${theme.colors.grayscale.light5};
|
background-color: ${theme.colorBgContainer};
|
||||||
}
|
}
|
||||||
|
|
||||||
.superset-legacy-chart-country-map {
|
.superset-legacy-chart-country-map {
|
||||||
@@ -38,13 +38,13 @@ export default styled(CountryMap)`
|
|||||||
}
|
}
|
||||||
|
|
||||||
.superset-legacy-chart-country-map .background {
|
.superset-legacy-chart-country-map .background {
|
||||||
fill: ${theme.colors.grayscale.light5};
|
fill: ${theme.colorBgContainer};
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.superset-legacy-chart-country-map .map-layer {
|
.superset-legacy-chart-country-map .map-layer {
|
||||||
fill: ${theme.colors.grayscale.light5};
|
fill: ${theme.colorBgContainer};
|
||||||
stroke: ${theme.colors.grayscale.light1};
|
stroke: ${theme.colorBorderSecondary};
|
||||||
}
|
}
|
||||||
|
|
||||||
.superset-legacy-chart-country-map .effect-layer {
|
.superset-legacy-chart-country-map .effect-layer {
|
||||||
@@ -69,7 +69,7 @@ export default styled(CountryMap)`
|
|||||||
|
|
||||||
.superset-legacy-chart-country-map path.region {
|
.superset-legacy-chart-country-map path.region {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
stroke: ${theme.colors.grayscale.light2};
|
stroke: ${theme.colorSplit};
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ const StyledDiv = styled.div`
|
|||||||
}
|
}
|
||||||
|
|
||||||
.superset-legacy-chart-horizon .horizon-row {
|
.superset-legacy-chart-horizon .horizon-row {
|
||||||
border-bottom: solid 1px ${theme.colors.grayscale.light2};
|
border-bottom: solid 1px ${theme.colorBorderSecondary};
|
||||||
border-top: 0;
|
border-top: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ const StyledDiv = styled.div`
|
|||||||
}
|
}
|
||||||
|
|
||||||
.reactable-data tr:hover {
|
.reactable-data tr:hover {
|
||||||
background-color: ${theme.colors.grayscale.light3};
|
background-color: ${theme.colorFillTertiary};
|
||||||
}
|
}
|
||||||
|
|
||||||
.reactable-data tr .false {
|
.reactable-data tr .false {
|
||||||
@@ -90,14 +90,14 @@ const StyledDiv = styled.div`
|
|||||||
}
|
}
|
||||||
|
|
||||||
.reactable-data .control td {
|
.reactable-data .control td {
|
||||||
background-color: ${theme.colors.grayscale.light3};
|
background-color: ${theme.colorFillTertiary};
|
||||||
}
|
}
|
||||||
|
|
||||||
.reactable-header-sortable:hover,
|
.reactable-header-sortable:hover,
|
||||||
.reactable-header-sortable:focus,
|
.reactable-header-sortable:focus,
|
||||||
.reactable-header-sort-asc,
|
.reactable-header-sort-asc,
|
||||||
.reactable-header-sort-desc {
|
.reactable-header-sort-desc {
|
||||||
background-color: ${theme.colors.grayscale.light3};
|
background-color: ${theme.colorFillTertiary};
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -39,7 +39,7 @@ export default styled(ParallelCoordinates)`
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
div.row {
|
div.row {
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: ${theme.colors.grayscale.light2};
|
background-color: ${theme.colorBgTextHover};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -62,14 +62,14 @@ export default styled(ParallelCoordinates)`
|
|||||||
fill: transparent;
|
fill: transparent;
|
||||||
}
|
}
|
||||||
.parcoords rect.background:hover {
|
.parcoords rect.background:hover {
|
||||||
fill: ${addAlpha(theme.colors.grayscale.base, 0.2)};
|
fill: ${addAlpha(theme.colorBorder, 0.2)};
|
||||||
}
|
}
|
||||||
.parcoords .resize rect {
|
.parcoords .resize rect {
|
||||||
fill: ${addAlpha(theme.colors.grayscale.dark2, 0.1)};
|
fill: ${addAlpha(theme.colorText, 0.1)};
|
||||||
}
|
}
|
||||||
.parcoords rect.extent {
|
.parcoords rect.extent {
|
||||||
fill: ${addAlpha(theme.colors.grayscale.light5, 0.25)};
|
fill: ${addAlpha(theme.colorBgContainer, 0.25)};
|
||||||
stroke: ${addAlpha(theme.colors.grayscale.dark2, 0.6)};
|
stroke: ${addAlpha(theme.colorText, 0.6)};
|
||||||
}
|
}
|
||||||
.parcoords .axis line,
|
.parcoords .axis line,
|
||||||
.parcoords .axis path {
|
.parcoords .axis path {
|
||||||
@@ -93,7 +93,7 @@ export default styled(ParallelCoordinates)`
|
|||||||
-moz-user-select: none;
|
-moz-user-select: none;
|
||||||
-ms-user-select: none;
|
-ms-user-select: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
background-color: ${theme.colors.grayscale.light5};
|
background-color: ${theme.colorBgContainer};
|
||||||
}
|
}
|
||||||
|
|
||||||
/* data table styles */
|
/* data table styles */
|
||||||
@@ -106,7 +106,7 @@ export default styled(ParallelCoordinates)`
|
|||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
.parcoords .row:nth-of-type(odd) {
|
.parcoords .row:nth-of-type(odd) {
|
||||||
background: ${addAlpha(theme.colors.grayscale.dark2, 0.05)};
|
background: ${addAlpha(theme.colorText, 0.05)};
|
||||||
}
|
}
|
||||||
.parcoords .header {
|
.parcoords .header {
|
||||||
font-weight: ${theme.fontWeightStrong};
|
font-weight: ${theme.fontWeightStrong};
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ export default styled(Partition)`
|
|||||||
}
|
}
|
||||||
|
|
||||||
.superset-legacy-chart-partition rect {
|
.superset-legacy-chart-partition rect {
|
||||||
stroke: ${theme.colors.grayscale.light2};
|
stroke: ${theme.borderColorSecondary};
|
||||||
fill: ${theme.colors.grayscale.light1};
|
fill: ${theme.colorBgLayout};
|
||||||
fill-opacity: 80%;
|
fill-opacity: 80%;
|
||||||
transition: fill-opacity 180ms linear;
|
transition: fill-opacity 180ms linear;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -57,7 +57,7 @@ export default styled(Partition)`
|
|||||||
}
|
}
|
||||||
|
|
||||||
.superset-legacy-chart-partition g:hover text {
|
.superset-legacy-chart-partition g:hover text {
|
||||||
fill: ${theme.colors.grayscale.dark2};
|
fill: ${theme.colorTextHeading};
|
||||||
}
|
}
|
||||||
|
|
||||||
.superset-legacy-chart-partition .partition-tooltip {
|
.superset-legacy-chart-partition .partition-tooltip {
|
||||||
@@ -67,14 +67,14 @@ export default styled(Partition)`
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
padding: ${theme.sizeUnit}px;
|
padding: ${theme.sizeUnit}px;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
background-color: ${theme.colors.grayscale.dark2};
|
background-color: ${theme.colorBgElevated};
|
||||||
border-radius: ${theme.borderRadius}px;
|
border-radius: ${theme.borderRadius}px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.partition-tooltip td {
|
.partition-tooltip td {
|
||||||
padding-left: ${theme.sizeUnit}px;
|
padding-left: ${theme.sizeUnit}px;
|
||||||
font-size: ${theme.fontSizeSM}px;
|
font-size: ${theme.fontSizeSM}px;
|
||||||
color: ${theme.colors.grayscale.light5};
|
color: ${theme.colorTextSecondary};
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ const Rose = ({ className, ...otherProps }) => (
|
|||||||
.tooltip {
|
.tooltip {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
padding: ${theme.sizeUnit * 3}px;
|
padding: ${theme.sizeUnit * 3}px;
|
||||||
background: ${theme.colors.grayscale.dark2};
|
background: ${theme.colorBgElevated};
|
||||||
color: ${theme.colors.grayscale.light5};
|
color: ${theme.colorText};
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
@@ -46,7 +46,7 @@ export default styled(Rose)`
|
|||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
.superset-legacy-chart-rose path {
|
.superset-legacy-chart-rose path {
|
||||||
transition: fill-opacity 180ms linear;
|
transition: fill-opacity 180ms linear;
|
||||||
stroke: ${theme.colors.grayscale.light5};
|
stroke: ${theme.colorBorder};
|
||||||
stroke-width: 1px;
|
stroke-width: 1px;
|
||||||
stroke-opacity: 1;
|
stroke-opacity: 1;
|
||||||
fill-opacity: 0.75;
|
fill-opacity: 0.75;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export default styled(WorldMapComponent)`
|
|||||||
.superset-legacy-chart-world-map {
|
.superset-legacy-chart-world-map {
|
||||||
position: relative;
|
position: relative;
|
||||||
svg {
|
svg {
|
||||||
background-color: ${({ theme }) => theme.colors.grayscale.light5};
|
background-color: ${({ theme }) => theme.colorBgLayout};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.hoverinfo {
|
.hoverinfo {
|
||||||
|
|||||||
@@ -203,14 +203,14 @@ function WorldMap(element, props) {
|
|||||||
height,
|
height,
|
||||||
data: processedData,
|
data: processedData,
|
||||||
fills: {
|
fills: {
|
||||||
defaultFill: theme.colors.grayscale.light2,
|
defaultFill: theme.colorBorder,
|
||||||
},
|
},
|
||||||
geographyConfig: {
|
geographyConfig: {
|
||||||
popupOnHover: !inContextMenu,
|
popupOnHover: !inContextMenu,
|
||||||
highlightOnHover: !inContextMenu,
|
highlightOnHover: !inContextMenu,
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
borderColor: theme.colorSplit,
|
borderColor: theme.colorSplit,
|
||||||
highlightBorderColor: theme.colors.grayscale.light5,
|
highlightBorderColor: theme.colorIcon,
|
||||||
highlightFillColor: color,
|
highlightFillColor: color,
|
||||||
highlightBorderWidth: 1,
|
highlightBorderWidth: 1,
|
||||||
popupTemplate: (geo, d) =>
|
popupTemplate: (geo, d) =>
|
||||||
@@ -232,7 +232,7 @@ function WorldMap(element, props) {
|
|||||||
animate: true,
|
animate: true,
|
||||||
highlightOnHover: !inContextMenu,
|
highlightOnHover: !inContextMenu,
|
||||||
highlightFillColor: color,
|
highlightFillColor: color,
|
||||||
highlightBorderColor: theme.colors.grayscale.dark2,
|
highlightBorderColor: theme.colorTextSecondary,
|
||||||
highlightBorderWidth: 2,
|
highlightBorderWidth: 2,
|
||||||
highlightBorderOpacity: 1,
|
highlightBorderOpacity: 1,
|
||||||
highlightFillOpacity: 0.85,
|
highlightFillOpacity: 0.85,
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ const StyledLegend = styled.div`
|
|||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
font-size: ${theme.fontSizeSM}px;
|
font-size: ${theme.fontSizeSM}px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background: ${theme.colors.grayscale.light5};
|
background: ${theme.colorBgElevated};
|
||||||
box-shadow: 0 0 ${theme.sizeUnit}px ${theme.colors.grayscale.light2};
|
box-shadow: 0 0 ${theme.sizeUnit}px ${theme.colorBorderSecondary};
|
||||||
margin: ${theme.sizeUnit * 6}px;
|
margin: ${theme.sizeUnit * 6}px;
|
||||||
padding: ${theme.sizeUnit * 3}px ${theme.sizeUnit * 5}px;
|
padding: ${theme.sizeUnit * 3}px ${theme.sizeUnit * 5}px;
|
||||||
outline: none;
|
outline: none;
|
||||||
@@ -42,7 +42,7 @@ const StyledLegend = styled.div`
|
|||||||
|
|
||||||
& li a {
|
& li a {
|
||||||
display: flex;
|
display: flex;
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorText};
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
padding: ${theme.sizeUnit}px 0;
|
padding: ${theme.sizeUnit}px 0;
|
||||||
|
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ const StyledDiv = styled.div<{ top: number; left: number }>`
|
|||||||
left: ${left}px;
|
left: ${left}px;
|
||||||
padding: ${theme.sizeUnit * 2}px;
|
padding: ${theme.sizeUnit * 2}px;
|
||||||
margin: ${theme.sizeUnit * 2}px;
|
margin: ${theme.sizeUnit * 2}px;
|
||||||
background: ${theme.colors.grayscale.dark2};
|
background: ${theme.colorBgElevated};
|
||||||
color: ${theme.colors.grayscale.light5};
|
color: ${theme.colorText};
|
||||||
maxWidth: 300px;
|
maxWidth: 300px;
|
||||||
fontSize: ${theme.fontSizeSM}px;
|
fontSize: ${theme.fontSizeSM}px;
|
||||||
zIndex: 9;
|
zIndex: 9;
|
||||||
|
|||||||
@@ -164,15 +164,15 @@ export default styled(NVD3)`
|
|||||||
.d3-tip.nv-event-annotation-layer-NATIVE {
|
.d3-tip.nv-event-annotation-layer-NATIVE {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
background-color: ${({ theme }) => theme.colors.grayscale.base};
|
background-color: ${({ theme }) => theme.colorBgContainer};
|
||||||
fill-opacity: 0.6;
|
fill-opacity: 0.6;
|
||||||
margin: ${({ theme }) => theme.sizeUnit * 2}px;
|
margin: ${({ theme }) => theme.sizeUnit * 2}px;
|
||||||
padding: ${({ theme }) => theme.sizeUnit * 2}px;
|
padding: ${({ theme }) => theme.sizeUnit * 2}px;
|
||||||
color: ${({ theme }) => theme.colors.grayscale.light5};
|
color: ${({ theme }) => theme.colorTextLightSolid};
|
||||||
&:after {
|
&:after {
|
||||||
content: '\\25BC';
|
content: '\\25BC';
|
||||||
font-size: ${({ theme }) => theme.fontSize};
|
font-size: ${({ theme }) => theme.fontSize};
|
||||||
color: ${({ theme }) => theme.colors.grayscale.base};
|
color: ${({ theme }) => theme.colorText};
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: -14px;
|
bottom: -14px;
|
||||||
left: 94px;
|
left: 94px;
|
||||||
|
|||||||
@@ -130,13 +130,13 @@ export const MenuContainer = styled.div`
|
|||||||
gap: ${theme.sizeUnit * 2}px;
|
gap: ${theme.sizeUnit * 2}px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: ${theme.colors.primary.light4};
|
background-color: ${theme.colorPrimaryBgHover};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-divider {
|
.menu-divider {
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background-color: ${theme.colors.grayscale.light2};
|
background-color: ${theme.colorBorderSecondary};
|
||||||
margin: ${theme.sizeUnit}px 0;
|
margin: ${theme.sizeUnit}px 0;
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
@@ -165,12 +165,12 @@ export const PopoverContainer = styled.div`
|
|||||||
|
|
||||||
export const PaginationContainer = styled.div`
|
export const PaginationContainer = styled.div`
|
||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
border: 1px solid ${theme.colors.grayscale.light2};
|
border: 1px solid ${theme.colorBorderSecondary};
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
padding: ${theme.sizeUnit * 2}px ${theme.sizeUnit * 4}px;
|
padding: ${theme.sizeUnit * 2}px ${theme.sizeUnit * 4}px;
|
||||||
border-top: 1px solid ${theme.colors.grayscale.light2};
|
border-top: 1px solid ${theme.colorBorderSecondary};
|
||||||
font-size: ${theme.fontSize}px;
|
font-size: ${theme.fontSize}px;
|
||||||
color: ${theme.colorTextBase};
|
color: ${theme.colorTextBase};
|
||||||
transform: translateY(-${theme.sizeUnit}px);
|
transform: translateY(-${theme.sizeUnit}px);
|
||||||
@@ -222,7 +222,7 @@ export const PageButton = styled.div<{ disabled?: boolean }>`
|
|||||||
svg {
|
svg {
|
||||||
height: ${theme.sizeUnit * 3}px;
|
height: ${theme.sizeUnit * 3}px;
|
||||||
width: ${theme.sizeUnit * 3}px;
|
width: ${theme.sizeUnit * 3}px;
|
||||||
fill: ${disabled ? theme.colors.grayscale.light1 : theme.colors.grayscale.dark2};
|
fill: ${disabled ? theme.colorTextQuaternary : theme.colorTextSecondary};
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
@@ -239,14 +239,14 @@ export const InfoText = styled.div`
|
|||||||
max-width: 242px;
|
max-width: 242px;
|
||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
padding: 0 ${theme.sizeUnit * 2}px;
|
padding: 0 ${theme.sizeUnit * 2}px;
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorTextBase};
|
||||||
font-size: ${theme.fontSizeSM}px;
|
font-size: ${theme.fontSizeSM}px;
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const ColumnLabel = styled.span`
|
export const ColumnLabel = styled.span`
|
||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
color: ${theme.colors.grayscale.dark2};
|
color: ${theme.colorTextLabel};
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ export const StyledChartContainer = styled.div<{
|
|||||||
}
|
}
|
||||||
|
|
||||||
.dt-is-active-filter {
|
.dt-is-active-filter {
|
||||||
background: ${theme.colors.primary.light3};
|
background: ${theme.colorPrimaryBg};
|
||||||
:hover {
|
:hover {
|
||||||
background-color: ${theme.colorPrimaryBgHover};
|
background-color: ${theme.colorPrimaryBgHover};
|
||||||
}
|
}
|
||||||
@@ -386,7 +386,7 @@ export const StyledChartContainer = styled.div<{
|
|||||||
.input-wrapper svg {
|
.input-wrapper svg {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
transform: translate(${theme.sizeUnit * 7}px, ${theme.sizeUnit / 2}px);
|
transform: translate(${theme.sizeUnit * 7}px, ${theme.sizeUnit / 2}px);
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorTextBase};
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-wrapper input {
|
.input-wrapper input {
|
||||||
@@ -396,16 +396,16 @@ export const StyledChartContainer = styled.div<{
|
|||||||
${theme.sizeUnit * 1.5}px ${theme.sizeUnit * 8}px;
|
${theme.sizeUnit * 1.5}px ${theme.sizeUnit * 8}px;
|
||||||
line-height: 1.8;
|
line-height: 1.8;
|
||||||
border-radius: ${theme.borderRadius}px;
|
border-radius: ${theme.borderRadius}px;
|
||||||
border: 1px solid ${theme.colors.grayscale.light2};
|
border: 1px solid ${theme.colorBorderSecondary};
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
border-color: ${theme.colors.primary.base};
|
border-color: ${theme.colorPrimary};
|
||||||
}
|
}
|
||||||
|
|
||||||
&::placeholder {
|
&::placeholder {
|
||||||
color: ${theme.colors.grayscale.light1};
|
color: ${theme.colorTextQuaternary};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
|
|||||||
+2
-2
@@ -169,7 +169,7 @@ export default function PopKPI(props: PopKPIProps) {
|
|||||||
|
|
||||||
const getArrowIndicatorColor = () => {
|
const getArrowIndicatorColor = () => {
|
||||||
if (!comparisonColorEnabled || percentDifferenceNumber === 0) {
|
if (!comparisonColorEnabled || percentDifferenceNumber === 0) {
|
||||||
return theme.colors.grayscale.base;
|
return theme.colorTextTertiary;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (percentDifferenceNumber > 0) {
|
if (percentDifferenceNumber > 0) {
|
||||||
@@ -190,7 +190,7 @@ export default function PopKPI(props: PopKPIProps) {
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const defaultBackgroundColor = theme.colorBgContainer;
|
const defaultBackgroundColor = theme.colorBgContainer;
|
||||||
const defaultTextColor = theme.colors.grayscale.base;
|
const defaultTextColor = theme.colorTextTertiary;
|
||||||
const { backgroundColor, textColor } = useMemo(() => {
|
const { backgroundColor, textColor } = useMemo(() => {
|
||||||
let bgColor = defaultBackgroundColor;
|
let bgColor = defaultBackgroundColor;
|
||||||
let txtColor = defaultTextColor;
|
let txtColor = defaultTextColor;
|
||||||
|
|||||||
+2
-2
@@ -25,6 +25,7 @@ import {
|
|||||||
getXAxisLabel,
|
getXAxisLabel,
|
||||||
Metric,
|
Metric,
|
||||||
getValueFormatter,
|
getValueFormatter,
|
||||||
|
supersetTheme,
|
||||||
t,
|
t,
|
||||||
tooltipHtml,
|
tooltipHtml,
|
||||||
} from '@superset-ui/core';
|
} from '@superset-ui/core';
|
||||||
@@ -78,7 +79,6 @@ export default function transformProps(
|
|||||||
queriesData,
|
queriesData,
|
||||||
formData,
|
formData,
|
||||||
rawFormData,
|
rawFormData,
|
||||||
theme,
|
|
||||||
hooks,
|
hooks,
|
||||||
inContextMenu,
|
inContextMenu,
|
||||||
datasource: { currencyFormats = {}, columnFormats = {} },
|
datasource: { currencyFormats = {}, columnFormats = {} },
|
||||||
@@ -281,7 +281,7 @@ export default function transformProps(
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
offset: 1,
|
offset: 1,
|
||||||
color: theme.colors.grayscale.light5,
|
color: supersetTheme.colorBgContainer,
|
||||||
},
|
},
|
||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -176,9 +176,9 @@ export default function transformProps(
|
|||||||
},
|
},
|
||||||
emphasis: {
|
emphasis: {
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
borderColor: supersetTheme.colors.grayscale.light5,
|
borderColor: supersetTheme.colorBgContainer,
|
||||||
shadowBlur: 10,
|
shadowBlur: 10,
|
||||||
shadowColor: supersetTheme.colors.grayscale.dark2,
|
shadowColor: supersetTheme.colorTextBase,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ export function transformIntervalAnnotation(
|
|||||||
const intervalLabel: SeriesLabelOption = showLabel
|
const intervalLabel: SeriesLabelOption = showLabel
|
||||||
? {
|
? {
|
||||||
show: true,
|
show: true,
|
||||||
color: theme.colors.grayscale.dark2,
|
color: theme.colorTextLabel,
|
||||||
position: 'insideTop',
|
position: 'insideTop',
|
||||||
verticalAlign: 'top',
|
verticalAlign: 'top',
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
@@ -432,19 +432,19 @@ export function transformIntervalAnnotation(
|
|||||||
emphasis: {
|
emphasis: {
|
||||||
position: 'insideTop',
|
position: 'insideTop',
|
||||||
verticalAlign: 'top',
|
verticalAlign: 'top',
|
||||||
backgroundColor: theme.colors.grayscale.light5,
|
backgroundColor: theme.colorPrimaryBgHover,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
show: false,
|
show: false,
|
||||||
color: theme.colors.grayscale.dark2,
|
color: theme.colorTextLabel,
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
emphasis: {
|
emphasis: {
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
show: true,
|
show: true,
|
||||||
position: 'insideTop',
|
position: 'insideTop',
|
||||||
verticalAlign: 'top',
|
verticalAlign: 'top',
|
||||||
backgroundColor: theme.colors.grayscale.light5,
|
backgroundColor: theme.colorPrimaryBgHover,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
series.push({
|
series.push({
|
||||||
@@ -505,25 +505,25 @@ export function transformEventAnnotation(
|
|||||||
const eventLabel: SeriesLineLabelOption = showLabel
|
const eventLabel: SeriesLineLabelOption = showLabel
|
||||||
? {
|
? {
|
||||||
show: true,
|
show: true,
|
||||||
color: theme.colors.grayscale.dark2,
|
color: theme.colorTextLabel,
|
||||||
position: 'insideEndTop',
|
position: 'insideEndTop',
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
formatter: (params: CallbackDataParams) => params.name,
|
formatter: (params: CallbackDataParams) => params.name,
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
emphasis: {
|
emphasis: {
|
||||||
backgroundColor: theme.colors.grayscale.light5,
|
backgroundColor: theme.colorPrimaryBgHover,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
show: false,
|
show: false,
|
||||||
color: theme.colors.grayscale.dark2,
|
color: theme.colorTextLabel,
|
||||||
position: 'insideEndTop',
|
position: 'insideEndTop',
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
emphasis: {
|
emphasis: {
|
||||||
formatter: (params: CallbackDataParams) => params.name,
|
formatter: (params: CallbackDataParams) => params.name,
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
show: true,
|
show: true,
|
||||||
backgroundColor: theme.colors.grayscale.light5,
|
backgroundColor: theme.colorPrimaryBgHover,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -64,12 +64,12 @@ const METRIC_KEY = t('Metric');
|
|||||||
const vals = ['value'];
|
const vals = ['value'];
|
||||||
|
|
||||||
const StyledPlusSquareOutlined = styled(PlusSquareOutlined)`
|
const StyledPlusSquareOutlined = styled(PlusSquareOutlined)`
|
||||||
stroke: ${({ theme }) => theme.colors.grayscale.light2};
|
stroke: ${({ theme }) => theme.colorBorderSecondary};
|
||||||
stroke-width: 16px;
|
stroke-width: 16px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledMinusSquareOutlined = styled(MinusSquareOutlined)`
|
const StyledMinusSquareOutlined = styled(MinusSquareOutlined)`
|
||||||
stroke: ${({ theme }) => theme.colors.grayscale.light2};
|
stroke: ${({ theme }) => theme.colorBorderSecondary};
|
||||||
stroke-width: 16px;
|
stroke-width: 16px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -62,7 +62,7 @@ export const Styles = styled.div`
|
|||||||
table.pvtTable thead th.pvtSubtotalLabel,
|
table.pvtTable thead th.pvtSubtotalLabel,
|
||||||
table.pvtTable tbody tr:last-of-type th,
|
table.pvtTable tbody tr:last-of-type th,
|
||||||
table.pvtTable tbody tr:last-of-type td {
|
table.pvtTable tbody tr:last-of-type td {
|
||||||
border-bottom: 1px solid ${theme.colors.grayscale.light2};
|
border-bottom: 1px solid ${theme.colorSplit};
|
||||||
}
|
}
|
||||||
|
|
||||||
table.pvtTable
|
table.pvtTable
|
||||||
@@ -77,7 +77,7 @@ export const Styles = styled.div`
|
|||||||
|
|
||||||
table.pvtTable tbody tr td:last-of-type,
|
table.pvtTable tbody tr td:last-of-type,
|
||||||
table.pvtTable thead tr th:last-of-type:not(.pvtSubtotalLabel) {
|
table.pvtTable thead tr th:last-of-type:not(.pvtSubtotalLabel) {
|
||||||
border-right: 1px solid ${theme.colors.grayscale.light2};
|
border-right: 1px solid ${theme.colorSplit};
|
||||||
}
|
}
|
||||||
|
|
||||||
table.pvtTable
|
table.pvtTable
|
||||||
@@ -104,9 +104,9 @@ export const Styles = styled.div`
|
|||||||
table.pvtTable tbody tr td {
|
table.pvtTable tbody tr td {
|
||||||
color: ${theme.colorPrimaryText};
|
color: ${theme.colorPrimaryText};
|
||||||
padding: ${theme.sizeUnit}px;
|
padding: ${theme.sizeUnit}px;
|
||||||
background-color: ${theme.colors.grayscale.light5};
|
background-color: ${theme.colorBgBase};
|
||||||
border-top: 1px solid ${theme.colors.grayscale.light2};
|
border-top: 1px solid ${theme.colorSplit};
|
||||||
border-left: 1px solid ${theme.colors.grayscale.light2};
|
border-left: 1px solid ${theme.colorSplit};
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ class WordCloud extends PureComponent<FullWordCloudProps, WordCloudState> {
|
|||||||
text: 'Text',
|
text: 'Text',
|
||||||
},
|
},
|
||||||
defaultEncoding: {
|
defaultEncoding: {
|
||||||
color: { value: this.props.theme.colors.grayscale.dark2 },
|
color: { value: this.props.theme.colorTextLabel },
|
||||||
fontFamily: { value: this.props.theme.fontFamily },
|
fontFamily: { value: this.props.theme.fontFamily },
|
||||||
fontSize: { value: 20 },
|
fontSize: { value: 20 },
|
||||||
fontWeight: { value: 'bold' },
|
fontWeight: { value: 'bold' },
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export const verticalAlign = css`
|
|||||||
export const StyledTooltip = styled(IconTooltip)`
|
export const StyledTooltip = styled(IconTooltip)`
|
||||||
padding-right: ${({ theme }) => theme.sizeUnit * 2}px;
|
padding-right: ${({ theme }) => theme.sizeUnit * 2}px;
|
||||||
span {
|
span {
|
||||||
color: ${({ theme }) => theme.colors.grayscale.base};
|
color: ${({ theme }) => theme.colorIcon};
|
||||||
&: hover {
|
&: hover {
|
||||||
color: ${({ theme }) => theme.colorPrimary};
|
color: ${({ theme }) => theme.colorPrimary};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ const Styles = styled.span`
|
|||||||
span[role='img']:not([aria-label='down']) {
|
span[role='img']:not([aria-label='down']) {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: ${({ theme }) => theme.colors.grayscale.base};
|
color: ${({ theme }) => theme.colorIcon};
|
||||||
svg {
|
svg {
|
||||||
vertical-align: -${({ theme }) => theme.sizeUnit * 1.25}px;
|
vertical-align: -${({ theme }) => theme.sizeUnit * 1.25}px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ const SqlEditorTabHeader: FC<Props> = ({ queryEditor }) => {
|
|||||||
[QueryState.TimedOut]: theme.colorError,
|
[QueryState.TimedOut]: theme.colorError,
|
||||||
};
|
};
|
||||||
|
|
||||||
return statusColors[state] || theme.colors.grayscale.light2;
|
return statusColors[state] || theme.colorIcon;
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<TabTitleWrapper>
|
<TabTitleWrapper>
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ const MessageSpan = styled.span`
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
margin: ${({ theme }) => theme.sizeUnit * 4}px auto;
|
margin: ${({ theme }) => theme.sizeUnit * 4}px auto;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
color: ${({ theme }) => theme.colors.grayscale.base};
|
color: ${({ theme }) => theme.colorText};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
class Chart extends PureComponent<ChartProps, {}> {
|
class Chart extends PureComponent<ChartProps, {}> {
|
||||||
|
|||||||
@@ -286,11 +286,7 @@ const ChartContextMenu = (
|
|||||||
{t('Add cross-filter')}
|
{t('Add cross-filter')}
|
||||||
<MenuItemTooltip
|
<MenuItemTooltip
|
||||||
title={crossFilteringTooltipTitle}
|
title={crossFilteringTooltipTitle}
|
||||||
color={
|
color={!isCrossFilterDisabled ? theme.colorIcon : undefined}
|
||||||
!isCrossFilterDisabled
|
|
||||||
? theme.colors.grayscale.base
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ export default function TableControls({
|
|||||||
>
|
>
|
||||||
<RowCountLabel loading={loading && !totalCount} rowcount={totalCount} />
|
<RowCountLabel loading={loading && !totalCount} rowcount={totalCount} />
|
||||||
<Icons.ReloadOutlined
|
<Icons.ReloadOutlined
|
||||||
iconColor={theme.colors.grayscale.light1}
|
iconColor={theme.colorIcon}
|
||||||
iconSize="l"
|
iconSize="l"
|
||||||
aria-label={t('Reload')}
|
aria-label={t('Reload')}
|
||||||
role="button"
|
role="button"
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ const HeaderAction = styled.div`
|
|||||||
box-shadow: 0 0 2px var(--ag-chip-border-color);
|
box-shadow: 0 0 2px var(--ag-chip-border-color);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: 0 0 4px ${({ theme }) => theme.colors.grayscale.light1};
|
box-shadow: 0 0 4px ${({ theme }) => theme.colorBorderSecondary};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ const StyledCrossLinks = styled.div`
|
|||||||
|
|
||||||
.count {
|
.count {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorTextSecondary};
|
||||||
font-weight: ${theme.fontWeightStrong};
|
font-weight: ${theme.fontWeightStrong};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export type CrossLinksTooltipProps = {
|
|||||||
|
|
||||||
const StyledLinkedTooltip = styled.div`
|
const StyledLinkedTooltip = styled.div`
|
||||||
.link {
|
.link {
|
||||||
color: ${({ theme }) => theme.colors.grayscale.light5};
|
color: ${({ theme }) => theme.colorLink};
|
||||||
display: block;
|
display: block;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,10 +96,7 @@ function SearchFilter(
|
|||||||
onPressEnter={handleSubmit}
|
onPressEnter={handleSubmit}
|
||||||
onBlur={handleSubmit}
|
onBlur={handleSubmit}
|
||||||
prefix={
|
prefix={
|
||||||
<Icons.SearchOutlined
|
<Icons.SearchOutlined iconColor={theme.colorIcon} iconSize="l" />
|
||||||
iconColor={theme.colors.grayscale.light1}
|
|
||||||
iconSize="l"
|
|
||||||
/>
|
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</FilterContainer>
|
</FilterContainer>
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ const ListViewStyles = styled.div`
|
|||||||
|
|
||||||
.row-count-container {
|
.row-count-container {
|
||||||
margin-top: ${theme.sizeUnit * 2}px;
|
margin-top: ${theme.sizeUnit * 2}px;
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorText};
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
@@ -160,7 +160,7 @@ const ViewModeContainer = styled.div`
|
|||||||
}
|
}
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
background-color: ${theme.colors.grayscale.base};
|
background-color: ${theme.colorText};
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
color: ${theme.colorBgLayout};
|
color: ${theme.colorBgLayout};
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ const StyledToastPresenter = styled.div<VisualProps>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
.toast > button {
|
.toast > button {
|
||||||
color: ${theme.colors.grayscale.light5};
|
color: ${theme.colorTextLightSolid};
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ const TableSelectorWrapper = styled.div`
|
|||||||
}
|
}
|
||||||
|
|
||||||
.table-length {
|
.table-length {
|
||||||
color: ${theme.colors.grayscale.light1};
|
color: ${theme.colorTextSecondary};
|
||||||
}
|
}
|
||||||
|
|
||||||
.select {
|
.select {
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ const MetadataItem: FC<{
|
|||||||
<span
|
<span
|
||||||
css={(theme: Theme) => css`
|
css={(theme: Theme) => css`
|
||||||
margin-right: ${theme.sizeUnit * 4}px;
|
margin-right: ${theme.sizeUnit * 4}px;
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorText};
|
||||||
`}
|
`}
|
||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
@@ -214,7 +214,7 @@ const AddSliceCard: FC<{
|
|||||||
color: ${theme.colorText};
|
color: ${theme.colorText};
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
//background: ${theme.colors.grayscale.light4};
|
//background: ${theme.colorFillTertiary};
|
||||||
}
|
}
|
||||||
|
|
||||||
opacity: ${isSelected ? 0.4 : 'unset'};
|
opacity: ${isSelected ? 0.4 : 'unset'};
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ const BuilderComponentPane = ({ topOffset = 0 }) => (
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: ${BUILDER_PANE_WIDTH}px;
|
width: ${BUILDER_PANE_WIDTH}px;
|
||||||
box-shadow: -4px 0 4px 0 ${rgba(theme.colors.grayscale.dark2, 0.1)};
|
box-shadow: -4px 0 4px 0 ${rgba(theme.colorBorder, 0.1)};
|
||||||
background-color: ${theme.colorBgBase};
|
background-color: ${theme.colorBgBase};
|
||||||
`}
|
`}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ const DashboardContentWrapper = styled.div`
|
|||||||
/* drop shadow for top-level tabs only */
|
/* drop shadow for top-level tabs only */
|
||||||
& .dashboard-component-tabs {
|
& .dashboard-component-tabs {
|
||||||
box-shadow: 0 ${theme.sizeUnit}px ${theme.sizeUnit}px 0
|
box-shadow: 0 ${theme.sizeUnit}px ${theme.sizeUnit}px 0
|
||||||
${addAlpha(theme.colors.grayscale.dark2, 0.1)};
|
${addAlpha(theme.colorBorderSecondary, 0.1)};
|
||||||
padding-left: ${theme.sizeUnit *
|
padding-left: ${theme.sizeUnit *
|
||||||
2}px; /* note this is added to tab-level padding, to match header */
|
2}px; /* note this is added to tab-level padding, to match header */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ const StyledDiv = styled.div`
|
|||||||
}
|
}
|
||||||
& .empty-droptarget:before {
|
& .empty-droptarget:before {
|
||||||
display: block;
|
display: block;
|
||||||
border-color: ${theme.colors.primary.light1};
|
border-color: ${theme.colorPrimary};
|
||||||
background-color: ${theme.colors.primary.light3};
|
background-color: ${theme.colorPrimaryBg};
|
||||||
}
|
}
|
||||||
& .grid-row:after {
|
& .grid-row:after {
|
||||||
border-style: hidden;
|
border-style: hidden;
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ const DetailsPanelPopover = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Popover
|
<Popover
|
||||||
color={`${theme.colors.grayscale.dark2}cc`}
|
color={`${theme.colorBgElevated}cc`}
|
||||||
content={content}
|
content={content}
|
||||||
open={popoverVisible}
|
open={popoverVisible}
|
||||||
onOpenChange={handleVisibility}
|
onOpenChange={handleVisibility}
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ import { css, styled } from '@superset-ui/core';
|
|||||||
export const Pill = styled.div`
|
export const Pill = styled.div`
|
||||||
${({ theme }) => css`
|
${({ theme }) => css`
|
||||||
display: flex;
|
display: flex;
|
||||||
color: ${theme.colors.grayscale.light5};
|
color: ${theme.colorBgBase};
|
||||||
background: ${theme.colors.grayscale.base};
|
background: ${theme.colorText};
|
||||||
border-radius: 1em;
|
border-radius: 1em;
|
||||||
vertical-align: text-top;
|
vertical-align: text-top;
|
||||||
padding: ${theme.sizeUnit}px ${theme.sizeUnit * 2}px;
|
padding: ${theme.sizeUnit}px ${theme.sizeUnit * 2}px;
|
||||||
@@ -36,7 +36,7 @@ export const Pill = styled.div`
|
|||||||
|
|
||||||
svg {
|
svg {
|
||||||
position: relative;
|
position: relative;
|
||||||
color: ${theme.colors.grayscale.light5};
|
color: ${theme.colorBgBase};
|
||||||
width: 1em;
|
width: 1em;
|
||||||
height: 1em;
|
height: 1em;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -115,7 +115,7 @@ export const FiltersDetailsContainer = styled.div`
|
|||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
|
||||||
color: ${theme.colors.grayscale.light5};
|
color: ${theme.colorBgBase};
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ export const Separator = styled.div`
|
|||||||
${({ theme }) => css`
|
${({ theme }) => css`
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background-color: ${theme.colors.grayscale.light1};
|
background-color: ${theme.colorBorderSecondary};
|
||||||
margin: ${theme.sizeUnit * 4}px 0;
|
margin: ${theme.sizeUnit * 4}px 0;
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -63,14 +63,14 @@ const StyledFilterCount = styled.div`
|
|||||||
margin-right: ${theme.sizeUnit}px;
|
margin-right: ${theme.sizeUnit}px;
|
||||||
padding-left: ${theme.sizeUnit * 2}px;
|
padding-left: ${theme.sizeUnit * 2}px;
|
||||||
padding-right: ${theme.sizeUnit * 2}px;
|
padding-right: ${theme.sizeUnit * 2}px;
|
||||||
background: ${theme.colors.grayscale.light4};
|
background: ${theme.colorBgContainer};
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
.anticon {
|
.anticon {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorIcon};
|
||||||
&:hover {
|
&:hover {
|
||||||
color: ${theme.colors.grayscale.light1};
|
color: ${theme.colorIconHover};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -130,18 +130,18 @@ const StyledUndoRedoButton = styled(Button)`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const undoRedoStyle = theme => css`
|
const undoRedoStyle = theme => css`
|
||||||
color: ${theme.colors.grayscale.light1};
|
color: ${theme.colorIcon};
|
||||||
&:hover {
|
&:hover {
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorIconHover};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const undoRedoEmphasized = theme => css`
|
const undoRedoEmphasized = theme => css`
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorIcon};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const undoRedoDisabled = theme => css`
|
const undoRedoDisabled = theme => css`
|
||||||
color: ${theme.colors.grayscale.light2};
|
color: ${theme.colorTextDisabled};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const saveBtnStyle = theme => css`
|
const saveBtnStyle = theme => css`
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ const StyledDiv = styled.div`
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: ${({ theme }) => theme.colors.grayscale.base};
|
color: ${({ theme }) => theme.colorIcon};
|
||||||
&:hover {
|
&:hover {
|
||||||
color: ${({ theme }) => theme.colorPrimary};
|
color: ${({ theme }) => theme.colorPrimary};
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -58,7 +58,7 @@ const StackableHeader = styled(Button)<{ top: number }>`
|
|||||||
${({ theme, top }) => `
|
${({ theme, top }) => `
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: ${top}px;
|
top: ${top}px;
|
||||||
background-color: ${theme.colors.grayscale.light5};
|
background-color: ${theme.colorBgContainer};
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 8px 4px;
|
padding: 8px 4px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const DragHandleContainer = styled.div<{ position: 'left' | 'top' }>`
|
|||||||
transform: rotate(90deg);
|
transform: rotate(90deg);
|
||||||
`}
|
`}
|
||||||
& path {
|
& path {
|
||||||
fill: ${theme.colors.grayscale.base};
|
fill: ${theme.colorIcon};
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ function getCheckboxState(name: string): CheckboxState {
|
|||||||
const fill = svgPath.getAttribute('fill');
|
const fill = svgPath.getAttribute('fill');
|
||||||
return fill === supersetTheme.colorPrimary
|
return fill === supersetTheme.colorPrimary
|
||||||
? CHECKED
|
? CHECKED
|
||||||
: fill === supersetTheme.colors.grayscale.light1
|
: fill === supersetTheme.colorTextSecondary
|
||||||
? INDETERMINATE
|
? INDETERMINATE
|
||||||
: UNCHECKED;
|
: UNCHECKED;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ const ScopeSelector = styled.div`
|
|||||||
border-radius: ${theme.borderRadius}px;
|
border-radius: ${theme.borderRadius}px;
|
||||||
margin-top: ${theme.sizeUnit * -2}px;
|
margin-top: ${theme.sizeUnit * -2}px;
|
||||||
box-shadow: inset 0 0 0 2px ${theme.colorBorder};
|
box-shadow: inset 0 0 0 2px ${theme.colorBorder};
|
||||||
background: ${theme.colors.grayscale.light3};
|
background: ${theme.colorFill};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -309,7 +309,7 @@ const ActionsContainer = styled.div`
|
|||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
height: ${theme.sizeUnit * 16}px;
|
height: ${theme.sizeUnit * 16}px;
|
||||||
|
|
||||||
border-top: ${theme.sizeUnit / 4}px solid ${theme.colors.primary.light3};
|
border-top: ${theme.sizeUnit / 4}px solid ${theme.colorPrimaryBg};
|
||||||
padding: ${theme.sizeUnit * 6}px;
|
padding: ${theme.sizeUnit * 6}px;
|
||||||
margin: 0 0 0 ${-theme.sizeUnit * 6}px;
|
margin: 0 0 0 ${-theme.sizeUnit * 6}px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ const DividerLine = styled.div`
|
|||||||
content: '';
|
content: '';
|
||||||
height: 1px;
|
height: 1px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: ${theme.colors.grayscale.light2};
|
background-color: ${theme.colorSplit};
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,13 +78,11 @@ const defaultProps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const TabTitleContainer = styled.div`
|
const TabTitleContainer = styled.div`
|
||||||
${({ isHighlighted, theme: { sizeUnit, colors } }) => `
|
${({ isHighlighted, theme: { sizeUnit, colorPrimaryBg } }) => `
|
||||||
padding: ${sizeUnit}px ${sizeUnit * 8}px ${sizeUnit}px ${sizeUnit * 2}px;
|
padding: ${sizeUnit}px ${sizeUnit * 8}px ${sizeUnit}px ${sizeUnit * 2}px;
|
||||||
margin: ${-sizeUnit}px ${sizeUnit * -2}px;
|
margin: ${-sizeUnit}px ${sizeUnit * -2}px;
|
||||||
transition: box-shadow 0.2s ease-in-out;
|
transition: box-shadow 0.2s ease-in-out;
|
||||||
${
|
${isHighlighted && `box-shadow: 0 0 ${sizeUnit}px ${colorPrimaryBg};`}
|
||||||
isHighlighted && `box-shadow: 0 0 ${sizeUnit}px ${colors.primary.light1};`
|
|
||||||
}
|
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
+12
-31
@@ -19,7 +19,6 @@
|
|||||||
import { PureComponent } from 'react';
|
import { PureComponent } from 'react';
|
||||||
import cx from 'classnames';
|
import cx from 'classnames';
|
||||||
import { css, styled } from '@superset-ui/core';
|
import { css, styled } from '@superset-ui/core';
|
||||||
import { Icons } from '@superset-ui/core/components/Icons';
|
|
||||||
import { DragDroppable } from 'src/dashboard/components/dnd/DragDroppable';
|
import { DragDroppable } from 'src/dashboard/components/dnd/DragDroppable';
|
||||||
import { NEW_COMPONENTS_SOURCE_ID } from 'src/dashboard/util/constants';
|
import { NEW_COMPONENTS_SOURCE_ID } from 'src/dashboard/util/constants';
|
||||||
import { NEW_COMPONENT_SOURCE_TYPE } from 'src/dashboard/util/componentTypes';
|
import { NEW_COMPONENT_SOURCE_TYPE } from 'src/dashboard/util/componentTypes';
|
||||||
@@ -37,33 +36,18 @@ interface DraggableNewComponentProps {
|
|||||||
const NewComponent = styled.div`
|
const NewComponent = styled.div`
|
||||||
${({ theme }) => css`
|
${({ theme }) => css`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
padding: ${theme.sizeUnit * 4}px;
|
||||||
padding: 0 ${theme.sizeUnit}px;
|
background: ${theme.colorBgContainer};
|
||||||
margin: ${theme.sizeUnit * 2}px ${theme.sizeUnit * 4}px;
|
|
||||||
|
|
||||||
// hack to make the drag preview image corners rounded
|
|
||||||
transform: translate(0, 0);
|
|
||||||
color: ${theme.colorText};
|
|
||||||
background-color: ${theme.colorBgLayout};
|
|
||||||
border-radius: ${theme.borderRadius}px;
|
|
||||||
cursor: move;
|
cursor: move;
|
||||||
|
&:not(.static):hover {
|
||||||
&:hover {
|
background: ${theme.colorFillContentHover};
|
||||||
background-color: ${theme.colorPrimaryBgHover};
|
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const NewComponentContent = styled.div`
|
|
||||||
${({ theme }) => css`
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
min-width: 0;
|
|
||||||
margin-right: ${theme.sizeUnit * 2}px;
|
|
||||||
`}
|
|
||||||
`;
|
|
||||||
|
|
||||||
const NewComponentPlaceholder = styled.div`
|
const NewComponentPlaceholder = styled.div`
|
||||||
${({ theme }) => css`
|
${({ theme }) => css`
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -99,15 +83,12 @@ export default class DraggableNewComponent extends PureComponent<DraggableNewCom
|
|||||||
>
|
>
|
||||||
{({ dragSourceRef }) => (
|
{({ dragSourceRef }) => (
|
||||||
<NewComponent ref={dragSourceRef} data-test="new-component">
|
<NewComponent ref={dragSourceRef} data-test="new-component">
|
||||||
<NewComponentContent>
|
<NewComponentPlaceholder
|
||||||
<NewComponentPlaceholder
|
className={cx('new-component-placeholder', className)}
|
||||||
className={cx('new-component-placeholder', className)}
|
>
|
||||||
>
|
{IconComponent && <IconComponent iconSize="xl" />}
|
||||||
{IconComponent && <IconComponent iconSize="xl" />}
|
</NewComponentPlaceholder>
|
||||||
</NewComponentPlaceholder>
|
{label}
|
||||||
{label}
|
|
||||||
</NewComponentContent>
|
|
||||||
<Icons.Drag iconSize="xl" />
|
|
||||||
</NewComponent>
|
</NewComponent>
|
||||||
)}
|
)}
|
||||||
</DragDroppable>
|
</DragDroppable>
|
||||||
|
|||||||
@@ -75,8 +75,8 @@ const PopoverMenuStyles = styled.div`
|
|||||||
top: -42px;
|
top: -42px;
|
||||||
height: ${theme.sizeUnit * 10}px;
|
height: ${theme.sizeUnit * 10}px;
|
||||||
padding: 0 ${theme.sizeUnit * 4}px;
|
padding: 0 ${theme.sizeUnit * 4}px;
|
||||||
background: ${theme.colors.grayscale.light5};
|
background: ${theme.colorBgContainer};
|
||||||
box-shadow: 0 1px 2px 1px ${addAlpha(theme.colors.grayscale.dark2, 0.35)};
|
box-shadow: 0 1px 2px 1px ${addAlpha(theme.colorTextBase, 0.35)};
|
||||||
font-size: ${theme.fontSize}px;
|
font-size: ${theme.fontSize}px;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
z-index: 3000;
|
z-index: 3000;
|
||||||
@@ -93,7 +93,7 @@ const PopoverMenuStyles = styled.div`
|
|||||||
content: '';
|
content: '';
|
||||||
width: 1px;
|
width: 1px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: ${theme.colors.grayscale.light2};
|
background: ${theme.colorSplit};
|
||||||
margin: 0 ${theme.sizeUnit * 4}px;
|
margin: 0 ${theme.sizeUnit * 4}px;
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
|
|||||||
+1
-1
@@ -103,7 +103,7 @@ const CrossFilter = (props: {
|
|||||||
margin-bottom: ${theme.sizeUnit * 4}px;
|
margin-bottom: ${theme.sizeUnit * 4}px;
|
||||||
margin-top: ${theme.sizeUnit * 4}px;
|
margin-top: ${theme.sizeUnit * 4}px;
|
||||||
`}
|
`}
|
||||||
background: ${theme.colors.grayscale.light2};
|
background: ${theme.colorSplit};
|
||||||
`}
|
`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
+3
-3
@@ -33,7 +33,7 @@ const StyledCrossFilterTitle = styled.div`
|
|||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: ${theme.fontSizeSM}px;
|
font-size: ${theme.fontSizeSM}px;
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorText};
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
`}
|
`}
|
||||||
@@ -42,13 +42,13 @@ const StyledCrossFilterTitle = styled.div`
|
|||||||
const StyledIconSearch = styled(Icons.SearchOutlined)`
|
const StyledIconSearch = styled(Icons.SearchOutlined)`
|
||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
& > span.anticon.anticon-search {
|
& > span.anticon.anticon-search {
|
||||||
color: ${theme.colors.grayscale.light1};
|
color: ${theme.colorIcon};
|
||||||
margin-left: ${theme.sizeUnit}px;
|
margin-left: ${theme.sizeUnit}px;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
&:hover {
|
&:hover {
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorIconHover};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
|
|||||||
+2
-2
@@ -71,7 +71,7 @@ const ScopingTitle = ({
|
|||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
<Icons.DeleteOutlined
|
<Icons.DeleteOutlined
|
||||||
iconColor={theme.colors.grayscale.light3}
|
iconColor={theme.colorIcon}
|
||||||
iconSize="xl"
|
iconSize="xl"
|
||||||
onClick={(event: React.MouseEvent<HTMLElement>) => {
|
onClick={(event: React.MouseEvent<HTMLElement>) => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
@@ -150,7 +150,7 @@ export const ChartsScopingListPanel = ({
|
|||||||
css={css`
|
css={css`
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background-color: ${theme.colors.grayscale.light3};
|
background-color: ${theme.colorSplit};
|
||||||
margin: ${theme.sizeUnit * 3}px 0;
|
margin: ${theme.sizeUnit * 3}px 0;
|
||||||
`}
|
`}
|
||||||
/>
|
/>
|
||||||
|
|||||||
+1
-1
@@ -51,7 +51,7 @@ interface ScopingTreePanelProps {
|
|||||||
const InfoText = styled.div`
|
const InfoText = styled.div`
|
||||||
${({ theme }) => css`
|
${({ theme }) => css`
|
||||||
font-size: ${theme.fontSizeSM}px;
|
font-size: ${theme.fontSizeSM}px;
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorTextSecondary};
|
||||||
margin-bottom: ${theme.sizeUnit * 7}px;
|
margin-bottom: ${theme.sizeUnit * 7}px;
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|||||||
+1
-1
@@ -130,7 +130,7 @@ const HorizontalOverflowDivider = ({
|
|||||||
${truncationCSS};
|
${truncationCSS};
|
||||||
display: block;
|
display: block;
|
||||||
font-size: ${theme.fontSizeSM}px;
|
font-size: ${theme.fontSizeSM}px;
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorTextDescription};
|
||||||
margin: ${theme.sizeUnit}px 0 0 0;
|
margin: ${theme.sizeUnit}px 0 0 0;
|
||||||
`}
|
`}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ const HorizontalBar = styled.div`
|
|||||||
theme.sizeUnit * 3
|
theme.sizeUnit * 3
|
||||||
}px ${theme.sizeUnit * 4}px;
|
}px ${theme.sizeUnit * 4}px;
|
||||||
background: ${theme.colorBgBase};
|
background: ${theme.colorBgBase};
|
||||||
box-shadow: inset 0px -2px 2px -1px ${theme.colors.grayscale.light2};
|
box-shadow: inset 0px -2px 2px -1px ${theme.colorSplit};
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ const HorizontalBarContent = styled.div`
|
|||||||
const FilterBarEmptyStateContainer = styled.div`
|
const FilterBarEmptyStateContainer = styled.div`
|
||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
font-weight: ${theme.fontWeightStrong};
|
font-weight: ${theme.fontWeightStrong};
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorText};
|
||||||
font-size: ${theme.fontSizeSM}px;
|
font-size: ${theme.fontSizeSM}px;
|
||||||
padding-left: ${theme.sizeUnit * 2}px;
|
padding-left: ${theme.sizeUnit * 2}px;
|
||||||
`}
|
`}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ const Bar = styled.div<{ width: number }>`
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
width: ${width}px;
|
width: ${width}px;
|
||||||
background: ${theme.colors.grayscale.light5};
|
background: ${theme.colorBgContainer};
|
||||||
border-right: 1px solid ${theme.colorSplit};
|
border-right: 1px solid ${theme.colorSplit};
|
||||||
border-bottom: 1px solid ${theme.colorSplit};
|
border-bottom: 1px solid ${theme.colorSplit};
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
|
|||||||
+1
-1
@@ -101,7 +101,7 @@ export const DependenciesRow = memo(({ filter }: FilterCardRowProps) => {
|
|||||||
>
|
>
|
||||||
<Icons.InfoCircleOutlined
|
<Icons.InfoCircleOutlined
|
||||||
iconSize="m"
|
iconSize="m"
|
||||||
iconColor={theme.colors.grayscale.light1}
|
iconColor={theme.colorIcon}
|
||||||
css={css`
|
css={css`
|
||||||
margin-left: ${theme.sizeUnit}px;
|
margin-left: ${theme.sizeUnit}px;
|
||||||
`}
|
`}
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ export const NameRow = ({
|
|||||||
>
|
>
|
||||||
<Icons.EditOutlined
|
<Icons.EditOutlined
|
||||||
iconSize="l"
|
iconSize="l"
|
||||||
iconColor={theme.colors.grayscale.light1}
|
iconColor={theme.colorIcon}
|
||||||
css={() => css`
|
css={() => css`
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
`}
|
`}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export const Row = styled.div`
|
|||||||
|
|
||||||
export const RowLabel = styled.span`
|
export const RowLabel = styled.span`
|
||||||
${({ theme }) => css`
|
${({ theme }) => css`
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorText};
|
||||||
padding-right: ${theme.sizeUnit * 4}px;
|
padding-right: ${theme.sizeUnit * 4}px;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|||||||
+2
-2
@@ -57,7 +57,7 @@ const DeleteFilter = styled(Icons.DeleteOutlined)`
|
|||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-left: ${theme.sizeUnit * 2}px;
|
margin-left: ${theme.sizeUnit * 2}px;
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorIcon};
|
||||||
&:hover {
|
&:hover {
|
||||||
color: ${theme.colorText};
|
color: ${theme.colorText};
|
||||||
}
|
}
|
||||||
@@ -79,7 +79,7 @@ const RowPanel = styled.div`
|
|||||||
|
|
||||||
const Label = styled.div`
|
const Label = styled.div`
|
||||||
font-size: ${({ theme }) => theme.fontSizeSM}px;
|
font-size: ${({ theme }) => theme.fontSizeSM}px;
|
||||||
color: ${({ theme }) => theme.colors.grayscale.base};
|
color: ${({ theme }) => theme.colorText};
|
||||||
margin-bottom: ${({ theme }) => theme.sizeUnit}px;
|
margin-bottom: ${({ theme }) => theme.sizeUnit}px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -183,7 +183,7 @@ const FilterTypeInfo = styled.div<{ expanded: boolean }>`
|
|||||||
${({ theme, expanded }) => `
|
${({ theme, expanded }) => `
|
||||||
width: ${expanded ? '49%' : `${FORM_ITEM_WIDTH}px`};
|
width: ${expanded ? '49%' : `${FORM_ITEM_WIDTH}px`};
|
||||||
font-size: ${theme.fontSizeSM}px;
|
font-size: ${theme.fontSizeSM}px;
|
||||||
color: ${theme.colors.grayscale.light1};
|
color: ${theme.colorTextSecondary};
|
||||||
margin:
|
margin:
|
||||||
${theme.sizeUnit * 2}px
|
${theme.sizeUnit * 2}px
|
||||||
0px
|
0px
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ const RemovedContent = styled.div`
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: ${({ theme }) => theme.colors.grayscale.base};
|
color: ${({ theme }) => theme.colorText};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
type RemovedFilterProps = {
|
type RemovedFilterProps = {
|
||||||
|
|||||||
+1
-1
@@ -740,7 +740,7 @@ function FiltersConfigModal({
|
|||||||
<StyledExpandButtonWrapper>
|
<StyledExpandButtonWrapper>
|
||||||
<ToggleIcon
|
<ToggleIcon
|
||||||
iconSize="l"
|
iconSize="l"
|
||||||
iconColor={theme.colors.grayscale.dark2}
|
iconColor={theme.colorIcon}
|
||||||
onClick={toggleExpand}
|
onClick={toggleExpand}
|
||||||
/>
|
/>
|
||||||
</StyledExpandButtonWrapper>
|
</StyledExpandButtonWrapper>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ const useFilterFocusHighlightStyles = (chartId: number) => {
|
|||||||
|
|
||||||
const focusedChartStyles = useMemo(
|
const focusedChartStyles = useMemo(
|
||||||
() => ({
|
() => ({
|
||||||
borderColor: theme.colors.primary.light2,
|
borderColor: theme.colorPrimaryBorder,
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
boxShadow: `0px 0px ${theme.sizeUnit * 2}px ${theme.colorPrimary}`,
|
boxShadow: `0px 0px ${theme.sizeUnit * 2}px ${theme.colorPrimary}`,
|
||||||
pointerEvents: 'auto',
|
pointerEvents: 'auto',
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import { prepareCopyToClipboardTabularData } from 'src/utils/common';
|
|||||||
import { getTimeColumns, setTimeColumns } from './utils';
|
import { getTimeColumns, setTimeColumns } from './utils';
|
||||||
|
|
||||||
export const CellNull = styled('span')`
|
export const CellNull = styled('span')`
|
||||||
color: ${({ theme }) => theme.colors.grayscale.light1};
|
color: ${({ theme }) => theme.colorTextTertiary};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const CopyButton = styled(Button)`
|
export const CopyButton = styled(Button)`
|
||||||
@@ -161,7 +161,7 @@ const FormatPickerContainer = styled.div`
|
|||||||
|
|
||||||
const FormatPickerLabel = styled.span`
|
const FormatPickerLabel = styled.span`
|
||||||
font-size: ${({ theme }) => theme.fontSizeSM}px;
|
font-size: ${({ theme }) => theme.fontSizeSM}px;
|
||||||
color: ${({ theme }) => theme.colors.grayscale.base};
|
color: ${({ theme }) => theme.colorText};
|
||||||
margin-bottom: ${({ theme }) => theme.sizeUnit * 2}px;
|
margin-bottom: ${({ theme }) => theme.sizeUnit * 2}px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ const DataTableTemporalHeaderCell = ({
|
|||||||
>
|
>
|
||||||
<Icons.SettingOutlined
|
<Icons.SettingOutlined
|
||||||
iconSize="m"
|
iconSize="m"
|
||||||
iconColor={theme.colors.grayscale.light1}
|
iconColor={theme.colorIcon}
|
||||||
css={{ marginRight: `${theme.sizeUnit}px` }}
|
css={{ marginRight: `${theme.sizeUnit}px` }}
|
||||||
onClick={(e: React.MouseEvent<HTMLElement>) => e.stopPropagation()}
|
onClick={(e: React.MouseEvent<HTMLElement>) => e.stopPropagation()}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -17,13 +17,7 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { useCallback, useEffect, useMemo, useState, MouseEvent } from 'react';
|
import { useCallback, useEffect, useMemo, useState, MouseEvent } from 'react';
|
||||||
import {
|
import { isFeatureEnabled, FeatureFlag, styled, t } from '@superset-ui/core';
|
||||||
isFeatureEnabled,
|
|
||||||
FeatureFlag,
|
|
||||||
styled,
|
|
||||||
t,
|
|
||||||
useTheme,
|
|
||||||
} from '@superset-ui/core';
|
|
||||||
import { Icons } from '@superset-ui/core/components/Icons';
|
import { Icons } from '@superset-ui/core/components/Icons';
|
||||||
import Tabs from '@superset-ui/core/components/Tabs';
|
import Tabs from '@superset-ui/core/components/Tabs';
|
||||||
import {
|
import {
|
||||||
@@ -96,7 +90,6 @@ export const DataTablesPane = ({
|
|||||||
setForceQuery,
|
setForceQuery,
|
||||||
canDownload,
|
canDownload,
|
||||||
}: DataTablesPaneProps) => {
|
}: DataTablesPaneProps) => {
|
||||||
const theme = useTheme();
|
|
||||||
const [activeTabKey, setActiveTabKey] = useState<string>(ResultTypes.Results);
|
const [activeTabKey, setActiveTabKey] = useState<string>(ResultTypes.Results);
|
||||||
const [isRequest, setIsRequest] = useState<Record<ResultTypes, boolean>>({
|
const [isRequest, setIsRequest] = useState<Record<ResultTypes, boolean>>({
|
||||||
results: false,
|
results: false,
|
||||||
@@ -189,7 +182,7 @@ export const DataTablesPane = ({
|
|||||||
)}
|
)}
|
||||||
</TableControlsWrapper>
|
</TableControlsWrapper>
|
||||||
);
|
);
|
||||||
}, [handleCollapseChange, panelOpen, theme.colors.grayscale.base]);
|
}, [handleCollapseChange, panelOpen]);
|
||||||
|
|
||||||
const queryResultsPanes = useResultsPane({
|
const queryResultsPanes = useResultsPane({
|
||||||
errorMessage,
|
errorMessage,
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ const DatasourceContainer = styled.div`
|
|||||||
.field-length {
|
.field-length {
|
||||||
margin-bottom: ${theme.sizeUnit * 2}px;
|
margin-bottom: ${theme.sizeUnit * 2}px;
|
||||||
font-size: ${theme.fontSizeSM}px;
|
font-size: ${theme.fontSizeSM}px;
|
||||||
color: ${theme.colors.grayscale.light1};
|
color: ${theme.colorTextTertiary};
|
||||||
}
|
}
|
||||||
.form-control.input-md {
|
.form-control.input-md {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
@@ -97,7 +97,7 @@ const DatasourceContainer = styled.div`
|
|||||||
}
|
}
|
||||||
.type-label {
|
.type-label {
|
||||||
font-size: ${theme.fontSizeSM}px;
|
font-size: ${theme.fontSizeSM}px;
|
||||||
color: ${theme.colors.grayscale.base};
|
color: ${theme.colorTextSecondary};
|
||||||
}
|
}
|
||||||
.Control {
|
.Control {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export const RunQueryButton = ({
|
|||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
return loading ? (
|
return loading ? (
|
||||||
<Button onClick={onStop} buttonStyle="danger" disabled={!canStopQuery}>
|
<Button onClick={onStop} buttonStyle="danger" disabled={!canStopQuery}>
|
||||||
<Icons.Square iconSize="xs" iconColor={theme.colors.primary.light5} />
|
<Icons.Square iconSize="xs" iconColor={theme.colorIcon} />
|
||||||
{t('Stop')}
|
{t('Stop')}
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ class AnnotationLayerControl extends PureComponent<Props, PopoverState> {
|
|||||||
css={theme => ({
|
css={theme => ({
|
||||||
'&:hover': {
|
'&:hover': {
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
backgroundColor: theme.colors.grayscale.light4,
|
backgroundColor: theme.colorFillContentHover,
|
||||||
},
|
},
|
||||||
})}
|
})}
|
||||||
content={this.renderPopover(
|
content={this.renderPopover(
|
||||||
|
|||||||
+1
-1
@@ -173,7 +173,7 @@ export default function ColumnConfigControl<T extends ColumnConfig>({
|
|||||||
fontSize: theme.fontSizeXS,
|
fontSize: theme.fontSizeXS,
|
||||||
color: theme.colorTextLabel,
|
color: theme.colorTextLabel,
|
||||||
':hover': {
|
':hover': {
|
||||||
backgroundColor: theme.colors.grayscale.light4,
|
backgroundColor: theme.colorFillContentHover,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
onClick={() => setShowAllColumns(!showAllColumns)}
|
onClick={() => setShowAllColumns(!showAllColumns)}
|
||||||
|
|||||||
+8
-9
@@ -34,7 +34,8 @@ export default memo(function ColumnConfigItem({
|
|||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
}: ColumnConfigItemProps) {
|
}: ColumnConfigItemProps) {
|
||||||
const { colors, sizeUnit } = useTheme();
|
const theme = useTheme();
|
||||||
|
const { sizeUnit } = theme;
|
||||||
const caretWidth = sizeUnit * 6;
|
const caretWidth = sizeUnit * 6;
|
||||||
|
|
||||||
const outerContainerStyle = css({
|
const outerContainerStyle = css({
|
||||||
@@ -42,20 +43,20 @@ export default memo(function ColumnConfigItem({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
padding: `${sizeUnit}px ${2 * sizeUnit}px`,
|
padding: `${sizeUnit}px ${2 * sizeUnit}px`,
|
||||||
borderBottom: `1px solid ${colors.grayscale.light2}`,
|
borderBottom: `1px solid ${theme.colorBorderSecondary}`,
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
paddingRight: `${caretWidth}px`,
|
paddingRight: `${caretWidth}px`,
|
||||||
':last-child': {
|
':last-child': {
|
||||||
borderBottom: 'none',
|
borderBottom: 'none',
|
||||||
},
|
},
|
||||||
':hover': {
|
':hover': {
|
||||||
background: colors.grayscale.light4,
|
background: theme.colorFillTertiary,
|
||||||
},
|
},
|
||||||
'> .fa': {
|
'> .fa': {
|
||||||
color: colors.grayscale.light2,
|
color: theme.colorTextTertiary,
|
||||||
},
|
},
|
||||||
':hover > .fa': {
|
':hover > .fa': {
|
||||||
color: colors.grayscale.light1,
|
color: theme.colorTextSecondary,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -78,11 +79,9 @@ export default memo(function ColumnConfigItem({
|
|||||||
top: 3 * sizeUnit,
|
top: 3 * sizeUnit,
|
||||||
transform: 'translateY(-50%)',
|
transform: 'translateY(-50%)',
|
||||||
gap: sizeUnit,
|
gap: sizeUnit,
|
||||||
color: colors.grayscale.light1,
|
color: theme.colorTextSecondary,
|
||||||
});
|
});
|
||||||
|
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
const caretIconStyle = css({
|
const caretIconStyle = css({
|
||||||
fontSize: `${theme.fontSizeSM}px`,
|
fontSize: `${theme.fontSizeSM}px`,
|
||||||
fontWeight: theme.fontWeightNormal,
|
fontWeight: theme.fontWeightNormal,
|
||||||
@@ -114,7 +113,7 @@ export default memo(function ColumnConfigItem({
|
|||||||
{column.isChildColumn && column.config?.visible === false && (
|
{column.isChildColumn && column.config?.visible === false && (
|
||||||
<Icons.EyeInvisibleOutlined
|
<Icons.EyeInvisibleOutlined
|
||||||
iconSize="s"
|
iconSize="s"
|
||||||
iconColor={colors.grayscale.base}
|
iconColor={theme.colorIcon}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Icons.RightOutlined css={caretIconStyle} />
|
<Icons.RightOutlined css={caretIconStyle} />
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user