mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Theme: Refactoring theme colors variables (#23513)
* Theme: Typography updates * Updated * Updated snapshot * Renamed colors to palette * Introduce colors namespace * Massive theme color move * Removing color selection logic with more abstract concepts * Updates * Minor sidemenu change
This commit is contained in:
parent
0fd5945542
commit
1ba8f1647e
@ -112,13 +112,7 @@ export interface GrafanaTheme extends GrafanaThemeCommons {
|
|||||||
type: GrafanaThemeType;
|
type: GrafanaThemeType;
|
||||||
isDark: boolean;
|
isDark: boolean;
|
||||||
isLight: boolean;
|
isLight: boolean;
|
||||||
background: {
|
palette: {
|
||||||
dropdown: string;
|
|
||||||
scrollbar: string;
|
|
||||||
scrollbar2: string;
|
|
||||||
pageHeader: string;
|
|
||||||
};
|
|
||||||
colors: {
|
|
||||||
black: string;
|
black: string;
|
||||||
white: string;
|
white: string;
|
||||||
dark1: string;
|
dark1: string;
|
||||||
@ -160,7 +154,6 @@ export interface GrafanaTheme extends GrafanaThemeCommons {
|
|||||||
red88: string;
|
red88: string;
|
||||||
|
|
||||||
grayBlue: string;
|
grayBlue: string;
|
||||||
inputBlack: string;
|
|
||||||
|
|
||||||
// Accent colors
|
// Accent colors
|
||||||
blue: string;
|
blue: string;
|
||||||
@ -192,6 +185,24 @@ export interface GrafanaTheme extends GrafanaThemeCommons {
|
|||||||
online: string;
|
online: string;
|
||||||
warn: string;
|
warn: string;
|
||||||
critical: string;
|
critical: string;
|
||||||
|
};
|
||||||
|
colors: {
|
||||||
|
bg1: string;
|
||||||
|
bg2: string;
|
||||||
|
bg3: string;
|
||||||
|
border1: string;
|
||||||
|
border2: string;
|
||||||
|
|
||||||
|
dashboardBg: string;
|
||||||
|
bodyBg: string;
|
||||||
|
panelBg: string;
|
||||||
|
panelBorder: string;
|
||||||
|
pageHeaderBg: string;
|
||||||
|
pageHeaderBorder: string;
|
||||||
|
|
||||||
|
dropdownBg: string;
|
||||||
|
dropdownShadow: string;
|
||||||
|
dropdownOptionHoverBg: string;
|
||||||
|
|
||||||
// Link colors
|
// Link colors
|
||||||
link: string;
|
link: string;
|
||||||
@ -200,25 +211,13 @@ export interface GrafanaTheme extends GrafanaThemeCommons {
|
|||||||
linkExternal: string;
|
linkExternal: string;
|
||||||
|
|
||||||
// Text colors
|
// Text colors
|
||||||
body: string;
|
|
||||||
text: string;
|
text: string;
|
||||||
textStrong: string;
|
textStrong: string;
|
||||||
textWeak: string;
|
textWeak: string;
|
||||||
textFaint: string;
|
textFaint: string;
|
||||||
textEmphasis: string;
|
textEmphasis: string;
|
||||||
|
|
||||||
// panel
|
|
||||||
panelBg: string;
|
|
||||||
panelBorder: string;
|
|
||||||
|
|
||||||
// TODO: move to background section
|
|
||||||
bodyBg: string;
|
|
||||||
pageBg: string;
|
|
||||||
pageHeaderBg: string;
|
|
||||||
headingColor: string;
|
headingColor: string;
|
||||||
|
|
||||||
pageHeaderBorder: string;
|
|
||||||
|
|
||||||
// Next-gen forms functional colors
|
// Next-gen forms functional colors
|
||||||
formLabel: string;
|
formLabel: string;
|
||||||
formDescription: string;
|
formDescription: string;
|
||||||
@ -248,7 +247,4 @@ export interface GrafanaTheme extends GrafanaThemeCommons {
|
|||||||
formCheckboxBgCheckedHover: string;
|
formCheckboxBgCheckedHover: string;
|
||||||
formCheckboxCheckmark: string;
|
formCheckboxCheckmark: string;
|
||||||
};
|
};
|
||||||
shadow: {
|
|
||||||
pageHeader: string;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -9,12 +9,12 @@ const createTheme = (theme: GrafanaTheme) => {
|
|||||||
return create({
|
return create({
|
||||||
base: theme.name.includes('Light') ? 'light' : 'dark',
|
base: theme.name.includes('Light') ? 'light' : 'dark',
|
||||||
|
|
||||||
colorPrimary: theme.colors.brandPrimary,
|
colorPrimary: theme.palette.brandPrimary,
|
||||||
colorSecondary: theme.colors.brandPrimary,
|
colorSecondary: theme.palette.brandPrimary,
|
||||||
|
|
||||||
// UI
|
// UI
|
||||||
appBg: theme.colors.pageBg,
|
appBg: theme.colors.bodyBg,
|
||||||
appContentBg: theme.colors.pageBg,
|
appContentBg: theme.colors.bodyBg,
|
||||||
appBorderColor: theme.colors.pageHeaderBorder,
|
appBorderColor: theme.colors.pageHeaderBorder,
|
||||||
appBorderRadius: 4,
|
appBorderRadius: 4,
|
||||||
|
|
||||||
@ -28,8 +28,8 @@ const createTheme = (theme: GrafanaTheme) => {
|
|||||||
|
|
||||||
// Toolbar default and active colors
|
// Toolbar default and active colors
|
||||||
barTextColor: theme.colors.formInputBorderActive,
|
barTextColor: theme.colors.formInputBorderActive,
|
||||||
barSelectedColor: theme.colors.brandPrimary,
|
barSelectedColor: theme.palette.brandPrimary,
|
||||||
barBg: theme.colors.pageBg,
|
barBg: theme.colors.pageHeaderBg,
|
||||||
|
|
||||||
// Form colors
|
// Form colors
|
||||||
inputBg: theme.colors.formInputBg,
|
inputBg: theme.colors.formInputBg,
|
||||||
|
@ -16,8 +16,8 @@ export const AlphaNotice: FC<Props> = ({ state, text, className }) => {
|
|||||||
const styles = cx(
|
const styles = cx(
|
||||||
className,
|
className,
|
||||||
css`
|
css`
|
||||||
background: linear-gradient(to bottom, ${theme.colors.blueBase}, ${theme.colors.blueShade});
|
background: linear-gradient(to bottom, ${theme.palette.blueBase}, ${theme.palette.blueShade});
|
||||||
color: ${theme.colors.gray7};
|
color: ${theme.palette.gray7};
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
|
@ -115,7 +115,7 @@ export abstract class BigValueLayout {
|
|||||||
panelStyles.background = `linear-gradient(120deg, ${bgColor2}, ${bgColor3})`;
|
panelStyles.background = `linear-gradient(120deg, ${bgColor2}, ${bgColor3})`;
|
||||||
break;
|
break;
|
||||||
case BigValueColorMode.Value:
|
case BigValueColorMode.Value:
|
||||||
panelStyles.background = `${theme.colors.panelBg}`;
|
panelStyles.background = `transparent`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ const buttonVariantStyles = (from: string, to: string, textColor: string) => css
|
|||||||
const getPropertiesForVariant = (theme: GrafanaTheme, variant: ButtonVariant) => {
|
const getPropertiesForVariant = (theme: GrafanaTheme, variant: ButtonVariant) => {
|
||||||
switch (variant) {
|
switch (variant) {
|
||||||
case 'secondary':
|
case 'secondary':
|
||||||
const from = theme.isLight ? theme.colors.gray7 : theme.colors.gray15;
|
const from = theme.isLight ? theme.palette.gray7 : theme.palette.gray15;
|
||||||
const to = theme.isLight
|
const to = theme.isLight
|
||||||
? tinycolor(from)
|
? tinycolor(from)
|
||||||
.darken(5)
|
.darken(5)
|
||||||
@ -34,14 +34,14 @@ const getPropertiesForVariant = (theme: GrafanaTheme, variant: ButtonVariant) =>
|
|||||||
.lighten(4)
|
.lighten(4)
|
||||||
.toString();
|
.toString();
|
||||||
return {
|
return {
|
||||||
borderColor: theme.isLight ? theme.colors.gray85 : theme.colors.gray25,
|
borderColor: theme.isLight ? theme.palette.gray85 : theme.palette.gray25,
|
||||||
background: buttonVariantStyles(from, to, theme.isLight ? theme.colors.gray25 : theme.colors.gray4),
|
background: buttonVariantStyles(from, to, theme.isLight ? theme.palette.gray25 : theme.palette.gray4),
|
||||||
};
|
};
|
||||||
|
|
||||||
case 'destructive':
|
case 'destructive':
|
||||||
return {
|
return {
|
||||||
borderColor: theme.colors.redShade,
|
borderColor: theme.palette.redShade,
|
||||||
background: buttonVariantStyles(theme.colors.redBase, theme.colors.redShade, theme.colors.white),
|
background: buttonVariantStyles(theme.palette.redBase, theme.palette.redShade, theme.palette.white),
|
||||||
};
|
};
|
||||||
|
|
||||||
case 'link':
|
case 'link':
|
||||||
@ -58,8 +58,8 @@ const getPropertiesForVariant = (theme: GrafanaTheme, variant: ButtonVariant) =>
|
|||||||
case 'primary':
|
case 'primary':
|
||||||
default:
|
default:
|
||||||
return {
|
return {
|
||||||
borderColor: theme.colors.blueShade,
|
borderColor: theme.palette.blueShade,
|
||||||
background: buttonVariantStyles(theme.colors.blueBase, theme.colors.blueShade, theme.colors.white),
|
background: buttonVariantStyles(theme.palette.blueBase, theme.palette.blueShade, theme.palette.white),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -16,7 +16,7 @@ const getCallToActionCardStyles = stylesFactory((theme: GrafanaTheme) => ({
|
|||||||
wrapper: css`
|
wrapper: css`
|
||||||
label: call-to-action-card;
|
label: call-to-action-card;
|
||||||
padding: ${theme.spacing.lg};
|
padding: ${theme.spacing.lg};
|
||||||
background: ${selectThemeVariant({ light: theme.colors.gray6, dark: theme.colors.grayBlue }, theme.type)};
|
background: ${selectThemeVariant({ light: theme.palette.gray6, dark: theme.palette.grayBlue }, theme.type)};
|
||||||
border-radius: ${theme.border.radius.md};
|
border-radius: ${theme.border.radius.md};
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -13,7 +13,7 @@ interface TooltipContainerProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getTooltipContainerStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getTooltipContainerStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const bgColor = selectThemeVariant({ light: theme.colors.gray5, dark: theme.colors.dark1 }, theme.type);
|
const bgColor = selectThemeVariant({ light: theme.palette.gray5, dark: theme.palette.dark1 }, theme.type);
|
||||||
return {
|
return {
|
||||||
wrapper: css`
|
wrapper: css`
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -36,7 +36,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => ({
|
|||||||
animation: loader 2s cubic-bezier(0.17, 0.67, 0.83, 0.67) 500ms;
|
animation: loader 2s cubic-bezier(0.17, 0.67, 0.83, 0.67) 500ms;
|
||||||
animation-iteration-count: 100;
|
animation-iteration-count: 100;
|
||||||
left: -25%;
|
left: -25%;
|
||||||
background: ${theme.colors.blue};
|
background: ${theme.palette.blue};
|
||||||
}
|
}
|
||||||
@keyframes loader {
|
@keyframes loader {
|
||||||
from {
|
from {
|
||||||
|
@ -33,8 +33,8 @@ export const ColorSwatch: FunctionComponent<ColorSwatchProps> = ({
|
|||||||
|
|
||||||
const selectedSwatchBorder = selectThemeVariant(
|
const selectedSwatchBorder = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.white,
|
light: theme.palette.white,
|
||||||
dark: theme.colors.black,
|
dark: theme.palette.black,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
@ -17,8 +17,8 @@ const SpectrumPalettePointer: React.FunctionComponent<SpectrumPalettePointerProp
|
|||||||
|
|
||||||
const pointerColor = selectThemeVariant(
|
const pointerColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.dark3,
|
light: theme.palette.dark3,
|
||||||
dark: theme.colors.gray2,
|
dark: theme.palette.gray2,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
@ -31,7 +31,7 @@ export interface ContextMenuProps {
|
|||||||
const getContextMenuStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getContextMenuStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const linkColor = selectThemeVariant(
|
const linkColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.dark2,
|
light: theme.palette.dark2,
|
||||||
dark: theme.colors.text,
|
dark: theme.colors.text,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
@ -39,35 +39,35 @@ const getContextMenuStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
const linkColorHover = selectThemeVariant(
|
const linkColorHover = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.link,
|
light: theme.colors.link,
|
||||||
dark: theme.colors.white,
|
dark: theme.palette.white,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
const wrapperBg = selectThemeVariant(
|
const wrapperBg = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray7,
|
light: theme.palette.gray7,
|
||||||
dark: theme.colors.dark2,
|
dark: theme.palette.dark2,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
const wrapperShadow = selectThemeVariant(
|
const wrapperShadow = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray3,
|
light: theme.palette.gray3,
|
||||||
dark: theme.colors.black,
|
dark: theme.palette.black,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
const itemColor = selectThemeVariant(
|
const itemColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.black,
|
light: theme.palette.black,
|
||||||
dark: theme.colors.white,
|
dark: theme.palette.white,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
|
||||||
const groupLabelColor = selectThemeVariant(
|
const groupLabelColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray1,
|
light: theme.palette.gray1,
|
||||||
dark: theme.colors.textWeak,
|
dark: theme.colors.textWeak,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
@ -75,22 +75,22 @@ const getContextMenuStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
|
|
||||||
const itemBgHover = selectThemeVariant(
|
const itemBgHover = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray5,
|
light: theme.palette.gray5,
|
||||||
dark: theme.colors.dark7,
|
dark: theme.palette.dark7,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
const headerBg = selectThemeVariant(
|
const headerBg = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.white,
|
light: theme.palette.white,
|
||||||
dark: theme.colors.dark1,
|
dark: theme.palette.dark1,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
const headerSeparator = selectThemeVariant(
|
const headerSeparator = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.white,
|
light: theme.palette.white,
|
||||||
dark: theme.colors.dark7,
|
dark: theme.palette.dark7,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
@ -35,10 +35,10 @@ const plugins = [
|
|||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => ({
|
const getStyles = stylesFactory((theme: GrafanaTheme) => ({
|
||||||
editor: css`
|
editor: css`
|
||||||
.token.builtInVariable {
|
.token.builtInVariable {
|
||||||
color: ${theme.colors.queryGreen};
|
color: ${theme.palette.queryGreen};
|
||||||
}
|
}
|
||||||
.token.variable {
|
.token.variable {
|
||||||
color: ${theme.colors.queryKeyword};
|
color: ${theme.palette.queryKeyword};
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
}));
|
}));
|
||||||
|
@ -18,48 +18,48 @@ interface DataLinkSuggestionsProps {
|
|||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const wrapperBg = selectThemeVariant(
|
const wrapperBg = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.white,
|
light: theme.palette.white,
|
||||||
dark: theme.colors.dark2,
|
dark: theme.palette.dark2,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
|
||||||
const wrapperShadow = selectThemeVariant(
|
const wrapperShadow = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray5,
|
light: theme.palette.gray5,
|
||||||
dark: theme.colors.black,
|
dark: theme.palette.black,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
|
||||||
const itemColor = selectThemeVariant(
|
const itemColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.black,
|
light: theme.palette.black,
|
||||||
dark: theme.colors.white,
|
dark: theme.palette.white,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
|
||||||
const itemDocsColor = selectThemeVariant(
|
const itemDocsColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.dark3,
|
light: theme.palette.dark3,
|
||||||
dark: theme.colors.gray2,
|
dark: theme.palette.gray2,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
|
||||||
const itemBgHover = selectThemeVariant(
|
const itemBgHover = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray5,
|
light: theme.palette.gray5,
|
||||||
dark: theme.colors.dark7,
|
dark: theme.palette.dark7,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
|
||||||
const itemBgActive = selectThemeVariant(
|
const itemBgActive = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray6,
|
light: theme.palette.gray6,
|
||||||
dark: theme.colors.dark9,
|
dark: theme.palette.dark9,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
@ -111,16 +111,16 @@ export const DataLinksInlineEditor: React.FC<DataLinksInlineEditorProps> = ({ li
|
|||||||
const getDataLinksInlineEditorStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getDataLinksInlineEditorStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const borderColor = selectThemeVariant(
|
const borderColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray85,
|
light: theme.palette.gray85,
|
||||||
dark: theme.colors.dark9,
|
dark: theme.palette.dark9,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
|
||||||
const shadow = selectThemeVariant(
|
const shadow = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray85,
|
light: theme.palette.gray85,
|
||||||
dark: theme.colors.black,
|
dark: theme.palette.black,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
@ -56,15 +56,15 @@ export const DataLinksListItem: FC<DataLinksListItemProps> = ({
|
|||||||
const getDataLinkListItemStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getDataLinkListItemStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const borderColor = selectThemeVariant(
|
const borderColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray85,
|
light: theme.palette.gray85,
|
||||||
dark: theme.colors.dark9,
|
dark: theme.palette.dark9,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
const bg = selectThemeVariant(
|
const bg = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.white,
|
light: theme.palette.white,
|
||||||
dark: theme.colors.dark1,
|
dark: theme.palette.dark1,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
@ -92,7 +92,7 @@ const getDataLinkListItemStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
font-size: ${theme.typography.size.sm};
|
font-size: ${theme.typography.size.sm};
|
||||||
`,
|
`,
|
||||||
remove: css`
|
remove: css`
|
||||||
color: ${theme.colors.red88};
|
color: ${theme.palette.red88};
|
||||||
`,
|
`,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -104,7 +104,7 @@ export const DataSourceHttpSettings: React.FC<HttpSettingsProps> = props => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const notValidStyle = css`
|
const notValidStyle = css`
|
||||||
box-shadow: inset 0 0px 5px ${theme.colors.red};
|
box-shadow: inset 0 0px 5px ${theme.palette.red};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const inputStyle = cx({ [`width-20`]: true, [notValidStyle]: !isValidUrl });
|
const inputStyle = cx({ [`width-20`]: true, [notValidStyle]: !isValidUrl });
|
||||||
|
@ -3,7 +3,7 @@ import { GrafanaTheme } from '@grafana/data';
|
|||||||
import RcDrawer from 'rc-drawer';
|
import RcDrawer from 'rc-drawer';
|
||||||
import { css } from 'emotion';
|
import { css } from 'emotion';
|
||||||
import CustomScrollbar from '../CustomScrollbar/CustomScrollbar';
|
import CustomScrollbar from '../CustomScrollbar/CustomScrollbar';
|
||||||
import { stylesFactory, useTheme, selectThemeVariant } from '../../themes';
|
import { stylesFactory, useTheme } from '../../themes';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
@ -24,17 +24,12 @@ export interface Props {
|
|||||||
|
|
||||||
const getStyles = stylesFactory((theme: GrafanaTheme, scollableContent: boolean) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme, scollableContent: boolean) => {
|
||||||
const closeButtonWidth = '50px';
|
const closeButtonWidth = '50px';
|
||||||
const borderColor = selectThemeVariant(
|
const borderColor = theme.colors.border2;
|
||||||
{
|
|
||||||
light: theme.colors.gray4,
|
|
||||||
dark: theme.colors.dark9,
|
|
||||||
},
|
|
||||||
theme.type
|
|
||||||
);
|
|
||||||
return {
|
return {
|
||||||
drawer: css`
|
drawer: css`
|
||||||
.drawer-content {
|
.drawer-content {
|
||||||
background-color: ${theme.colors.pageBg};
|
background-color: ${theme.colors.bodyBg};
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -37,8 +37,8 @@ export const FieldConfigItemHeaderTitle: React.FC<FieldConfigItemHeaderTitleProp
|
|||||||
const getFieldConfigItemHeaderTitleStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getFieldConfigItemHeaderTitleStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const headerBg = selectThemeVariant(
|
const headerBg = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.white,
|
light: theme.palette.white,
|
||||||
dark: theme.colors.dark1,
|
dark: theme.palette.dark1,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
@ -57,7 +57,7 @@ const getFieldConfigItemHeaderTitleStyles = stylesFactory((theme: GrafanaTheme)
|
|||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: ${theme.colors.red88};
|
color: ${theme.palette.red88};
|
||||||
`,
|
`,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -19,7 +19,7 @@ export interface RadioButtonProps {
|
|||||||
const getRadioButtonStyles = stylesFactory((theme: GrafanaTheme, size: RadioButtonSize, fullWidth?: boolean) => {
|
const getRadioButtonStyles = stylesFactory((theme: GrafanaTheme, size: RadioButtonSize, fullWidth?: boolean) => {
|
||||||
const { fontSize, height } = getPropertiesForButtonSize(theme, size);
|
const { fontSize, height } = getPropertiesForButtonSize(theme, size);
|
||||||
const horizontalPadding = theme.spacing[size] ?? theme.spacing.md;
|
const horizontalPadding = theme.spacing[size] ?? theme.spacing.md;
|
||||||
const c = theme.colors;
|
const c = theme.palette;
|
||||||
|
|
||||||
const textColor = theme.isLight ? c.gray33 : c.gray70;
|
const textColor = theme.isLight ? c.gray33 : c.gray70;
|
||||||
const textColorHover = theme.isLight ? c.blueShade : c.blueLight;
|
const textColorHover = theme.isLight ? c.blueShade : c.blueLight;
|
||||||
@ -27,7 +27,7 @@ const getRadioButtonStyles = stylesFactory((theme: GrafanaTheme, size: RadioButt
|
|||||||
const borderColor = theme.isLight ? c.gray4 : c.gray25;
|
const borderColor = theme.isLight ? c.gray4 : c.gray25;
|
||||||
const borderColorHover = theme.isLight ? c.gray70 : c.gray33;
|
const borderColorHover = theme.isLight ? c.gray70 : c.gray33;
|
||||||
const borderColorActive = theme.isLight ? c.blueShade : c.blueLight;
|
const borderColorActive = theme.isLight ? c.blueShade : c.blueLight;
|
||||||
const bg = c.pageBg;
|
const bg = theme.colors.bodyBg;
|
||||||
const bgDisabled = theme.isLight ? c.gray95 : c.gray15;
|
const bgDisabled = theme.isLight ? c.gray95 : c.gray15;
|
||||||
const bgActive = theme.isLight ? c.white : c.gray05;
|
const bgActive = theme.isLight ? c.white : c.gray05;
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import { IconName } from '../../types';
|
|||||||
export const getFocusCss = (theme: GrafanaTheme) => `
|
export const getFocusCss = (theme: GrafanaTheme) => `
|
||||||
outline: 2px dotted transparent;
|
outline: 2px dotted transparent;
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
box-shadow: 0 0 0 2px ${theme.colors.pageBg}, 0 0 0px 4px ${theme.colors.formFocusOutline};
|
box-shadow: 0 0 0 2px ${theme.colors.bodyBg}, 0 0 0px 4px ${theme.colors.formFocusOutline};
|
||||||
transition: all 0.2s cubic-bezier(0.19, 1, 0.22, 1);
|
transition: all 0.2s cubic-bezier(0.19, 1, 0.22, 1);
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ export const getFocusStyle = (theme: GrafanaTheme) => css`
|
|||||||
|
|
||||||
export const sharedInputStyle = (theme: GrafanaTheme, invalid = false) => {
|
export const sharedInputStyle = (theme: GrafanaTheme, invalid = false) => {
|
||||||
const colors = theme.colors;
|
const colors = theme.colors;
|
||||||
const borderColor = invalid ? colors.redBase : colors.formInputBorder;
|
const borderColor = invalid ? theme.palette.redBase : colors.formInputBorder;
|
||||||
|
|
||||||
return css`
|
return css`
|
||||||
background-color: ${colors.formInputBg};
|
background-color: ${colors.formInputBg};
|
||||||
@ -36,7 +36,7 @@ export const sharedInputStyle = (theme: GrafanaTheme, invalid = false) => {
|
|||||||
|
|
||||||
&:-webkit-autofill:focus {
|
&:-webkit-autofill:focus {
|
||||||
/* Welcome to 2005. This is a HACK to get rid od Chromes default autofill styling */
|
/* Welcome to 2005. This is a HACK to get rid od Chromes default autofill styling */
|
||||||
box-shadow: 0 0 0 2px ${theme.colors.pageBg}, 0 0 0px 4px ${theme.colors.formFocusOutline},
|
box-shadow: 0 0 0 2px ${theme.colors.bodyBg}, 0 0 0px 4px ${theme.colors.formFocusOutline},
|
||||||
inset 0 0 0 1px rgba(255, 255, 255, 0), inset 0 0 0 100px ${colors.formInputBg}!important;
|
inset 0 0 0 1px rgba(255, 255, 255, 0), inset 0 0 0 100px ${colors.formInputBg}!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,8 +102,8 @@ export class Gauge extends PureComponent<Props> {
|
|||||||
|
|
||||||
const backgroundColor = selectThemeVariant(
|
const backgroundColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
dark: theme.colors.dark8,
|
dark: theme.palette.dark8,
|
||||||
light: theme.colors.gray6,
|
light: theme.palette.gray6,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
@ -63,8 +63,8 @@ export const GraphLegend: React.FunctionComponent<GraphLegendProps> = ({
|
|||||||
|
|
||||||
const legendTableEvenRowBackground = selectThemeVariant(
|
const legendTableEvenRowBackground = selectThemeVariant(
|
||||||
{
|
{
|
||||||
dark: theme.colors.dark6,
|
dark: theme.palette.dark6,
|
||||||
light: theme.colors.gray5,
|
light: theme.palette.gray5,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
@ -79,7 +79,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
`,
|
`,
|
||||||
yAxisLabel: css`
|
yAxisLabel: css`
|
||||||
color: ${theme.colors.gray2};
|
color: ${theme.palette.gray2};
|
||||||
`,
|
`,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -24,8 +24,8 @@ const IconWrapper: React.FC<{ name: IconName }> = ({ name }) => {
|
|||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const borderColor = selectThemeVariant(
|
const borderColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray5,
|
light: theme.palette.gray5,
|
||||||
dark: theme.colors.dark6,
|
dark: theme.palette.dark6,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
@ -26,7 +26,7 @@ const getIconStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
fill: currentColor;
|
fill: currentColor;
|
||||||
`,
|
`,
|
||||||
orange: css`
|
orange: css`
|
||||||
fill: ${theme.colors.orange};
|
fill: ${theme.palette.orange};
|
||||||
`,
|
`,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -35,7 +35,7 @@ function renderScenario(surface: string, theme: GrafanaTheme, sizes: IconSize[],
|
|||||||
bg = theme.colors.bodyBg;
|
bg = theme.colors.bodyBg;
|
||||||
break;
|
break;
|
||||||
case 'panel':
|
case 'panel':
|
||||||
bg = theme.colors.pageBg;
|
bg = theme.colors.bodyBg;
|
||||||
break;
|
break;
|
||||||
case 'header': {
|
case 'header': {
|
||||||
bg = theme.colors.pageHeaderBg;
|
bg = theme.colors.pageHeaderBg;
|
||||||
|
@ -46,11 +46,11 @@ export const IconButton = React.forwardRef<HTMLButtonElement, Props>(
|
|||||||
function getHoverColor(theme: GrafanaTheme, surface: SurfaceType): string {
|
function getHoverColor(theme: GrafanaTheme, surface: SurfaceType): string {
|
||||||
switch (surface) {
|
switch (surface) {
|
||||||
case 'body':
|
case 'body':
|
||||||
return theme.isLight ? theme.colors.gray95 : theme.colors.gray15;
|
return theme.isLight ? theme.palette.gray95 : theme.palette.gray15;
|
||||||
case 'panel':
|
case 'panel':
|
||||||
return theme.isLight ? theme.colors.gray6 : theme.colors.gray25;
|
return theme.isLight ? theme.palette.gray6 : theme.palette.gray25;
|
||||||
case 'header':
|
case 'header':
|
||||||
return theme.isLight ? theme.colors.gray85 : theme.colors.gray25;
|
return theme.isLight ? theme.palette.gray85 : theme.palette.gray25;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ interface StyleDeps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const getInputStyles = stylesFactory(({ theme, invalid = false }: StyleDeps) => {
|
export const getInputStyles = stylesFactory(({ theme, invalid = false }: StyleDeps) => {
|
||||||
const colors = theme.colors;
|
const { palette, colors } = theme;
|
||||||
const borderRadius = theme.border.radius.sm;
|
const borderRadius = theme.border.radius.sm;
|
||||||
const height = theme.spacing.formInputHeight;
|
const height = theme.spacing.formInputHeight;
|
||||||
|
|
||||||
@ -47,6 +47,7 @@ export const getInputStyles = stylesFactory(({ theme, invalid = false }: StyleDe
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
/* Min width specified for prefix/suffix classes used outside React component*/
|
/* Min width specified for prefix/suffix classes used outside React component*/
|
||||||
min-width: ${prefixSuffixStaticWidth};
|
min-width: ${prefixSuffixStaticWidth};
|
||||||
|
color: ${theme.colors.textWeak};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -62,7 +63,7 @@ export const getInputStyles = stylesFactory(({ theme, invalid = false }: StyleDe
|
|||||||
> .prefix,
|
> .prefix,
|
||||||
.suffix,
|
.suffix,
|
||||||
.input {
|
.input {
|
||||||
border-color: ${invalid ? colors.redBase : colors.formInputBorder};
|
border-color: ${invalid ? palette.redBase : colors.formInputBorder};
|
||||||
}
|
}
|
||||||
|
|
||||||
// only show number buttons on hover
|
// only show number buttons on hover
|
||||||
|
@ -40,7 +40,7 @@ export const LegendTable: React.FunctionComponent<LegendTableProps> = ({
|
|||||||
<th
|
<th
|
||||||
key={columnHeader}
|
key={columnHeader}
|
||||||
className={css`
|
className={css`
|
||||||
color: ${theme.colors.blue};
|
color: ${theme.palette.blue};
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -41,7 +41,7 @@ export interface Props extends Themeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const bgColor = selectThemeVariant({ light: theme.colors.gray7, dark: theme.colors.dark2 }, theme.type);
|
const bgColor = selectThemeVariant({ light: theme.palette.gray7, dark: theme.palette.dark2 }, theme.type);
|
||||||
return {
|
return {
|
||||||
hoverBackground: css`
|
hoverBackground: css`
|
||||||
label: hoverBackground;
|
label: hoverBackground;
|
||||||
|
@ -15,8 +15,8 @@ const STATS_ROW_LIMIT = 5;
|
|||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const borderColor = selectThemeVariant(
|
const borderColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray5,
|
light: theme.palette.gray5,
|
||||||
dark: theme.colors.dark9,
|
dark: theme.palette.dark9,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
@ -11,7 +11,7 @@ const getStyles = (theme: GrafanaTheme) => ({
|
|||||||
`,
|
`,
|
||||||
logsStatsRowActive: css`
|
logsStatsRowActive: css`
|
||||||
label: logs-stats-row--active;
|
label: logs-stats-row--active;
|
||||||
color: ${theme.colors.blue};
|
color: ${theme.palette.blue};
|
||||||
position: relative;
|
position: relative;
|
||||||
`,
|
`,
|
||||||
logsStatsRowLabel: css`
|
logsStatsRowLabel: css`
|
||||||
@ -47,7 +47,7 @@ const getStyles = (theme: GrafanaTheme) => ({
|
|||||||
height: 4px;
|
height: 4px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: ${theme.colors.textFaint};
|
background: ${theme.colors.textFaint};
|
||||||
background: ${theme.colors.blue};
|
background: ${theme.palette.blue};
|
||||||
`,
|
`,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
label: logs-label;
|
label: logs-label;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0 2px;
|
padding: 0 2px;
|
||||||
background-color: ${selectThemeVariant({ light: theme.colors.gray5, dark: theme.colors.dark6 }, theme.type)};
|
background-color: ${selectThemeVariant({ light: theme.palette.gray5, dark: theme.palette.dark6 }, theme.type)};
|
||||||
border-radius: ${theme.border.radius};
|
border-radius: ${theme.border.radius};
|
||||||
margin: 1px 4px 0 0;
|
margin: 1px 4px 0 0;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
@ -44,7 +44,7 @@ interface State {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const bgColor = selectThemeVariant({ light: theme.colors.gray7, dark: theme.colors.dark2 }, theme.type);
|
const bgColor = selectThemeVariant({ light: theme.palette.gray7, dark: theme.palette.dark2 }, theme.type);
|
||||||
return {
|
return {
|
||||||
topVerticalAlign: css`
|
topVerticalAlign: css`
|
||||||
label: topVerticalAlign;
|
label: topVerticalAlign;
|
||||||
|
@ -24,30 +24,30 @@ interface LogRowContextProps {
|
|||||||
const getLogRowContextStyles = (theme: GrafanaTheme) => {
|
const getLogRowContextStyles = (theme: GrafanaTheme) => {
|
||||||
const gradientTop = selectThemeVariant(
|
const gradientTop = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.white,
|
light: theme.palette.white,
|
||||||
dark: theme.colors.dark1,
|
dark: theme.palette.dark1,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
const gradientBottom = selectThemeVariant(
|
const gradientBottom = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray7,
|
light: theme.palette.gray7,
|
||||||
dark: theme.colors.dark2,
|
dark: theme.palette.dark2,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
|
||||||
const boxShadowColor = selectThemeVariant(
|
const boxShadowColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray5,
|
light: theme.palette.gray5,
|
||||||
dark: theme.colors.black,
|
dark: theme.palette.black,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
const borderColor = selectThemeVariant(
|
const borderColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray5,
|
light: theme.palette.gray5,
|
||||||
dark: theme.colors.dark9,
|
dark: theme.palette.dark9,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
@ -60,7 +60,7 @@ const getLogRowContextStyles = (theme: GrafanaTheme) => {
|
|||||||
height: 250px;
|
height: 250px;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: ${theme.colors.pageBg};
|
background: ${theme.colors.bodyBg};
|
||||||
background: linear-gradient(180deg, ${gradientTop} 0%, ${gradientBottom} 104.25%);
|
background: linear-gradient(180deg, ${gradientTop} 0%, ${gradientBottom} 104.25%);
|
||||||
box-shadow: 0px 2px 4px ${boxShadowColor}, 0px 0px 2px ${boxShadowColor};
|
box-shadow: 0px 2px 4px ${boxShadowColor}, 0px 0px 2px ${boxShadowColor};
|
||||||
border: 1px solid ${borderColor};
|
border: 1px solid ${borderColor};
|
||||||
|
@ -33,8 +33,8 @@ interface Props extends Themeable {
|
|||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const outlineColor = selectThemeVariant(
|
const outlineColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.white,
|
light: theme.palette.white,
|
||||||
dark: theme.colors.black,
|
dark: theme.palette.black,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
@ -6,9 +6,9 @@ import { selectThemeVariant } from '../../themes/selectThemeVariant';
|
|||||||
import { stylesFactory } from '../../themes';
|
import { stylesFactory } from '../../themes';
|
||||||
|
|
||||||
export const getLogRowStyles = stylesFactory((theme: GrafanaTheme, logLevel?: LogLevel) => {
|
export const getLogRowStyles = stylesFactory((theme: GrafanaTheme, logLevel?: LogLevel) => {
|
||||||
let logColor = selectThemeVariant({ light: theme.colors.gray5, dark: theme.colors.gray2 }, theme.type);
|
let logColor = selectThemeVariant({ light: theme.palette.gray5, dark: theme.palette.gray2 }, theme.type);
|
||||||
const borderColor = selectThemeVariant({ light: theme.colors.gray5, dark: theme.colors.gray2 }, theme.type);
|
const borderColor = selectThemeVariant({ light: theme.palette.gray5, dark: theme.palette.gray2 }, theme.type);
|
||||||
const bgColor = selectThemeVariant({ light: theme.colors.gray5, dark: theme.colors.dark4 }, theme.type);
|
const bgColor = selectThemeVariant({ light: theme.palette.gray5, dark: theme.palette.dark4 }, theme.type);
|
||||||
const context = css`
|
const context = css`
|
||||||
label: context;
|
label: context;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
@ -27,7 +27,7 @@ export const getLogRowStyles = stylesFactory((theme: GrafanaTheme, logLevel?: Lo
|
|||||||
break;
|
break;
|
||||||
case LogLevel.warning:
|
case LogLevel.warning:
|
||||||
case LogLevel.warn:
|
case LogLevel.warn:
|
||||||
logColor = theme.colors.yellow;
|
logColor = theme.palette.yellow;
|
||||||
break;
|
break;
|
||||||
case LogLevel.info:
|
case LogLevel.info:
|
||||||
logColor = '#7eb26d';
|
logColor = '#7eb26d';
|
||||||
@ -45,12 +45,12 @@ export const getLogRowStyles = stylesFactory((theme: GrafanaTheme, logLevel?: Lo
|
|||||||
label: logs-row__match-highlight;
|
label: logs-row__match-highlight;
|
||||||
background: inherit;
|
background: inherit;
|
||||||
padding: inherit;
|
padding: inherit;
|
||||||
color: ${theme.colors.yellow};
|
color: ${theme.palette.yellow};
|
||||||
background-color: rgba(${theme.colors.yellow}, 0.1);
|
background-color: rgba(${theme.palette.yellow}, 0.1);
|
||||||
`,
|
`,
|
||||||
logsRowMatchHighLightPreview: css`
|
logsRowMatchHighLightPreview: css`
|
||||||
label: logs-row__match-highlight--preview;
|
label: logs-row__match-highlight--preview;
|
||||||
background-color: rgba(${theme.colors.yellow}, 0.2);
|
background-color: rgba(${theme.palette.yellow}, 0.2);
|
||||||
border-bottom-style: dotted;
|
border-bottom-style: dotted;
|
||||||
`,
|
`,
|
||||||
logsRowsTable: css`
|
logsRowsTable: css`
|
||||||
@ -76,7 +76,7 @@ export const getLogRowStyles = stylesFactory((theme: GrafanaTheme, logLevel?: Lo
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
&:hover {
|
&:hover {
|
||||||
color: ${theme.colors.yellow};
|
color: ${theme.palette.yellow};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ export const getLogRowStyles = stylesFactory((theme: GrafanaTheme, logLevel?: Lo
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: ${theme.colors.pageBg};
|
background: ${theme.colors.bodyBg};
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
logsRowDuplicates: css`
|
logsRowDuplicates: css`
|
||||||
@ -158,7 +158,7 @@ export const getLogRowStyles = stylesFactory((theme: GrafanaTheme, logLevel?: Lo
|
|||||||
logsDetailsIcon: css`
|
logsDetailsIcon: css`
|
||||||
label: logs-row-details__icon;
|
label: logs-row-details__icon;
|
||||||
position: relative;
|
position: relative;
|
||||||
color: ${theme.colors.gray3};
|
color: ${theme.palette.gray3};
|
||||||
svg {
|
svg {
|
||||||
margin-right: ${theme.spacing.md};
|
margin-right: ${theme.spacing.md};
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,15 @@
|
|||||||
import { css } from 'emotion';
|
import { css } from 'emotion';
|
||||||
import { GrafanaTheme } from '@grafana/data';
|
import { GrafanaTheme } from '@grafana/data';
|
||||||
import { selectThemeVariant, stylesFactory } from '../../themes';
|
import { stylesFactory } from '../../themes';
|
||||||
|
|
||||||
export const getModalStyles = stylesFactory((theme: GrafanaTheme) => {
|
export const getModalStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const backdropBackground = selectThemeVariant(
|
const backdropBackground = theme.colors.bg1;
|
||||||
{
|
|
||||||
light: theme.colors.bodyBg,
|
|
||||||
dark: theme.colors.gray25,
|
|
||||||
},
|
|
||||||
theme.type
|
|
||||||
);
|
|
||||||
return {
|
return {
|
||||||
modal: css`
|
modal: css`
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: ${theme.zIndex.modal};
|
z-index: ${theme.zIndex.modal};
|
||||||
background: ${theme.colors.pageBg};
|
background: ${theme.colors.bodyBg};
|
||||||
box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
|
box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
|
||||||
background-clip: padding-box;
|
background-clip: padding-box;
|
||||||
outline: none;
|
outline: none;
|
||||||
@ -37,8 +32,8 @@ export const getModalStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
`,
|
`,
|
||||||
modalHeader: css`
|
modalHeader: css`
|
||||||
background: ${theme.colors.pageHeaderBg};
|
background: ${theme.colors.bg1};
|
||||||
box-shadow: ${theme.shadow.pageHeader};
|
box-shadow: 0 0 20px ${theme.colors.dropdownShadow};
|
||||||
border-bottom: 1px solid ${theme.colors.pageHeaderBorder};
|
border-bottom: 1px solid ${theme.colors.pageHeaderBorder};
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 42px;
|
height: 42px;
|
||||||
|
@ -16,7 +16,7 @@ const getStyles = memoizeOne((theme: GrafanaTheme) => {
|
|||||||
selectButton: css`
|
selectButton: css`
|
||||||
label: selectButton;
|
label: selectButton;
|
||||||
.select-button-value {
|
.select-button-value {
|
||||||
color: ${theme.colors.orange};
|
color: ${theme.palette.orange};
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
};
|
};
|
||||||
|
@ -27,7 +27,7 @@ export const MultiValueRemove: React.FC<MultiValueRemoveProps> = ({ children, in
|
|||||||
const styles = getSelectStyles(theme);
|
const styles = getSelectStyles(theme);
|
||||||
return (
|
return (
|
||||||
<div {...innerProps} className={styles.multiValueRemove}>
|
<div {...innerProps} className={styles.multiValueRemove}>
|
||||||
<Icon name="times" />
|
<Icon name="times" size="sm" />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -20,8 +20,8 @@ interface State {
|
|||||||
const getSelectOptionGroupStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getSelectOptionGroupStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const optionBorder = selectThemeVariant(
|
const optionBorder = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray4,
|
light: theme.palette.gray4,
|
||||||
dark: theme.colors.dark9,
|
dark: theme.palette.dark9,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
import { stylesFactory } from '../../themes/stylesFactory';
|
import { stylesFactory } from '../../themes/stylesFactory';
|
||||||
import { selectThemeVariant as stv } from '../../themes/selectThemeVariant';
|
|
||||||
import { css } from 'emotion';
|
import { css } from 'emotion';
|
||||||
import { GrafanaTheme } from '@grafana/data';
|
import { GrafanaTheme } from '@grafana/data';
|
||||||
|
|
||||||
export const getSelectStyles = stylesFactory((theme: GrafanaTheme) => {
|
export const getSelectStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const bgColor = stv({ light: theme.colors.white, dark: theme.colors.formInputBg }, theme.type);
|
const bgColor = theme.colors.formInputBg;
|
||||||
const menuShadowColor = stv({ light: theme.colors.gray4, dark: theme.colors.black }, theme.type);
|
const menuShadowColor = theme.colors.dropdownShadow;
|
||||||
const optionBgHover = stv({ light: theme.colors.gray7, dark: theme.colors.gray10 }, theme.type);
|
const optionBgHover = theme.colors.dropdownOptionHoverBg;
|
||||||
const multiValueContainerBg = stv({ light: theme.colors.gray6, dark: theme.colors.gray05 }, theme.type);
|
const multiValueContainerBg = theme.colors.bg3;
|
||||||
const multiValueColor = stv({ light: theme.colors.gray25, dark: theme.colors.gray85 }, theme.type);
|
const multiValueColor = theme.colors.text;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
menu: css`
|
menu: css`
|
||||||
@ -87,12 +86,13 @@ export const getSelectStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
line-height: 1;
|
line-height: 1;
|
||||||
background: ${multiValueContainerBg};
|
background: ${multiValueContainerBg};
|
||||||
border-radius: ${theme.border.radius.sm};
|
border-radius: ${theme.border.radius.sm};
|
||||||
padding: ${theme.spacing.xs} ${theme.spacing.xxs} ${theme.spacing.xs} ${theme.spacing.sm};
|
margin: 0 ${theme.spacing.sm} 0 0;
|
||||||
margin: ${theme.spacing.xxs} ${theme.spacing.xs} ${theme.spacing.xxs} 0;
|
padding: ${theme.spacing.xxs} 0 ${theme.spacing.xxs} ${theme.spacing.sm};
|
||||||
color: ${multiValueColor};
|
color: ${multiValueColor};
|
||||||
|
font-size: ${theme.typography.size.sm};
|
||||||
`,
|
`,
|
||||||
multiValueRemove: css`
|
multiValueRemove: css`
|
||||||
margin-left: ${theme.spacing.xs};
|
margin: 0 ${theme.spacing.xs};
|
||||||
`,
|
`,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -21,7 +21,7 @@ export interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getStyles = stylesFactory((theme: GrafanaTheme, isHorizontal: boolean) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme, isHorizontal: boolean) => {
|
||||||
const trackColor = theme.isLight ? theme.colors.gray5 : theme.colors.dark6;
|
const trackColor = theme.isLight ? theme.palette.gray5 : theme.palette.dark6;
|
||||||
const container = isHorizontal
|
const container = isHorizontal
|
||||||
? css`
|
? css`
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -39,28 +39,28 @@ const getStyles = stylesFactory((theme: GrafanaTheme, isHorizontal: boolean) =>
|
|||||||
margin-top: -10px;
|
margin-top: -10px;
|
||||||
}
|
}
|
||||||
.rc-slider-handle {
|
.rc-slider-handle {
|
||||||
border: solid 2px ${theme.colors.blue77};
|
border: solid 2px ${theme.palette.blue77};
|
||||||
background-color: ${theme.colors.blue77};
|
background-color: ${theme.palette.blue77};
|
||||||
}
|
}
|
||||||
.rc-slider-handle:hover {
|
.rc-slider-handle:hover {
|
||||||
border-color: ${theme.colors.blue77};
|
border-color: ${theme.palette.blue77};
|
||||||
}
|
}
|
||||||
.rc-slider-handle:focus {
|
.rc-slider-handle:focus {
|
||||||
border-color: ${theme.colors.blue77};
|
border-color: ${theme.palette.blue77};
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
.rc-slider-handle:active {
|
.rc-slider-handle:active {
|
||||||
border-color: ${theme.colors.blue77};
|
border-color: ${theme.palette.blue77};
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
.rc-slider-handle-click-focused:focus {
|
.rc-slider-handle-click-focused:focus {
|
||||||
border-color: ${theme.colors.blue77};
|
border-color: ${theme.palette.blue77};
|
||||||
}
|
}
|
||||||
.rc-slider-dot-active {
|
.rc-slider-dot-active {
|
||||||
border-color: ${theme.colors.blue77};
|
border-color: ${theme.palette.blue77};
|
||||||
}
|
}
|
||||||
.rc-slider-track {
|
.rc-slider-track {
|
||||||
background-color: ${theme.colors.blue77};
|
background-color: ${theme.palette.blue77};
|
||||||
}
|
}
|
||||||
.rc-slider-rail {
|
.rc-slider-rail {
|
||||||
background-color: ${trackColor};
|
background-color: ${trackColor};
|
||||||
|
@ -19,10 +19,10 @@ export interface TableStyles {
|
|||||||
|
|
||||||
export const getTableStyles = stylesFactory(
|
export const getTableStyles = stylesFactory(
|
||||||
(theme: GrafanaTheme): TableStyles => {
|
(theme: GrafanaTheme): TableStyles => {
|
||||||
const colors = theme.colors;
|
const palette = theme.palette;
|
||||||
const headerBg = colors.panelBorder;
|
const headerBg = theme.colors.panelBorder;
|
||||||
const headerBorderColor = theme.isLight ? colors.gray70 : colors.gray05;
|
const headerBorderColor = theme.isLight ? palette.gray70 : palette.gray05;
|
||||||
const resizerColor = theme.isLight ? colors.blue77 : colors.blue95;
|
const resizerColor = theme.isLight ? palette.blue77 : palette.blue95;
|
||||||
const padding = 6;
|
const padding = 6;
|
||||||
const lineHeight = theme.typography.lineHeight.md;
|
const lineHeight = theme.typography.lineHeight.md;
|
||||||
const bodyFontSize = 14;
|
const bodyFontSize = 14;
|
||||||
@ -51,7 +51,7 @@ export const getTableStyles = stylesFactory(
|
|||||||
padding: ${padding}px 10px;
|
padding: ${padding}px 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
color: ${colors.blue};
|
color: ${palette.blue};
|
||||||
border-right: 1px solid ${headerBorderColor};
|
border-right: 1px solid ${headerBorderColor};
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
|
@ -38,8 +38,8 @@ const getTabStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
activeStyle: css`
|
activeStyle: css`
|
||||||
border-color: ${colors.orange} ${colors.pageHeaderBorder} transparent;
|
border-color: ${theme.palette.orange} ${colors.pageHeaderBorder} transparent;
|
||||||
background: ${colors.pageBg};
|
background: ${colors.bodyBg};
|
||||||
color: ${colors.link};
|
color: ${colors.link};
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
@ -38,7 +38,7 @@ const getTagStyles = (theme: GrafanaTheme, name: string) => {
|
|||||||
line-height: ${theme.typography.lineHeight.xs};
|
line-height: ${theme.typography.lineHeight.xs};
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
background-color: ${color};
|
background-color: ${color};
|
||||||
color: ${theme.colors.white};
|
color: ${theme.palette.white};
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
padding: 3px 6px;
|
padding: 3px 6px;
|
||||||
|
@ -16,7 +16,7 @@ const getStyles = stylesFactory(({ theme, name }: { theme: GrafanaTheme; name: s
|
|||||||
return {
|
return {
|
||||||
itemStyle: css`
|
itemStyle: css`
|
||||||
background-color: ${color};
|
background-color: ${color};
|
||||||
color: ${theme.colors.white};
|
color: ${theme.palette.white};
|
||||||
border: 1px solid ${borderColor};
|
border: 1px solid ${borderColor};
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
padding: 3px 6px;
|
padding: 3px 6px;
|
||||||
|
@ -34,7 +34,7 @@ const getTextAreaStyle = stylesFactory((theme: GrafanaTheme, invalid = false) =>
|
|||||||
border-radius: ${theme.border.radius.sm};
|
border-radius: ${theme.border.radius.sm};
|
||||||
padding: ${theme.spacing.formSpacingBase / 4}px ${theme.spacing.formSpacingBase}px;
|
padding: ${theme.spacing.formSpacingBase / 4}px ${theme.spacing.formSpacingBase}px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-color: ${invalid ? theme.colors.redBase : theme.colors.formInputBorder};
|
border-color: ${invalid ? theme.palette.redBase : theme.colors.formInputBorder};
|
||||||
`
|
`
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
@ -0,0 +1,76 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { css, cx } from 'emotion';
|
||||||
|
import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
|
||||||
|
import { useTheme } from '../../themes/ThemeContext';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: 'General/ThemeColors',
|
||||||
|
component: () => {},
|
||||||
|
decorators: [withCenteredStory],
|
||||||
|
parameters: {
|
||||||
|
docs: {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
interface DemoElement {
|
||||||
|
name: string;
|
||||||
|
bg: string;
|
||||||
|
border?: string;
|
||||||
|
textColor?: string;
|
||||||
|
child?: DemoElement;
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderElement(el: DemoElement) {
|
||||||
|
const style = cx(
|
||||||
|
css`
|
||||||
|
padding: 36px;
|
||||||
|
background: ${el.bg};
|
||||||
|
`,
|
||||||
|
el.border
|
||||||
|
? css`
|
||||||
|
border: 1px solid ${el.border};
|
||||||
|
`
|
||||||
|
: null
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={style}>
|
||||||
|
<div
|
||||||
|
className={css`
|
||||||
|
padding: 8px;
|
||||||
|
`}
|
||||||
|
>
|
||||||
|
{el.name}
|
||||||
|
</div>
|
||||||
|
{el.child && renderElement(el.child)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const BackgroundsAndBorders = () => {
|
||||||
|
const theme = useTheme();
|
||||||
|
|
||||||
|
const lvl1 = {
|
||||||
|
name: 'dashbord background',
|
||||||
|
bg: theme.colors.dashboardBg,
|
||||||
|
child: {
|
||||||
|
name: 'colors.bg1',
|
||||||
|
bg: theme.colors.bg1,
|
||||||
|
border: theme.colors.border1,
|
||||||
|
child: {
|
||||||
|
name:
|
||||||
|
'colors.bg2 background used for elements placed on colors.bg1. Using colors.border1 should be used on elements placed ontop of bg1',
|
||||||
|
bg: theme.colors.bg2,
|
||||||
|
border: theme.colors.border2,
|
||||||
|
child: {
|
||||||
|
name:
|
||||||
|
'colors.bg3 background used for elements placed on colors.bg2 with colors.border2 used for elements placed on bg2',
|
||||||
|
bg: theme.colors.bg3,
|
||||||
|
border: theme.colors.border2,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return <div>{renderElement(lvl1)}</div>;
|
||||||
|
};
|
@ -2,7 +2,7 @@ import React, { FC } from 'react';
|
|||||||
import RcTimePicker from 'rc-time-picker';
|
import RcTimePicker from 'rc-time-picker';
|
||||||
import { css, cx } from 'emotion';
|
import { css, cx } from 'emotion';
|
||||||
import { dateTime, DateTime, dateTimeAsMoment, GrafanaTheme } from '@grafana/data';
|
import { dateTime, DateTime, dateTimeAsMoment, GrafanaTheme } from '@grafana/data';
|
||||||
import { useTheme, Icon, selectThemeVariant as stv } from '../../index';
|
import { useTheme, Icon } from '../../index';
|
||||||
import { stylesFactory } from '../../themes';
|
import { stylesFactory } from '../../themes';
|
||||||
import { inputSizes, getFocusCss } from '../Forms/commonStyles';
|
import { inputSizes, getFocusCss } from '../Forms/commonStyles';
|
||||||
import { FormInputSize } from '../Forms/types';
|
import { FormInputSize } from '../Forms/types';
|
||||||
@ -16,9 +16,9 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const bgColor = stv({ light: theme.colors.white, dark: theme.colors.formInputBg }, theme.type);
|
const bgColor = theme.colors.formInputBg;
|
||||||
const menuShadowColor = stv({ light: theme.colors.gray4, dark: theme.colors.black }, theme.type);
|
const menuShadowColor = theme.colors.dropdownShadow;
|
||||||
const optionBgHover = stv({ light: theme.colors.gray7, dark: theme.colors.gray10 }, theme.type);
|
const optionBgHover = theme.colors.dropdownOptionHoverBg;
|
||||||
const borderRadius = theme.border.radius.sm;
|
const borderRadius = theme.border.radius.sm;
|
||||||
const borderColor = theme.colors.formInputBorder;
|
const borderColor = theme.colors.formInputBorder;
|
||||||
return {
|
return {
|
||||||
@ -40,7 +40,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
outline-width: 2px;
|
outline-width: 2px;
|
||||||
&.rc-time-picker-panel-select-option-selected {
|
&.rc-time-picker-panel-select-option-selected {
|
||||||
background-color: inherit;
|
background-color: inherit;
|
||||||
border: 1px solid ${theme.colors.orange};
|
border: 1px solid ${theme.palette.orange};
|
||||||
border-radius: ${borderRadius};
|
border-radius: ${borderRadius};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ const getLabelStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
`,
|
`,
|
||||||
utc: css`
|
utc: css`
|
||||||
color: ${theme.colors.orange};
|
color: ${theme.palette.orange};
|
||||||
font-size: 75%;
|
font-size: 75%;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
font-weight: ${theme.typography.weight.semibold};
|
font-weight: ${theme.typography.weight.semibold};
|
||||||
|
@ -109,7 +109,7 @@ const getBodyStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
.react-calendar__month-view__weekdays {
|
.react-calendar__month-view__weekdays {
|
||||||
background-color: inherit;
|
background-color: inherit;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: ${theme.colors.blueShade};
|
color: ${theme.palette.blueShade};
|
||||||
|
|
||||||
abbr {
|
abbr {
|
||||||
border: 0;
|
border: 0;
|
||||||
@ -139,9 +139,9 @@ const getBodyStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
|
|
||||||
.react-calendar__tile--active,
|
.react-calendar__tile--active,
|
||||||
.react-calendar__tile--active:hover {
|
.react-calendar__tile--active:hover {
|
||||||
color: ${theme.colors.white};
|
color: ${theme.palette.white};
|
||||||
font-weight: ${theme.typography.weight.semibold};
|
font-weight: ${theme.typography.weight.semibold};
|
||||||
background: ${theme.colors.blue95};
|
background: ${theme.palette.blue95};
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border: 0px;
|
border: 0px;
|
||||||
}
|
}
|
||||||
@ -150,12 +150,12 @@ const getBodyStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
.react-calendar__tile--rangeStart {
|
.react-calendar__tile--rangeStart {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 0px;
|
border: 0px;
|
||||||
color: ${theme.colors.white};
|
color: ${theme.palette.white};
|
||||||
font-weight: ${theme.typography.weight.semibold};
|
font-weight: ${theme.typography.weight.semibold};
|
||||||
background: ${theme.colors.blue95};
|
background: ${theme.palette.blue95};
|
||||||
|
|
||||||
abbr {
|
abbr {
|
||||||
background-color: ${theme.colors.blue77};
|
background-color: ${theme.palette.blue77};
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
display: block;
|
display: block;
|
||||||
padding-top: 2px;
|
padding-top: 2px;
|
||||||
|
@ -6,8 +6,8 @@ import { useTheme, stylesFactory, selectThemeVariant } from '../../../themes';
|
|||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const background = selectThemeVariant(
|
const background = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray7,
|
light: theme.palette.gray7,
|
||||||
dark: theme.colors.dark3,
|
dark: theme.palette.dark3,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
exports[`TimePickerContent renders correctly in full screen 1`] = `
|
exports[`TimePickerContent renders correctly in full screen 1`] = `
|
||||||
<div
|
<div
|
||||||
className="css-1fbt695"
|
className="css-1l5oyux"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="css-13dsoi7"
|
className="css-13dsoi7"
|
||||||
@ -93,7 +93,7 @@ exports[`TimePickerContent renders correctly in full screen 1`] = `
|
|||||||
|
|
||||||
exports[`TimePickerContent renders correctly in narrow screen 1`] = `
|
exports[`TimePickerContent renders correctly in narrow screen 1`] = `
|
||||||
<div
|
<div
|
||||||
className="css-1fbt695"
|
className="css-1l5oyux"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="css-13dsoi7"
|
className="css-13dsoi7"
|
||||||
@ -184,7 +184,7 @@ exports[`TimePickerContent renders correctly in narrow screen 1`] = `
|
|||||||
|
|
||||||
exports[`TimePickerContent renders recent absolute ranges correctly 1`] = `
|
exports[`TimePickerContent renders recent absolute ranges correctly 1`] = `
|
||||||
<div
|
<div
|
||||||
className="css-1fbt695"
|
className="css-1l5oyux"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="css-13dsoi7"
|
className="css-13dsoi7"
|
||||||
|
@ -5,29 +5,17 @@ export const getThemeColors = (theme: GrafanaTheme) => {
|
|||||||
return {
|
return {
|
||||||
border: selectThemeVariant(
|
border: selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray4,
|
light: theme.palette.gray4,
|
||||||
dark: theme.colors.gray25,
|
dark: theme.palette.gray25,
|
||||||
},
|
|
||||||
theme.type
|
|
||||||
),
|
|
||||||
background: selectThemeVariant(
|
|
||||||
{
|
|
||||||
dark: theme.colors.dark2,
|
|
||||||
light: theme.background.dropdown,
|
|
||||||
},
|
|
||||||
theme.type
|
|
||||||
),
|
|
||||||
shadow: selectThemeVariant(
|
|
||||||
{
|
|
||||||
light: theme.colors.gray85,
|
|
||||||
dark: theme.colors.black,
|
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
),
|
),
|
||||||
|
background: theme.colors.dropdownBg,
|
||||||
|
shadow: theme.colors.dropdownShadow,
|
||||||
formBackground: selectThemeVariant(
|
formBackground: selectThemeVariant(
|
||||||
{
|
{
|
||||||
dark: theme.colors.gray15,
|
dark: theme.palette.gray15,
|
||||||
light: theme.colors.gray98,
|
light: theme.palette.gray98,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
),
|
),
|
||||||
|
@ -50,12 +50,6 @@ exports[`TimePicker renders buttons correctly 1`] = `
|
|||||||
onZoom={[Function]}
|
onZoom={[Function]}
|
||||||
theme={
|
theme={
|
||||||
Object {
|
Object {
|
||||||
"background": Object {
|
|
||||||
"dropdown": "#1f1f20",
|
|
||||||
"pageHeader": "linear-gradient(90deg, #292a2d, #000000)",
|
|
||||||
"scrollbar": "#343436",
|
|
||||||
"scrollbar2": "#343436",
|
|
||||||
},
|
|
||||||
"border": Object {
|
"border": Object {
|
||||||
"radius": Object {
|
"radius": Object {
|
||||||
"lg": "5px",
|
"lg": "5px",
|
||||||
@ -74,32 +68,16 @@ exports[`TimePicker renders buttons correctly 1`] = `
|
|||||||
"xs": "0",
|
"xs": "0",
|
||||||
},
|
},
|
||||||
"colors": Object {
|
"colors": Object {
|
||||||
"black": "#000000",
|
"bg1": "#141619",
|
||||||
"blue": "#33b5e5",
|
"bg2": "#202226",
|
||||||
"blue77": "#1f60c4",
|
"bg3": "#343b40",
|
||||||
"blue85": "#3274d9",
|
"bodyBg": "#141619",
|
||||||
"blue95": "#5794f2",
|
"border1": "#202226",
|
||||||
"blueBase": "#3274d9",
|
"border2": "#343b40",
|
||||||
"blueFaint": "#041126",
|
"dashboardBg": "#0b0c0e",
|
||||||
"blueLight": "#5794f2",
|
"dropdownBg": "#0b0c0e",
|
||||||
"blueShade": "#1f60c4",
|
"dropdownOptionHoverBg": "#202226",
|
||||||
"body": "#d8d9da",
|
"dropdownShadow": "#000000",
|
||||||
"bodyBg": "#0b0c0e",
|
|
||||||
"brandDanger": "#e02f44",
|
|
||||||
"brandPrimary": "#eb7b18",
|
|
||||||
"brandSuccess": "#299c46",
|
|
||||||
"brandWarning": "#eb7b18",
|
|
||||||
"critical": "#e02f44",
|
|
||||||
"dark1": "#141414",
|
|
||||||
"dark10": "#424345",
|
|
||||||
"dark2": "#161719",
|
|
||||||
"dark3": "#1f1f20",
|
|
||||||
"dark4": "#212124",
|
|
||||||
"dark5": "#222426",
|
|
||||||
"dark6": "#262628",
|
|
||||||
"dark7": "#292a2d",
|
|
||||||
"dark8": "#2f2f32",
|
|
||||||
"dark9": "#343436",
|
|
||||||
"formCheckboxBg": "#222426",
|
"formCheckboxBg": "#222426",
|
||||||
"formCheckboxBgChecked": "#5794f2",
|
"formCheckboxBgChecked": "#5794f2",
|
||||||
"formCheckboxBgCheckedHover": "#3274d9",
|
"formCheckboxBgCheckedHover": "#3274d9",
|
||||||
@ -127,6 +105,54 @@ exports[`TimePicker renders buttons correctly 1`] = `
|
|||||||
"formSwitchDot": "#202226",
|
"formSwitchDot": "#202226",
|
||||||
"formValidationMessageBg": "#e02f44",
|
"formValidationMessageBg": "#e02f44",
|
||||||
"formValidationMessageText": "#ffffff",
|
"formValidationMessageText": "#ffffff",
|
||||||
|
"headingColor": "#d8d9da",
|
||||||
|
"link": "#d8d9da",
|
||||||
|
"linkDisabled": "#8e8e8e",
|
||||||
|
"linkExternal": "#33b5e5",
|
||||||
|
"linkHover": "#ffffff",
|
||||||
|
"pageHeaderBg": "#202226",
|
||||||
|
"pageHeaderBorder": "#202226",
|
||||||
|
"panelBg": "#141619",
|
||||||
|
"panelBorder": "#202226",
|
||||||
|
"text": "#c7d0d9",
|
||||||
|
"textEmphasis": "#ececec",
|
||||||
|
"textFaint": "#222426",
|
||||||
|
"textStrong": "#ffffff",
|
||||||
|
"textWeak": "#8e8e8e",
|
||||||
|
},
|
||||||
|
"height": Object {
|
||||||
|
"lg": "48px",
|
||||||
|
"md": "32px",
|
||||||
|
"sm": "24px",
|
||||||
|
},
|
||||||
|
"isDark": true,
|
||||||
|
"isLight": false,
|
||||||
|
"name": "Grafana Dark",
|
||||||
|
"palette": Object {
|
||||||
|
"black": "#000000",
|
||||||
|
"blue": "#33b5e5",
|
||||||
|
"blue77": "#1f60c4",
|
||||||
|
"blue85": "#3274d9",
|
||||||
|
"blue95": "#5794f2",
|
||||||
|
"blueBase": "#3274d9",
|
||||||
|
"blueFaint": "#041126",
|
||||||
|
"blueLight": "#5794f2",
|
||||||
|
"blueShade": "#1f60c4",
|
||||||
|
"brandDanger": "#e02f44",
|
||||||
|
"brandPrimary": "#eb7b18",
|
||||||
|
"brandSuccess": "#299c46",
|
||||||
|
"brandWarning": "#eb7b18",
|
||||||
|
"critical": "#e02f44",
|
||||||
|
"dark1": "#141414",
|
||||||
|
"dark10": "#424345",
|
||||||
|
"dark2": "#161719",
|
||||||
|
"dark3": "#1f1f20",
|
||||||
|
"dark4": "#212124",
|
||||||
|
"dark5": "#222426",
|
||||||
|
"dark6": "#262628",
|
||||||
|
"dark7": "#292a2d",
|
||||||
|
"dark8": "#2f2f32",
|
||||||
|
"dark9": "#343436",
|
||||||
"gray05": "#0b0c0e",
|
"gray05": "#0b0c0e",
|
||||||
"gray1": "#555555",
|
"gray1": "#555555",
|
||||||
"gray10": "#141619",
|
"gray10": "#141619",
|
||||||
@ -147,20 +173,9 @@ exports[`TimePicker renders buttons correctly 1`] = `
|
|||||||
"grayBlue": "#212327",
|
"grayBlue": "#212327",
|
||||||
"greenBase": "#299c46",
|
"greenBase": "#299c46",
|
||||||
"greenShade": "#23843b",
|
"greenShade": "#23843b",
|
||||||
"headingColor": "#d8d9da",
|
|
||||||
"inputBlack": "#0b0c0e",
|
|
||||||
"link": "#d8d9da",
|
|
||||||
"linkDisabled": "#8e8e8e",
|
|
||||||
"linkExternal": "#33b5e5",
|
|
||||||
"linkHover": "#ffffff",
|
|
||||||
"online": "#299c46",
|
"online": "#299c46",
|
||||||
"orange": "#eb7b18",
|
"orange": "#eb7b18",
|
||||||
"orangeDark": "#ff780a",
|
"orangeDark": "#ff780a",
|
||||||
"pageBg": "#141619",
|
|
||||||
"pageHeaderBg": "#202226",
|
|
||||||
"pageHeaderBorder": "#202226",
|
|
||||||
"panelBg": "#141619",
|
|
||||||
"panelBorder": "#202226",
|
|
||||||
"purple": "#9933cc",
|
"purple": "#9933cc",
|
||||||
"queryGreen": "#74e680",
|
"queryGreen": "#74e680",
|
||||||
"queryKeyword": "#66d9ef",
|
"queryKeyword": "#66d9ef",
|
||||||
@ -171,29 +186,13 @@ exports[`TimePicker renders buttons correctly 1`] = `
|
|||||||
"red88": "#e02f44",
|
"red88": "#e02f44",
|
||||||
"redBase": "#e02f44",
|
"redBase": "#e02f44",
|
||||||
"redShade": "#c4162a",
|
"redShade": "#c4162a",
|
||||||
"text": "#c7d0d9",
|
|
||||||
"textEmphasis": "#ececec",
|
|
||||||
"textFaint": "#222426",
|
|
||||||
"textStrong": "#ffffff",
|
|
||||||
"textWeak": "#8e8e8e",
|
|
||||||
"variable": "#32d1df",
|
"variable": "#32d1df",
|
||||||
"warn": "#f79520",
|
"warn": "#f79520",
|
||||||
"white": "#ffffff",
|
"white": "#ffffff",
|
||||||
"yellow": "#ecbb13",
|
"yellow": "#ecbb13",
|
||||||
},
|
},
|
||||||
"height": Object {
|
|
||||||
"lg": "48px",
|
|
||||||
"md": "32px",
|
|
||||||
"sm": "24px",
|
|
||||||
},
|
|
||||||
"isDark": true,
|
|
||||||
"isLight": false,
|
|
||||||
"name": "Grafana Dark",
|
|
||||||
"panelHeaderHeight": 28,
|
"panelHeaderHeight": 28,
|
||||||
"panelPadding": 8,
|
"panelPadding": 8,
|
||||||
"shadow": Object {
|
|
||||||
"pageHeader": "inset 0px -4px 14px #1f1f20",
|
|
||||||
},
|
|
||||||
"spacing": Object {
|
"spacing": Object {
|
||||||
"d": "14px",
|
"d": "14px",
|
||||||
"formButtonHeight": 32,
|
"formButtonHeight": 32,
|
||||||
@ -366,12 +365,6 @@ exports[`TimePicker renders content correctly after beeing open 1`] = `
|
|||||||
onZoom={[Function]}
|
onZoom={[Function]}
|
||||||
theme={
|
theme={
|
||||||
Object {
|
Object {
|
||||||
"background": Object {
|
|
||||||
"dropdown": "#1f1f20",
|
|
||||||
"pageHeader": "linear-gradient(90deg, #292a2d, #000000)",
|
|
||||||
"scrollbar": "#343436",
|
|
||||||
"scrollbar2": "#343436",
|
|
||||||
},
|
|
||||||
"border": Object {
|
"border": Object {
|
||||||
"radius": Object {
|
"radius": Object {
|
||||||
"lg": "5px",
|
"lg": "5px",
|
||||||
@ -390,32 +383,16 @@ exports[`TimePicker renders content correctly after beeing open 1`] = `
|
|||||||
"xs": "0",
|
"xs": "0",
|
||||||
},
|
},
|
||||||
"colors": Object {
|
"colors": Object {
|
||||||
"black": "#000000",
|
"bg1": "#141619",
|
||||||
"blue": "#33b5e5",
|
"bg2": "#202226",
|
||||||
"blue77": "#1f60c4",
|
"bg3": "#343b40",
|
||||||
"blue85": "#3274d9",
|
"bodyBg": "#141619",
|
||||||
"blue95": "#5794f2",
|
"border1": "#202226",
|
||||||
"blueBase": "#3274d9",
|
"border2": "#343b40",
|
||||||
"blueFaint": "#041126",
|
"dashboardBg": "#0b0c0e",
|
||||||
"blueLight": "#5794f2",
|
"dropdownBg": "#0b0c0e",
|
||||||
"blueShade": "#1f60c4",
|
"dropdownOptionHoverBg": "#202226",
|
||||||
"body": "#d8d9da",
|
"dropdownShadow": "#000000",
|
||||||
"bodyBg": "#0b0c0e",
|
|
||||||
"brandDanger": "#e02f44",
|
|
||||||
"brandPrimary": "#eb7b18",
|
|
||||||
"brandSuccess": "#299c46",
|
|
||||||
"brandWarning": "#eb7b18",
|
|
||||||
"critical": "#e02f44",
|
|
||||||
"dark1": "#141414",
|
|
||||||
"dark10": "#424345",
|
|
||||||
"dark2": "#161719",
|
|
||||||
"dark3": "#1f1f20",
|
|
||||||
"dark4": "#212124",
|
|
||||||
"dark5": "#222426",
|
|
||||||
"dark6": "#262628",
|
|
||||||
"dark7": "#292a2d",
|
|
||||||
"dark8": "#2f2f32",
|
|
||||||
"dark9": "#343436",
|
|
||||||
"formCheckboxBg": "#222426",
|
"formCheckboxBg": "#222426",
|
||||||
"formCheckboxBgChecked": "#5794f2",
|
"formCheckboxBgChecked": "#5794f2",
|
||||||
"formCheckboxBgCheckedHover": "#3274d9",
|
"formCheckboxBgCheckedHover": "#3274d9",
|
||||||
@ -443,6 +420,54 @@ exports[`TimePicker renders content correctly after beeing open 1`] = `
|
|||||||
"formSwitchDot": "#202226",
|
"formSwitchDot": "#202226",
|
||||||
"formValidationMessageBg": "#e02f44",
|
"formValidationMessageBg": "#e02f44",
|
||||||
"formValidationMessageText": "#ffffff",
|
"formValidationMessageText": "#ffffff",
|
||||||
|
"headingColor": "#d8d9da",
|
||||||
|
"link": "#d8d9da",
|
||||||
|
"linkDisabled": "#8e8e8e",
|
||||||
|
"linkExternal": "#33b5e5",
|
||||||
|
"linkHover": "#ffffff",
|
||||||
|
"pageHeaderBg": "#202226",
|
||||||
|
"pageHeaderBorder": "#202226",
|
||||||
|
"panelBg": "#141619",
|
||||||
|
"panelBorder": "#202226",
|
||||||
|
"text": "#c7d0d9",
|
||||||
|
"textEmphasis": "#ececec",
|
||||||
|
"textFaint": "#222426",
|
||||||
|
"textStrong": "#ffffff",
|
||||||
|
"textWeak": "#8e8e8e",
|
||||||
|
},
|
||||||
|
"height": Object {
|
||||||
|
"lg": "48px",
|
||||||
|
"md": "32px",
|
||||||
|
"sm": "24px",
|
||||||
|
},
|
||||||
|
"isDark": true,
|
||||||
|
"isLight": false,
|
||||||
|
"name": "Grafana Dark",
|
||||||
|
"palette": Object {
|
||||||
|
"black": "#000000",
|
||||||
|
"blue": "#33b5e5",
|
||||||
|
"blue77": "#1f60c4",
|
||||||
|
"blue85": "#3274d9",
|
||||||
|
"blue95": "#5794f2",
|
||||||
|
"blueBase": "#3274d9",
|
||||||
|
"blueFaint": "#041126",
|
||||||
|
"blueLight": "#5794f2",
|
||||||
|
"blueShade": "#1f60c4",
|
||||||
|
"brandDanger": "#e02f44",
|
||||||
|
"brandPrimary": "#eb7b18",
|
||||||
|
"brandSuccess": "#299c46",
|
||||||
|
"brandWarning": "#eb7b18",
|
||||||
|
"critical": "#e02f44",
|
||||||
|
"dark1": "#141414",
|
||||||
|
"dark10": "#424345",
|
||||||
|
"dark2": "#161719",
|
||||||
|
"dark3": "#1f1f20",
|
||||||
|
"dark4": "#212124",
|
||||||
|
"dark5": "#222426",
|
||||||
|
"dark6": "#262628",
|
||||||
|
"dark7": "#292a2d",
|
||||||
|
"dark8": "#2f2f32",
|
||||||
|
"dark9": "#343436",
|
||||||
"gray05": "#0b0c0e",
|
"gray05": "#0b0c0e",
|
||||||
"gray1": "#555555",
|
"gray1": "#555555",
|
||||||
"gray10": "#141619",
|
"gray10": "#141619",
|
||||||
@ -463,20 +488,9 @@ exports[`TimePicker renders content correctly after beeing open 1`] = `
|
|||||||
"grayBlue": "#212327",
|
"grayBlue": "#212327",
|
||||||
"greenBase": "#299c46",
|
"greenBase": "#299c46",
|
||||||
"greenShade": "#23843b",
|
"greenShade": "#23843b",
|
||||||
"headingColor": "#d8d9da",
|
|
||||||
"inputBlack": "#0b0c0e",
|
|
||||||
"link": "#d8d9da",
|
|
||||||
"linkDisabled": "#8e8e8e",
|
|
||||||
"linkExternal": "#33b5e5",
|
|
||||||
"linkHover": "#ffffff",
|
|
||||||
"online": "#299c46",
|
"online": "#299c46",
|
||||||
"orange": "#eb7b18",
|
"orange": "#eb7b18",
|
||||||
"orangeDark": "#ff780a",
|
"orangeDark": "#ff780a",
|
||||||
"pageBg": "#141619",
|
|
||||||
"pageHeaderBg": "#202226",
|
|
||||||
"pageHeaderBorder": "#202226",
|
|
||||||
"panelBg": "#141619",
|
|
||||||
"panelBorder": "#202226",
|
|
||||||
"purple": "#9933cc",
|
"purple": "#9933cc",
|
||||||
"queryGreen": "#74e680",
|
"queryGreen": "#74e680",
|
||||||
"queryKeyword": "#66d9ef",
|
"queryKeyword": "#66d9ef",
|
||||||
@ -487,29 +501,13 @@ exports[`TimePicker renders content correctly after beeing open 1`] = `
|
|||||||
"red88": "#e02f44",
|
"red88": "#e02f44",
|
||||||
"redBase": "#e02f44",
|
"redBase": "#e02f44",
|
||||||
"redShade": "#c4162a",
|
"redShade": "#c4162a",
|
||||||
"text": "#c7d0d9",
|
|
||||||
"textEmphasis": "#ececec",
|
|
||||||
"textFaint": "#222426",
|
|
||||||
"textStrong": "#ffffff",
|
|
||||||
"textWeak": "#8e8e8e",
|
|
||||||
"variable": "#32d1df",
|
"variable": "#32d1df",
|
||||||
"warn": "#f79520",
|
"warn": "#f79520",
|
||||||
"white": "#ffffff",
|
"white": "#ffffff",
|
||||||
"yellow": "#ecbb13",
|
"yellow": "#ecbb13",
|
||||||
},
|
},
|
||||||
"height": Object {
|
|
||||||
"lg": "48px",
|
|
||||||
"md": "32px",
|
|
||||||
"sm": "24px",
|
|
||||||
},
|
|
||||||
"isDark": true,
|
|
||||||
"isLight": false,
|
|
||||||
"name": "Grafana Dark",
|
|
||||||
"panelHeaderHeight": 28,
|
"panelHeaderHeight": 28,
|
||||||
"panelPadding": 8,
|
"panelPadding": 8,
|
||||||
"shadow": Object {
|
|
||||||
"pageHeader": "inset 0px -4px 14px #1f1f20",
|
|
||||||
},
|
|
||||||
"spacing": Object {
|
"spacing": Object {
|
||||||
"d": "14px",
|
"d": "14px",
|
||||||
"formButtonHeight": 32,
|
"formButtonHeight": 32,
|
||||||
|
@ -138,7 +138,7 @@ const FilterPill: React.FC<FilterPillProps> = ({ label, selected, onClick }) =>
|
|||||||
className={css`
|
className={css`
|
||||||
padding: ${theme.spacing.xxs} ${theme.spacing.sm};
|
padding: ${theme.spacing.xxs} ${theme.spacing.sm};
|
||||||
color: white;
|
color: white;
|
||||||
background: ${selected ? theme.colors.blueLight : theme.colors.blueShade};
|
background: ${selected ? theme.palette.blueLight : theme.palette.blueShade};
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -138,7 +138,7 @@ const FilterPill: React.FC<FilterPillProps> = ({ label, selected, onClick }) =>
|
|||||||
className={css`
|
className={css`
|
||||||
padding: ${theme.spacing.xxs} ${theme.spacing.sm};
|
padding: ${theme.spacing.xxs} ${theme.spacing.sm};
|
||||||
color: white;
|
color: white;
|
||||||
background: ${selected ? theme.colors.blueLight : theme.colors.blueShade};
|
background: ${selected ? theme.palette.blueLight : theme.palette.blueShade};
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -159,8 +159,8 @@ const getFieldNameStyles = stylesFactory((theme: GrafanaTheme) => ({
|
|||||||
width: 35%;
|
width: 35%;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background-color: ${theme.isDark ? theme.colors.grayBlue : theme.colors.gray6};
|
background-color: ${theme.isDark ? theme.palette.grayBlue : theme.palette.gray6};
|
||||||
border: 1px solid ${theme.isDark ? theme.colors.dark6 : theme.colors.gray5};
|
border: 1px solid ${theme.isDark ? theme.palette.dark6 : theme.palette.gray5};
|
||||||
`,
|
`,
|
||||||
right: css`
|
right: css`
|
||||||
width: 65%;
|
width: 65%;
|
||||||
|
@ -11,16 +11,16 @@ const getStyles = (theme: GrafanaTheme, height: number, visible: boolean) => {
|
|||||||
padding: ${theme.spacing.sm} ${theme.spacing.sm} ${theme.spacing.sm} ${theme.spacing.md};
|
padding: ${theme.spacing.sm} ${theme.spacing.sm} ${theme.spacing.sm} ${theme.spacing.md};
|
||||||
border-radius: ${theme.border.radius.md};
|
border-radius: ${theme.border.radius.md};
|
||||||
border: ${selectThemeVariant(
|
border: ${selectThemeVariant(
|
||||||
{ light: `solid 1px ${theme.colors.gray5}`, dark: `solid 1px ${theme.colors.dark1}` },
|
{ light: `solid 1px ${theme.palette.gray5}`, dark: `solid 1px ${theme.palette.dark1}` },
|
||||||
theme.type
|
theme.type
|
||||||
)};
|
)};
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
outline: none;
|
outline: none;
|
||||||
background: ${selectThemeVariant({ light: theme.colors.white, dark: theme.colors.dark4 }, theme.type)};
|
background: ${selectThemeVariant({ light: theme.palette.white, dark: theme.palette.dark4 }, theme.type)};
|
||||||
color: ${theme.colors.text};
|
color: ${theme.colors.text};
|
||||||
box-shadow: ${selectThemeVariant(
|
box-shadow: ${selectThemeVariant(
|
||||||
{ light: `0 5px 10px 0 ${theme.colors.gray5}`, dark: `0 5px 10px 0 ${theme.colors.black}` },
|
{ light: `0 5px 10px 0 ${theme.palette.gray5}`, dark: `0 5px 10px 0 ${theme.palette.black}` },
|
||||||
theme.type
|
theme.type
|
||||||
)};
|
)};
|
||||||
visibility: ${visible === true ? 'visible' : 'hidden'};
|
visibility: ${visible === true ? 'visible' : 'hidden'};
|
||||||
|
@ -38,13 +38,13 @@ const getStyles = (theme: GrafanaTheme) => ({
|
|||||||
|
|
||||||
typeaheadItemSelected: css`
|
typeaheadItemSelected: css`
|
||||||
label: type-ahead-item-selected;
|
label: type-ahead-item-selected;
|
||||||
background-color: ${selectThemeVariant({ light: theme.colors.gray6, dark: theme.colors.dark9 }, theme.type)};
|
background-color: ${selectThemeVariant({ light: theme.palette.gray6, dark: theme.palette.dark9 }, theme.type)};
|
||||||
`,
|
`,
|
||||||
|
|
||||||
typeaheadItemMatch: css`
|
typeaheadItemMatch: css`
|
||||||
label: type-ahead-item-match;
|
label: type-ahead-item-match;
|
||||||
color: ${theme.colors.yellow};
|
color: ${theme.palette.yellow};
|
||||||
border-bottom: 1px solid ${theme.colors.yellow};
|
border-bottom: 1px solid ${theme.palette.yellow};
|
||||||
padding: inherit;
|
padding: inherit;
|
||||||
background: inherit;
|
background: inherit;
|
||||||
`,
|
`,
|
||||||
|
@ -12,84 +12,84 @@ $theme-name: dark;
|
|||||||
|
|
||||||
// New Colors
|
// New Colors
|
||||||
// -------------------------
|
// -------------------------
|
||||||
$blue-faint: ${theme.colors.blueFaint};
|
$blue-faint: ${theme.palette.blueFaint};
|
||||||
$blue-light: ${theme.colors.blueLight};
|
$blue-light: ${theme.palette.blueLight};
|
||||||
$blue-base: ${theme.colors.blueBase};
|
$blue-base: ${theme.palette.blueBase};
|
||||||
$blue-shade: ${theme.colors.blueShade};
|
$blue-shade: ${theme.palette.blueShade};
|
||||||
$red-base: ${theme.colors.redBase};
|
$red-base: ${theme.palette.redBase};
|
||||||
$red-shade: ${theme.colors.redShade};
|
$red-shade: ${theme.palette.redShade};
|
||||||
$green-base: ${theme.colors.greenBase};
|
$green-base: ${theme.palette.greenBase};
|
||||||
$green-shade: ${theme.colors.greenShade};
|
$green-shade: ${theme.palette.greenShade};
|
||||||
$orange-dark: ${theme.colors.orangeDark};
|
$orange-dark: ${theme.palette.orangeDark};
|
||||||
|
|
||||||
$gray98: ${theme.colors.gray98};
|
$gray98: ${theme.palette.gray98};
|
||||||
$gray95: ${theme.colors.gray95};
|
$gray95: ${theme.palette.gray95};
|
||||||
$gray85: ${theme.colors.gray85};
|
$gray85: ${theme.palette.gray85};
|
||||||
$gray70: ${theme.colors.gray70};
|
$gray70: ${theme.palette.gray70};
|
||||||
$gray60: ${theme.colors.gray60};
|
$gray60: ${theme.palette.gray60};
|
||||||
$gray33: ${theme.colors.gray33};
|
$gray33: ${theme.palette.gray33};
|
||||||
$gray25: ${theme.colors.gray25};
|
$gray25: ${theme.palette.gray25};
|
||||||
$gray15: ${theme.colors.gray15};
|
$gray15: ${theme.palette.gray15};
|
||||||
$gray10: ${theme.colors.gray10};
|
$gray10: ${theme.palette.gray10};
|
||||||
$gray05: ${theme.colors.gray05};
|
$gray05: ${theme.palette.gray05};
|
||||||
|
|
||||||
// Grays
|
// Grays
|
||||||
// -------------------------
|
// -------------------------
|
||||||
$black: ${theme.colors.black};
|
$black: ${theme.palette.black};
|
||||||
$dark-1: ${theme.colors.dark1};
|
$dark-1: ${theme.palette.dark1};
|
||||||
$dark-2: ${theme.colors.dark2};
|
$dark-2: ${theme.palette.dark2};
|
||||||
$dark-3: ${theme.colors.dark3};
|
$dark-3: ${theme.palette.dark3};
|
||||||
$dark-4: ${theme.colors.dark4};
|
$dark-4: ${theme.palette.dark4};
|
||||||
$dark-5: ${theme.colors.dark5};
|
$dark-5: ${theme.palette.dark5};
|
||||||
$dark-6: ${theme.colors.dark6};
|
$dark-6: ${theme.palette.dark6};
|
||||||
$dark-7: ${theme.colors.dark7};
|
$dark-7: ${theme.palette.dark7};
|
||||||
$dark-8: ${theme.colors.dark8};
|
$dark-8: ${theme.palette.dark8};
|
||||||
$dark-9: ${theme.colors.dark9};
|
$dark-9: ${theme.palette.dark9};
|
||||||
$dark-10: ${theme.colors.dark10};
|
$dark-10: ${theme.palette.dark10};
|
||||||
$gray-1: ${theme.colors.gray1};
|
$gray-1: ${theme.palette.gray1};
|
||||||
$gray-2: ${theme.colors.gray2};
|
$gray-2: ${theme.palette.gray2};
|
||||||
$gray-3: ${theme.colors.gray3};
|
$gray-3: ${theme.palette.gray3};
|
||||||
$gray-4: ${theme.colors.gray4};
|
$gray-4: ${theme.palette.gray4};
|
||||||
$gray-5: ${theme.colors.gray5};
|
$gray-5: ${theme.palette.gray5};
|
||||||
$gray-6: ${theme.colors.gray6};
|
$gray-6: ${theme.palette.gray6};
|
||||||
|
|
||||||
$gray-blue: ${theme.colors.grayBlue};
|
$gray-blue: ${theme.palette.grayBlue};
|
||||||
$input-black: ${theme.colors.formInputBg};
|
$input-black: ${theme.colors.formInputBg};
|
||||||
|
|
||||||
$white: ${theme.colors.white};
|
$white: ${theme.palette.white};
|
||||||
|
|
||||||
// Accent colors
|
// Accent colors
|
||||||
// -------------------------
|
// -------------------------
|
||||||
$blue: ${theme.colors.blue};
|
$blue: ${theme.palette.blue};
|
||||||
$red: $red-base;
|
$red: $red-base;
|
||||||
$yellow: ${theme.colors.yellow};
|
$yellow: ${theme.palette.yellow};
|
||||||
$orange: ${theme.colors.orange};
|
$orange: ${theme.palette.orange};
|
||||||
$purple: ${theme.colors.purple};
|
$purple: ${theme.palette.purple};
|
||||||
$variable: ${theme.colors.variable};
|
$variable: ${theme.palette.variable};
|
||||||
|
|
||||||
$brand-primary: ${theme.colors.brandPrimary};
|
$brand-primary: ${theme.palette.brandPrimary};
|
||||||
$brand-success: ${theme.colors.brandSuccess};
|
$brand-success: ${theme.palette.brandSuccess};
|
||||||
$brand-warning: ${theme.colors.brandWarning};
|
$brand-warning: ${theme.palette.brandWarning};
|
||||||
$brand-danger: ${theme.colors.brandDanger};
|
$brand-danger: ${theme.palette.brandDanger};
|
||||||
|
|
||||||
$query-red: ${theme.colors.queryRed};
|
$query-red: ${theme.palette.queryRed};
|
||||||
$query-green: ${theme.colors.queryGreen};
|
$query-green: ${theme.palette.queryGreen};
|
||||||
$query-purple: ${theme.colors.queryPurple};
|
$query-purple: ${theme.palette.queryPurple};
|
||||||
$query-orange: ${theme.colors.orange};
|
$query-orange: ${theme.palette.orange};
|
||||||
$query-keyword: ${theme.colors.queryKeyword};
|
$query-keyword: ${theme.palette.queryKeyword};
|
||||||
|
|
||||||
// Status colors
|
// Status colors
|
||||||
// -------------------------
|
// -------------------------
|
||||||
$online: ${theme.colors.online};
|
$online: ${theme.palette.online};
|
||||||
$warn: ${theme.colors.warn};
|
$warn: ${theme.palette.warn};
|
||||||
$critical: ${theme.colors.critical};
|
$critical: ${theme.palette.critical};
|
||||||
|
|
||||||
// Scaffolding
|
// Scaffolding
|
||||||
// -------------------------
|
// -------------------------
|
||||||
$body-bg: ${theme.colors.bodyBg};
|
$body-bg: ${theme.colors.bodyBg};
|
||||||
$page-bg: ${theme.colors.pageBg};
|
$page-bg: ${theme.colors.bodyBg};
|
||||||
|
$dashboard-bg: ${theme.colors.dashboardBg};
|
||||||
|
|
||||||
$body-color: ${theme.colors.body};
|
|
||||||
$text-color: ${theme.colors.text};
|
$text-color: ${theme.colors.text};
|
||||||
$text-color-strong: ${theme.colors.textStrong};
|
$text-color-strong: ${theme.colors.textStrong};
|
||||||
$text-color-weak: ${theme.colors.textWeak};
|
$text-color-weak: ${theme.colors.textWeak};
|
||||||
@ -122,7 +122,7 @@ $hr-border-color: $dark-9;
|
|||||||
// -------------------------
|
// -------------------------
|
||||||
$panel-bg: ${theme.colors.panelBg};
|
$panel-bg: ${theme.colors.panelBg};
|
||||||
$panel-border: 1px solid ${theme.colors.panelBorder};
|
$panel-border: 1px solid ${theme.colors.panelBorder};
|
||||||
$panel-header-hover-bg: ${theme.colors.gray15};
|
$panel-header-hover-bg: ${theme.colors.bg3};
|
||||||
$panel-corner: $panel-bg;
|
$panel-corner: $panel-bg;
|
||||||
|
|
||||||
// page header
|
// page header
|
||||||
@ -148,7 +148,6 @@ $card-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.
|
|||||||
// Lists
|
// Lists
|
||||||
$list-item-bg: $card-background;
|
$list-item-bg: $card-background;
|
||||||
$list-item-hover-bg: $card-background-hover;
|
$list-item-hover-bg: $card-background-hover;
|
||||||
$list-item-link-color: $text-color;
|
|
||||||
$list-item-shadow: $card-shadow;
|
$list-item-shadow: $card-shadow;
|
||||||
|
|
||||||
$empty-list-cta-bg: $gray-blue;
|
$empty-list-cta-bg: $gray-blue;
|
||||||
@ -204,13 +203,13 @@ $input-bg: $input-black;
|
|||||||
$input-bg-disabled: $dark-6;
|
$input-bg-disabled: $dark-6;
|
||||||
|
|
||||||
$input-color: ${theme.colors.formInputText};
|
$input-color: ${theme.colors.formInputText};
|
||||||
$input-border-color: ${theme.colors.gray15};
|
$input-border-color: ${theme.palette.gray15};
|
||||||
$input-box-shadow: inset 1px 0px 4px 0px rgba(150, 150, 150, 0.1);
|
$input-box-shadow: inset 1px 0px 4px 0px rgba(150, 150, 150, 0.1);
|
||||||
$input-border-focus: ${theme.colors.blue95};
|
$input-border-focus: ${theme.palette.blue95};
|
||||||
$input-box-shadow-focus: $blue-light !default;
|
$input-box-shadow-focus: $blue-light !default;
|
||||||
$input-color-placeholder: ${theme.colors.formInputPlaceholderText};
|
$input-color-placeholder: ${theme.colors.formInputPlaceholderText};
|
||||||
$input-label-bg: ${theme.colors.gray15};
|
$input-label-bg: ${theme.palette.gray15};
|
||||||
$input-label-border-color: ${theme.colors.gray15};
|
$input-label-border-color: ${theme.palette.gray15};
|
||||||
$input-color-select-arrow: $white;
|
$input-color-select-arrow: $white;
|
||||||
|
|
||||||
// Search
|
// Search
|
||||||
@ -226,12 +225,11 @@ $typeahead-selected-color: $yellow;
|
|||||||
$dropdownBackground: $panel-bg;
|
$dropdownBackground: $panel-bg;
|
||||||
$dropdownBorder: ${theme.colors.panelBorder};
|
$dropdownBorder: ${theme.colors.panelBorder};
|
||||||
$dropdownDividerTop: transparent;
|
$dropdownDividerTop: transparent;
|
||||||
$dropdownDividerBottom: ${theme.colors.gray25};
|
$dropdownDividerBottom: ${theme.palette.gray25};
|
||||||
|
|
||||||
$dropdownLinkColor: $text-color;
|
$dropdownLinkColor: $link-color;
|
||||||
$dropdownLinkColorHover: $white;
|
$dropdownLinkColorHover: $white;
|
||||||
$dropdownLinkColorActive: $white;
|
$dropdownLinkColorActive: $white;
|
||||||
|
|
||||||
$dropdownLinkBackgroundHover: $dark-9;
|
$dropdownLinkBackgroundHover: $dark-9;
|
||||||
|
|
||||||
// Horizontal forms & lists
|
// Horizontal forms & lists
|
||||||
@ -253,7 +251,7 @@ $side-menu-bg-mobile: $panel-bg;
|
|||||||
$side-menu-border: none;
|
$side-menu-border: none;
|
||||||
$side-menu-item-hover-bg: $dark-3;
|
$side-menu-item-hover-bg: $dark-3;
|
||||||
$side-menu-shadow: 0 0 20px black;
|
$side-menu-shadow: 0 0 20px black;
|
||||||
$side-menu-link-color: $link-color;
|
$side-menu-link-color: ${theme.palette.gray70};
|
||||||
|
|
||||||
// Menu dropdowns
|
// Menu dropdowns
|
||||||
// -------------------------
|
// -------------------------
|
||||||
|
@ -12,77 +12,77 @@ $theme-name: light;
|
|||||||
|
|
||||||
// New Colors
|
// New Colors
|
||||||
// -------------------------
|
// -------------------------
|
||||||
$blue-faint: ${theme.colors.blueFaint};
|
$blue-faint: ${theme.palette.blueFaint};
|
||||||
$blue-light: ${theme.colors.blueLight};
|
$blue-light: ${theme.palette.blueLight};
|
||||||
$blue-base: ${theme.colors.blueBase};
|
$blue-base: ${theme.palette.blueBase};
|
||||||
$blue-shade: ${theme.colors.blueShade};
|
$blue-shade: ${theme.palette.blueShade};
|
||||||
$red-base: ${theme.colors.redBase};
|
$red-base: ${theme.palette.redBase};
|
||||||
$red-shade: ${theme.colors.redShade};
|
$red-shade: ${theme.palette.redShade};
|
||||||
$green-base: ${theme.colors.greenBase};
|
$green-base: ${theme.palette.greenBase};
|
||||||
$green-shade: ${theme.colors.greenShade};
|
$green-shade: ${theme.palette.greenShade};
|
||||||
$orange-dark: ${theme.colors.orangeDark};
|
$orange-dark: ${theme.palette.orangeDark};
|
||||||
|
|
||||||
$gray98: ${theme.colors.gray98};
|
$gray98: ${theme.palette.gray98};
|
||||||
$gray95: ${theme.colors.gray95};
|
$gray95: ${theme.palette.gray95};
|
||||||
$gray85: ${theme.colors.gray85};
|
$gray85: ${theme.palette.gray85};
|
||||||
$gray70: ${theme.colors.gray70};
|
$gray70: ${theme.palette.gray70};
|
||||||
$gray60: ${theme.colors.gray60};
|
$gray60: ${theme.palette.gray60};
|
||||||
$gray33: ${theme.colors.gray33};
|
$gray33: ${theme.palette.gray33};
|
||||||
$gray25: ${theme.colors.gray25};
|
$gray25: ${theme.palette.gray25};
|
||||||
$gray15: ${theme.colors.gray15};
|
$gray15: ${theme.palette.gray15};
|
||||||
$gray10: ${theme.colors.gray10};
|
$gray10: ${theme.palette.gray10};
|
||||||
$gray05: ${theme.colors.gray05};
|
$gray05: ${theme.palette.gray05};
|
||||||
|
|
||||||
// Grays
|
// Grays
|
||||||
// -------------------------
|
// -------------------------
|
||||||
$black: ${theme.colors.black};
|
$black: ${theme.palette.black};
|
||||||
|
|
||||||
$dark-1: ${theme.colors.dark1};
|
$dark-1: ${theme.palette.dark1};
|
||||||
$dark-2: ${theme.colors.dark2};
|
$dark-2: ${theme.palette.dark2};
|
||||||
$dark-4: ${theme.colors.dark4};
|
$dark-4: ${theme.palette.dark4};
|
||||||
$dark-10: ${theme.colors.dark10};
|
$dark-10: ${theme.palette.dark10};
|
||||||
$gray-1: ${theme.colors.gray1};
|
$gray-1: ${theme.palette.gray1};
|
||||||
$gray-2: ${theme.colors.gray2};
|
$gray-2: ${theme.palette.gray2};
|
||||||
$gray-3: ${theme.colors.gray3};
|
$gray-3: ${theme.palette.gray3};
|
||||||
$gray-4: ${theme.colors.gray4};
|
$gray-4: ${theme.palette.gray4};
|
||||||
$gray-5: ${theme.colors.gray5};
|
$gray-5: ${theme.palette.gray5};
|
||||||
$gray-6: ${theme.colors.gray6};
|
$gray-6: ${theme.palette.gray6};
|
||||||
$gray-7: ${theme.colors.gray7};
|
$gray-7: ${theme.palette.gray7};
|
||||||
|
|
||||||
$white: ${theme.colors.white};
|
$white: ${theme.palette.white};
|
||||||
|
|
||||||
// Accent colors
|
// Accent colors
|
||||||
// -------------------------
|
// -------------------------
|
||||||
$blue: ${theme.colors.blue};
|
$blue: ${theme.palette.blue};
|
||||||
$red: $red-base;
|
$red: $red-base;
|
||||||
$yellow: ${theme.colors.yellow};
|
$yellow: ${theme.palette.yellow};
|
||||||
$orange: ${theme.colors.orange};
|
$orange: ${theme.palette.orange};
|
||||||
$purple: ${theme.colors.purple};
|
$purple: ${theme.palette.purple};
|
||||||
$variable: ${theme.colors.variable};
|
$variable: ${theme.palette.variable};
|
||||||
|
|
||||||
$brand-primary: ${theme.colors.brandPrimary};
|
$brand-primary: ${theme.palette.brandPrimary};
|
||||||
$brand-success: ${theme.colors.brandSuccess};
|
$brand-success: ${theme.palette.brandSuccess};
|
||||||
$brand-warning: ${theme.colors.brandWarning};
|
$brand-warning: ${theme.palette.brandWarning};
|
||||||
$brand-danger: ${theme.colors.brandDanger};
|
$brand-danger: ${theme.palette.brandDanger};
|
||||||
|
|
||||||
$query-red: ${theme.colors.queryRed};
|
$query-red: ${theme.palette.queryRed};
|
||||||
$query-green: ${theme.colors.queryGreen};
|
$query-green: ${theme.palette.queryGreen};
|
||||||
$query-purple: ${theme.colors.queryPurple};
|
$query-purple: ${theme.palette.queryPurple};
|
||||||
$query-orange: ${theme.colors.orange};
|
$query-orange: ${theme.palette.orange};
|
||||||
$query-keyword: ${theme.colors.queryKeyword};
|
$query-keyword: ${theme.palette.queryKeyword};
|
||||||
|
|
||||||
// Status colors
|
// Status colors
|
||||||
// -------------------------
|
// -------------------------
|
||||||
$online: ${theme.colors.online};
|
$online: ${theme.palette.online};
|
||||||
$warn: ${theme.colors.warn};
|
$warn: ${theme.palette.warn};
|
||||||
$critical: ${theme.colors.critical};
|
$critical: ${theme.palette.critical};
|
||||||
|
|
||||||
// Scaffolding
|
// Scaffolding
|
||||||
// -------------------------
|
// -------------------------
|
||||||
$body-bg: ${theme.colors.bodyBg};
|
$body-bg: ${theme.colors.bodyBg};
|
||||||
$page-bg: ${theme.colors.pageBg};
|
$page-bg: ${theme.colors.bodyBg};
|
||||||
|
$dashboard-bg: ${theme.colors.dashboardBg};
|
||||||
|
|
||||||
$body-color: ${theme.colors.body};
|
|
||||||
$text-color: ${theme.colors.text};
|
$text-color: ${theme.colors.text};
|
||||||
$text-color-strong: ${theme.colors.textStrong};
|
$text-color-strong: ${theme.colors.textStrong};
|
||||||
$text-color-weak: ${theme.colors.textWeak};
|
$text-color-weak: ${theme.colors.textWeak};
|
||||||
@ -140,7 +140,6 @@ $card-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.
|
|||||||
// Lists
|
// Lists
|
||||||
$list-item-bg: $gray-7;
|
$list-item-bg: $gray-7;
|
||||||
$list-item-hover-bg: $gray-6;
|
$list-item-hover-bg: $gray-6;
|
||||||
$list-item-link-color: $text-color;
|
|
||||||
$list-item-shadow: $card-shadow;
|
$list-item-shadow: $card-shadow;
|
||||||
|
|
||||||
$empty-list-cta-bg: $gray-6;
|
$empty-list-cta-bg: $gray-6;
|
||||||
@ -196,14 +195,14 @@ $input-bg: $white;
|
|||||||
$input-bg-disabled: $gray-5;
|
$input-bg-disabled: $gray-5;
|
||||||
|
|
||||||
$input-color: ${theme.colors.formInputText};
|
$input-color: ${theme.colors.formInputText};
|
||||||
$input-border-color: ${theme.colors.gray95};
|
$input-border-color: ${theme.palette.gray95};
|
||||||
$input-box-shadow: none;
|
$input-box-shadow: none;
|
||||||
$input-border-focus: ${theme.colors.blue95};
|
$input-border-focus: ${theme.palette.blue95};
|
||||||
$input-box-shadow-focus: ${theme.colors.blue95};
|
$input-box-shadow-focus: ${theme.palette.blue95};
|
||||||
$input-color-placeholder: ${theme.colors.formInputPlaceholderText};
|
$input-color-placeholder: ${theme.colors.formInputPlaceholderText};
|
||||||
$input-label-bg: ${theme.colors.gray95};
|
$input-label-bg: ${theme.palette.gray95};
|
||||||
$input-label-border-color: ${theme.colors.gray95};
|
$input-label-border-color: ${theme.palette.gray95};
|
||||||
$input-color-select-arrow: ${theme.colors.gray60};
|
$input-color-select-arrow: ${theme.palette.gray60};
|
||||||
|
|
||||||
// search
|
// search
|
||||||
$search-shadow: 0 1px 5px 0 $gray-5;
|
$search-shadow: 0 1px 5px 0 $gray-5;
|
||||||
@ -240,12 +239,12 @@ $navbar-button-border: $gray-4;
|
|||||||
|
|
||||||
// Sidemenu
|
// Sidemenu
|
||||||
// -------------------------
|
// -------------------------
|
||||||
$side-menu-bg: ${theme.colors.gray15};
|
$side-menu-bg: ${theme.palette.gray15};
|
||||||
$side-menu-border: 1px solid ${theme.colors.gray25};
|
$side-menu-border: 1px solid ${theme.palette.gray25};
|
||||||
$side-menu-bg-mobile: rgba(0, 0, 0, 0); //$gray-6;
|
$side-menu-bg-mobile: rgba(0, 0, 0, 0); //$gray-6;
|
||||||
$side-menu-item-hover-bg: ${theme.colors.gray25};
|
$side-menu-item-hover-bg: ${theme.palette.gray25};
|
||||||
$side-menu-shadow: 5px 0px 10px -5px $gray-1;
|
$side-menu-shadow: 5px 0px 10px -5px $gray-1;
|
||||||
$side-menu-link-color: $gray-6;
|
$side-menu-link-color: $gray-4;
|
||||||
|
|
||||||
// Menu dropdowns
|
// Menu dropdowns
|
||||||
// -------------------------
|
// -------------------------
|
||||||
|
@ -40,15 +40,57 @@ const basicColors = {
|
|||||||
orangeDark: '#ff780a',
|
orangeDark: '#ff780a',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const backgrounds = {
|
||||||
|
bg1: basicColors.gray10,
|
||||||
|
bg2: basicColors.gray15,
|
||||||
|
bg3: basicColors.gray25,
|
||||||
|
dashboardBg: basicColors.gray05,
|
||||||
|
};
|
||||||
|
|
||||||
|
const borders = {
|
||||||
|
border1: basicColors.gray15,
|
||||||
|
border2: basicColors.gray25,
|
||||||
|
};
|
||||||
|
|
||||||
|
const form = {
|
||||||
|
// Next-gen forms functional colors
|
||||||
|
formLabel: basicColors.gray70,
|
||||||
|
formDescription: basicColors.gray60,
|
||||||
|
formLegend: basicColors.gray85,
|
||||||
|
formInputBg: basicColors.gray05,
|
||||||
|
formInputBgDisabled: basicColors.gray10,
|
||||||
|
formInputBorder: basicColors.gray25,
|
||||||
|
formInputBorderHover: basicColors.gray33,
|
||||||
|
formInputBorderActive: basicColors.blue95,
|
||||||
|
formInputBorderInvalid: basicColors.red88,
|
||||||
|
formInputPlaceholderText: basicColors.gray1,
|
||||||
|
formInputText: basicColors.gray85,
|
||||||
|
formInputDisabledText: basicColors.gray70,
|
||||||
|
formInputTextStrong: basicColors.gray85,
|
||||||
|
formInputTextWhite: basicColors.white,
|
||||||
|
formFocusOutline: basicColors.blueShade,
|
||||||
|
formValidationMessageText: basicColors.white,
|
||||||
|
formValidationMessageBg: basicColors.red88,
|
||||||
|
formSwitchBg: basicColors.gray25,
|
||||||
|
formSwitchBgActive: basicColors.blueLight,
|
||||||
|
formSwitchBgHover: basicColors.gray33,
|
||||||
|
formSwitchBgActiveHover: basicColors.blueBase,
|
||||||
|
formSwitchBgDisabled: basicColors.gray25,
|
||||||
|
formSwitchDot: basicColors.gray15,
|
||||||
|
formCheckboxBg: basicColors.dark5,
|
||||||
|
formCheckboxBgChecked: basicColors.blueLight,
|
||||||
|
formCheckboxBgCheckedHover: basicColors.blueBase,
|
||||||
|
formCheckboxCheckmark: basicColors.gray25,
|
||||||
|
};
|
||||||
|
|
||||||
const darkTheme: GrafanaTheme = {
|
const darkTheme: GrafanaTheme = {
|
||||||
...defaultTheme,
|
...defaultTheme,
|
||||||
type: GrafanaThemeType.Dark,
|
type: GrafanaThemeType.Dark,
|
||||||
isDark: true,
|
isDark: true,
|
||||||
isLight: false,
|
isLight: false,
|
||||||
name: 'Grafana Dark',
|
name: 'Grafana Dark',
|
||||||
colors: {
|
palette: {
|
||||||
...basicColors,
|
...basicColors,
|
||||||
inputBlack: basicColors.gray05,
|
|
||||||
brandPrimary: basicColors.orange,
|
brandPrimary: basicColors.orange,
|
||||||
brandSuccess: basicColors.greenBase,
|
brandSuccess: basicColors.greenBase,
|
||||||
brandWarning: basicColors.orange,
|
brandWarning: basicColors.orange,
|
||||||
@ -61,66 +103,34 @@ const darkTheme: GrafanaTheme = {
|
|||||||
online: basicColors.greenBase,
|
online: basicColors.greenBase,
|
||||||
warn: '#f79520',
|
warn: '#f79520',
|
||||||
critical: basicColors.redBase,
|
critical: basicColors.redBase,
|
||||||
|
},
|
||||||
|
colors: {
|
||||||
|
...backgrounds,
|
||||||
|
...borders,
|
||||||
|
...form,
|
||||||
|
|
||||||
body: basicColors.gray4,
|
bodyBg: backgrounds.bg1,
|
||||||
|
panelBg: backgrounds.bg1,
|
||||||
|
pageHeaderBg: backgrounds.bg2,
|
||||||
|
pageHeaderBorder: borders.border1,
|
||||||
|
panelBorder: borders.border1,
|
||||||
|
|
||||||
|
dropdownBg: form.formInputBg,
|
||||||
|
dropdownShadow: basicColors.black,
|
||||||
|
dropdownOptionHoverBg: backgrounds.bg2,
|
||||||
|
|
||||||
|
// text
|
||||||
|
headingColor: basicColors.gray4,
|
||||||
text: basicColors.gray85,
|
text: basicColors.gray85,
|
||||||
textStrong: basicColors.white,
|
textStrong: basicColors.white,
|
||||||
textWeak: basicColors.gray2,
|
textWeak: basicColors.gray2,
|
||||||
textEmphasis: basicColors.gray5,
|
textEmphasis: basicColors.gray5,
|
||||||
textFaint: basicColors.dark5,
|
textFaint: basicColors.dark5,
|
||||||
|
|
||||||
link: basicColors.gray4,
|
link: basicColors.gray4,
|
||||||
linkDisabled: basicColors.gray2,
|
linkDisabled: basicColors.gray2,
|
||||||
linkHover: basicColors.white,
|
linkHover: basicColors.white,
|
||||||
linkExternal: basicColors.blue,
|
linkExternal: basicColors.blue,
|
||||||
headingColor: basicColors.gray4,
|
|
||||||
|
|
||||||
// Backgrounds
|
|
||||||
bodyBg: basicColors.gray05,
|
|
||||||
pageBg: basicColors.gray10,
|
|
||||||
pageHeaderBg: basicColors.gray15,
|
|
||||||
panelBg: basicColors.gray10,
|
|
||||||
|
|
||||||
// Borders
|
|
||||||
pageHeaderBorder: basicColors.gray15,
|
|
||||||
panelBorder: basicColors.gray15,
|
|
||||||
|
|
||||||
// Next-gen forms functional colors
|
|
||||||
formLabel: basicColors.gray70,
|
|
||||||
formDescription: basicColors.gray60,
|
|
||||||
formLegend: basicColors.gray85,
|
|
||||||
formInputBg: basicColors.gray05,
|
|
||||||
formInputBgDisabled: basicColors.gray10,
|
|
||||||
formInputBorder: basicColors.gray25,
|
|
||||||
formInputBorderHover: basicColors.gray33,
|
|
||||||
formInputBorderActive: basicColors.blue95,
|
|
||||||
formInputBorderInvalid: basicColors.red88,
|
|
||||||
formInputPlaceholderText: basicColors.gray1,
|
|
||||||
formInputText: basicColors.gray85,
|
|
||||||
formInputDisabledText: basicColors.gray70,
|
|
||||||
formInputTextStrong: basicColors.gray85,
|
|
||||||
formInputTextWhite: basicColors.white,
|
|
||||||
formFocusOutline: basicColors.blueShade,
|
|
||||||
formValidationMessageText: basicColors.white,
|
|
||||||
formValidationMessageBg: basicColors.red88,
|
|
||||||
formSwitchBg: basicColors.gray25,
|
|
||||||
formSwitchBgActive: basicColors.blueLight,
|
|
||||||
formSwitchBgHover: basicColors.gray33,
|
|
||||||
formSwitchBgActiveHover: basicColors.blueBase,
|
|
||||||
formSwitchBgDisabled: basicColors.gray25,
|
|
||||||
formSwitchDot: basicColors.gray15,
|
|
||||||
formCheckboxBg: basicColors.dark5,
|
|
||||||
formCheckboxBgChecked: basicColors.blueLight,
|
|
||||||
formCheckboxBgCheckedHover: basicColors.blueBase,
|
|
||||||
formCheckboxCheckmark: basicColors.gray25,
|
|
||||||
},
|
|
||||||
background: {
|
|
||||||
dropdown: basicColors.dark3,
|
|
||||||
scrollbar: basicColors.dark9,
|
|
||||||
scrollbar2: basicColors.dark9,
|
|
||||||
pageHeader: `linear-gradient(90deg, ${basicColors.dark7}, ${basicColors.black})`,
|
|
||||||
},
|
|
||||||
shadow: {
|
|
||||||
pageHeader: `inset 0px -4px 14px ${basicColors.dark3}`,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ const basicColors = {
|
|||||||
gray3: '#acb6bf',
|
gray3: '#acb6bf',
|
||||||
gray4: '#c7d0d9',
|
gray4: '#c7d0d9',
|
||||||
gray5: '#dde4ed',
|
gray5: '#dde4ed',
|
||||||
gray6: '#e9edf2',
|
gray6: '#e9edf2', // same as gray95
|
||||||
gray7: '#f7f8fa',
|
gray7: '#f7f8fa', // same as gray98
|
||||||
grayBlue: '#212327', // not used in light theme
|
grayBlue: '#212327', // not used in light theme
|
||||||
blueBase: '#3274d9',
|
blueBase: '#3274d9',
|
||||||
blueShade: '#1f60c4',
|
blueShade: '#1f60c4',
|
||||||
@ -40,16 +40,57 @@ const basicColors = {
|
|||||||
orangeDark: '#ed5700',
|
orangeDark: '#ed5700',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const backgrounds = {
|
||||||
|
bg1: basicColors.white,
|
||||||
|
bg2: basicColors.gray98,
|
||||||
|
bg3: basicColors.gray95,
|
||||||
|
dashboardBg: basicColors.gray98,
|
||||||
|
};
|
||||||
|
|
||||||
|
const borders = {
|
||||||
|
border1: basicColors.gray95,
|
||||||
|
border2: basicColors.gray85,
|
||||||
|
};
|
||||||
|
|
||||||
|
const form = {
|
||||||
|
formLabel: basicColors.gray33,
|
||||||
|
formDescription: basicColors.gray33,
|
||||||
|
formLegend: basicColors.gray25,
|
||||||
|
formInputBg: basicColors.white,
|
||||||
|
formInputBgDisabled: basicColors.gray95,
|
||||||
|
formInputBorder: basicColors.gray85,
|
||||||
|
formInputBorderHover: basicColors.gray70,
|
||||||
|
formInputBorderActive: basicColors.blue77,
|
||||||
|
formInputBorderInvalid: basicColors.red88,
|
||||||
|
formInputText: basicColors.gray25,
|
||||||
|
formInputPlaceholderText: basicColors.gray70,
|
||||||
|
formInputDisabledText: basicColors.gray33,
|
||||||
|
formInputTextStrong: basicColors.gray25,
|
||||||
|
formInputTextWhite: basicColors.white,
|
||||||
|
formFocusOutline: basicColors.blueLight,
|
||||||
|
formValidationMessageText: basicColors.white,
|
||||||
|
formValidationMessageBg: basicColors.red88,
|
||||||
|
formSwitchBg: basicColors.gray85,
|
||||||
|
formSwitchBgActive: basicColors.blueShade,
|
||||||
|
formSwitchBgHover: basicColors.gray3,
|
||||||
|
formSwitchBgActiveHover: basicColors.blueBase,
|
||||||
|
formSwitchBgDisabled: basicColors.gray4,
|
||||||
|
formSwitchDot: basicColors.white,
|
||||||
|
formCheckboxBg: basicColors.white,
|
||||||
|
formCheckboxBgChecked: basicColors.blueShade,
|
||||||
|
formCheckboxBgCheckedHover: basicColors.blueBase,
|
||||||
|
formCheckboxCheckmark: basicColors.white,
|
||||||
|
};
|
||||||
|
|
||||||
const lightTheme: GrafanaTheme = {
|
const lightTheme: GrafanaTheme = {
|
||||||
...defaultTheme,
|
...defaultTheme,
|
||||||
type: GrafanaThemeType.Light,
|
type: GrafanaThemeType.Light,
|
||||||
isDark: false,
|
isDark: false,
|
||||||
isLight: true,
|
isLight: true,
|
||||||
name: 'Grafana Light',
|
name: 'Grafana Light',
|
||||||
colors: {
|
palette: {
|
||||||
...basicColors,
|
...basicColors,
|
||||||
variable: basicColors.blue,
|
variable: basicColors.blue,
|
||||||
inputBlack: '#09090b',
|
|
||||||
brandPrimary: basicColors.orange,
|
brandPrimary: basicColors.orange,
|
||||||
brandSuccess: basicColors.greenBase,
|
brandSuccess: basicColors.greenBase,
|
||||||
brandWarning: basicColors.orange,
|
brandWarning: basicColors.orange,
|
||||||
@ -62,15 +103,22 @@ const lightTheme: GrafanaTheme = {
|
|||||||
online: basicColors.greenShade,
|
online: basicColors.greenShade,
|
||||||
warn: '#f79520',
|
warn: '#f79520',
|
||||||
critical: basicColors.redShade,
|
critical: basicColors.redShade,
|
||||||
|
},
|
||||||
|
colors: {
|
||||||
|
...backgrounds,
|
||||||
|
...borders,
|
||||||
|
|
||||||
// Backgrounds
|
bodyBg: backgrounds.bg1,
|
||||||
bodyBg: basicColors.gray7,
|
panelBg: backgrounds.bg1,
|
||||||
pageBg: basicColors.white,
|
pageHeaderBg: backgrounds.bg2,
|
||||||
pageHeaderBg: basicColors.gray95,
|
pageHeaderBorder: borders.border1,
|
||||||
panelBg: basicColors.white,
|
panelBorder: borders.border1,
|
||||||
|
|
||||||
|
dropdownBg: form.formInputBg,
|
||||||
|
dropdownShadow: basicColors.gray3,
|
||||||
|
dropdownOptionHoverBg: backgrounds.bg2,
|
||||||
|
|
||||||
// Text colors
|
// Text colors
|
||||||
body: basicColors.gray1,
|
|
||||||
text: basicColors.gray1,
|
text: basicColors.gray1,
|
||||||
textStrong: basicColors.dark2,
|
textStrong: basicColors.dark2,
|
||||||
textWeak: basicColors.gray2,
|
textWeak: basicColors.gray2,
|
||||||
@ -84,47 +132,7 @@ const lightTheme: GrafanaTheme = {
|
|||||||
linkExternal: basicColors.blueLight,
|
linkExternal: basicColors.blueLight,
|
||||||
headingColor: basicColors.gray1,
|
headingColor: basicColors.gray1,
|
||||||
|
|
||||||
// Borders
|
...form,
|
||||||
panelBorder: basicColors.gray95,
|
|
||||||
pageHeaderBorder: basicColors.gray4,
|
|
||||||
|
|
||||||
// Next-gen forms functional colors
|
|
||||||
formLabel: basicColors.gray33,
|
|
||||||
formDescription: basicColors.gray33,
|
|
||||||
formLegend: basicColors.gray25,
|
|
||||||
formInputBg: basicColors.white,
|
|
||||||
formInputBgDisabled: basicColors.gray95,
|
|
||||||
formInputBorder: basicColors.gray85,
|
|
||||||
formInputBorderHover: basicColors.gray70,
|
|
||||||
formInputBorderActive: basicColors.blue77,
|
|
||||||
formInputBorderInvalid: basicColors.red88,
|
|
||||||
formInputText: basicColors.gray25,
|
|
||||||
formInputPlaceholderText: basicColors.gray70,
|
|
||||||
formInputDisabledText: basicColors.gray33,
|
|
||||||
formInputTextStrong: basicColors.gray25,
|
|
||||||
formInputTextWhite: basicColors.white,
|
|
||||||
formFocusOutline: basicColors.blueLight,
|
|
||||||
formValidationMessageText: basicColors.white,
|
|
||||||
formValidationMessageBg: basicColors.red88,
|
|
||||||
formSwitchBg: basicColors.gray85,
|
|
||||||
formSwitchBgActive: basicColors.blueShade,
|
|
||||||
formSwitchBgHover: basicColors.gray3,
|
|
||||||
formSwitchBgActiveHover: basicColors.blueBase,
|
|
||||||
formSwitchBgDisabled: basicColors.gray4,
|
|
||||||
formSwitchDot: basicColors.white,
|
|
||||||
formCheckboxBg: basicColors.white,
|
|
||||||
formCheckboxBgChecked: basicColors.blueShade,
|
|
||||||
formCheckboxBgCheckedHover: basicColors.blueBase,
|
|
||||||
formCheckboxCheckmark: basicColors.white,
|
|
||||||
},
|
|
||||||
background: {
|
|
||||||
dropdown: basicColors.white,
|
|
||||||
scrollbar: basicColors.gray5,
|
|
||||||
scrollbar2: basicColors.gray5,
|
|
||||||
pageHeader: `linear-gradient(90deg, ${basicColors.white}, ${basicColors.gray7})`,
|
|
||||||
},
|
|
||||||
shadow: {
|
|
||||||
pageHeader: `inset 0px -3px 10px ${basicColors.gray6}`,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6,9 +6,9 @@ import { stylesFactory } from './stylesFactory';
|
|||||||
export function cardChrome(theme: GrafanaTheme): string {
|
export function cardChrome(theme: GrafanaTheme): string {
|
||||||
if (theme.isDark) {
|
if (theme.isDark) {
|
||||||
return `
|
return `
|
||||||
background: linear-gradient(135deg, ${theme.colors.dark8}, ${theme.colors.dark6});
|
background: linear-gradient(135deg, ${theme.palette.dark8}, ${theme.palette.dark6});
|
||||||
&:hover {
|
&:hover {
|
||||||
background: linear-gradient(135deg, ${theme.colors.dark9}, ${theme.colors.dark6});
|
background: linear-gradient(135deg, ${theme.palette.dark9}, ${theme.palette.dark6});
|
||||||
}
|
}
|
||||||
box-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.3);
|
box-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.3);
|
||||||
border-radius: ${theme.border.radius.md};
|
border-radius: ${theme.border.radius.md};
|
||||||
@ -16,9 +16,9 @@ export function cardChrome(theme: GrafanaTheme): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return `
|
return `
|
||||||
background: linear-gradient(135deg, ${theme.colors.gray6}, ${theme.colors.gray7});
|
background: linear-gradient(135deg, ${theme.palette.gray6}, ${theme.palette.gray7});
|
||||||
&:hover {
|
&:hover {
|
||||||
background: linear-gradient(135deg, ${theme.colors.gray7}, ${theme.colors.gray6});
|
background: linear-gradient(135deg, ${theme.palette.gray7}, ${theme.palette.gray6});
|
||||||
}
|
}
|
||||||
box-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.1);
|
box-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.1);
|
||||||
border-radius: ${theme.border.radius.md};
|
border-radius: ${theme.border.radius.md};
|
||||||
@ -28,9 +28,9 @@ export function cardChrome(theme: GrafanaTheme): string {
|
|||||||
export function listItem(theme: GrafanaTheme): string {
|
export function listItem(theme: GrafanaTheme): string {
|
||||||
if (theme.isDark) {
|
if (theme.isDark) {
|
||||||
return `
|
return `
|
||||||
background: ${theme.colors.dark7};
|
background: ${theme.palette.dark7};
|
||||||
&:hover {
|
&:hover {
|
||||||
background: ${theme.colors.dark9};
|
background: ${theme.palette.dark9};
|
||||||
}
|
}
|
||||||
box-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.3);
|
box-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.3);
|
||||||
border-radius: ${theme.border.radius.md};
|
border-radius: ${theme.border.radius.md};
|
||||||
@ -38,9 +38,9 @@ export function listItem(theme: GrafanaTheme): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return `
|
return `
|
||||||
background: ${theme.colors.gray7};
|
background: ${theme.palette.gray7};
|
||||||
&:hover {
|
&:hover {
|
||||||
background: ${theme.colors.gray6};
|
background: ${theme.palette.gray6};
|
||||||
}
|
}
|
||||||
box-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.1);
|
box-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.1);
|
||||||
border-radius: ${theme.border.radius.md};
|
border-radius: ${theme.border.radius.md};
|
||||||
@ -49,7 +49,7 @@ export function listItem(theme: GrafanaTheme): string {
|
|||||||
|
|
||||||
export function listItemSelected(theme: GrafanaTheme): string {
|
export function listItemSelected(theme: GrafanaTheme): string {
|
||||||
return `
|
return `
|
||||||
background: ${theme.isLight ? theme.colors.gray6 : theme.colors.dark9};
|
background: ${theme.isLight ? theme.palette.gray6 : theme.palette.dark9};
|
||||||
color: ${theme.colors.textStrong};
|
color: ${theme.colors.textStrong};
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -57,22 +57,22 @@ export function listItemSelected(theme: GrafanaTheme): string {
|
|||||||
export const panelEditorNestedListStyles = stylesFactory((theme: GrafanaTheme) => {
|
export const panelEditorNestedListStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const borderColor = selectThemeVariant(
|
const borderColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray85,
|
light: theme.palette.gray85,
|
||||||
dark: theme.colors.dark9,
|
dark: theme.palette.dark9,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
const shadow = selectThemeVariant(
|
const shadow = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray85,
|
light: theme.palette.gray85,
|
||||||
dark: theme.colors.black,
|
dark: theme.palette.black,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
const headerBg = selectThemeVariant(
|
const headerBg = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.white,
|
light: theme.palette.white,
|
||||||
dark: theme.colors.dark1,
|
dark: theme.palette.dark1,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
@ -42,8 +42,8 @@ const CombinationsRowRenderer: React.FunctionComponent<CombinationsRowRendererPr
|
|||||||
|
|
||||||
const borderColor = selectThemeVariant(
|
const borderColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
dark: theme.colors.dark8,
|
dark: theme.palette.dark8,
|
||||||
light: theme.colors.gray5,
|
light: theme.palette.gray5,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
@ -74,7 +74,7 @@ export const QueryOperationRow: React.FC<QueryOperationRowProps> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getQueryOperationRowStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getQueryOperationRowStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const borderColor = theme.isLight ? theme.colors.gray85 : theme.colors.gray25;
|
const borderColor = theme.colors.border2;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
wrapper: css`
|
wrapper: css`
|
||||||
@ -84,7 +84,7 @@ const getQueryOperationRowStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
padding: ${theme.spacing.sm};
|
padding: ${theme.spacing.sm};
|
||||||
border-radius: ${theme.border.radius.sm};
|
border-radius: ${theme.border.radius.sm};
|
||||||
border: 1px solid ${borderColor};
|
border: 1px solid ${borderColor};
|
||||||
background: ${theme.colors.pageBg};
|
background: ${theme.colors.bodyBg};
|
||||||
`,
|
`,
|
||||||
collapseIcon: css`
|
collapseIcon: css`
|
||||||
color: ${theme.colors.textWeak};
|
color: ${theme.colors.textWeak};
|
||||||
@ -97,15 +97,15 @@ const getQueryOperationRowStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
|
|
||||||
title: css`
|
title: css`
|
||||||
font-weight: ${theme.typography.weight.semibold};
|
font-weight: ${theme.typography.weight.semibold};
|
||||||
color: ${theme.colors.blue95};
|
color: ${theme.palette.blue95};
|
||||||
margin-left: ${theme.spacing.sm};
|
margin-left: ${theme.spacing.sm};
|
||||||
`,
|
`,
|
||||||
content: css`
|
content: css`
|
||||||
border: 1px solid ${borderColor};
|
border: 1px solid ${borderColor};
|
||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
background: ${theme.colors.pageBg};
|
background: ${theme.colors.bodyBg};
|
||||||
margin-left: ${theme.spacing.xl};
|
margin-left: ${theme.spacing.xl};
|
||||||
border-top: 1px solid ${theme.colors.pageBg};
|
border-top: 1px solid ${theme.colors.bodyBg};
|
||||||
border-radis: 0 ${theme.border.radius.sm};
|
border-radis: 0 ${theme.border.radius.sm};
|
||||||
padding: 0 ${theme.spacing.sm} ${theme.spacing.sm} ${theme.spacing.lg};
|
padding: 0 ${theme.spacing.sm} ${theme.spacing.sm} ${theme.spacing.lg};
|
||||||
`,
|
`,
|
||||||
|
@ -7,7 +7,7 @@ const title = { fontWeight: 500, fontSize: '26px', lineHeight: '123%' };
|
|||||||
|
|
||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const backgroundUrl = theme.isDark ? 'public/img/licensing/header_dark.svg' : 'public/img/licensing/header_light.svg';
|
const backgroundUrl = theme.isDark ? 'public/img/licensing/header_dark.svg' : 'public/img/licensing/header_light.svg';
|
||||||
const footerBg = theme.isDark ? theme.colors.dark9 : theme.colors.gray6;
|
const footerBg = theme.isDark ? theme.palette.dark9 : theme.palette.gray6;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
container: css`
|
container: css`
|
||||||
|
@ -79,7 +79,7 @@ const getOrgRowStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
removeButton: css`
|
removeButton: css`
|
||||||
margin-right: 0.6rem;
|
margin-right: 0.6rem;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: ${theme.colors.blue95};
|
color: ${theme.palette.blue95};
|
||||||
`,
|
`,
|
||||||
label: css`
|
label: css`
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
@ -56,7 +56,8 @@ export const InspectHeader: FC<Props> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const headerBackground = theme.isLight ? theme.colors.gray95 : theme.colors.gray15;
|
const headerBackground = theme.colors.bg2;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
header: css`
|
header: css`
|
||||||
background-color: ${headerBackground};
|
background-color: ${headerBackground};
|
||||||
|
@ -47,16 +47,16 @@ export const DynamicConfigValueEditor: React.FC<DynamicConfigValueEditorProps> =
|
|||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const borderColor = selectThemeVariant(
|
const borderColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray85,
|
light: theme.palette.gray85,
|
||||||
dark: theme.colors.dark9,
|
dark: theme.palette.dark9,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
|
||||||
const highlightColor = selectThemeVariant(
|
const highlightColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.blueLight,
|
light: theme.palette.blueLight,
|
||||||
dark: theme.colors.blueShade,
|
dark: theme.palette.blueShade,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
@ -269,7 +269,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
background: ${theme.colors.pageBg};
|
background: ${theme.colors.bodyBg};
|
||||||
border-left: 1px solid ${theme.colors.pageHeaderBorder};
|
border-left: 1px solid ${theme.colors.pageHeaderBorder};
|
||||||
`,
|
`,
|
||||||
tabsButton: css``,
|
tabsButton: css``,
|
||||||
|
@ -127,16 +127,16 @@ export const OverrideEditor: React.FC<OverrideEditorProps> = ({ data, override,
|
|||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const borderColor = selectThemeVariant(
|
const borderColor = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray85,
|
light: theme.palette.gray85,
|
||||||
dark: theme.colors.dark9,
|
dark: theme.palette.dark9,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
|
||||||
const shadow = selectThemeVariant(
|
const shadow = selectThemeVariant(
|
||||||
{
|
{
|
||||||
light: theme.colors.gray85,
|
light: theme.palette.gray85,
|
||||||
dark: theme.colors.black,
|
dark: theme.palette.black,
|
||||||
},
|
},
|
||||||
theme.type
|
theme.type
|
||||||
);
|
);
|
||||||
|
@ -347,7 +347,7 @@ enum Pane {
|
|||||||
*/
|
*/
|
||||||
const getStyles = stylesFactory((theme: GrafanaTheme, props: Props) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme, props: Props) => {
|
||||||
const { uiState } = props;
|
const { uiState } = props;
|
||||||
const handleColor = theme.colors.blueLight;
|
const handleColor = theme.palette.blueLight;
|
||||||
const paneSpaceing = theme.spacing.md;
|
const paneSpaceing = theme.spacing.md;
|
||||||
|
|
||||||
const resizer = css`
|
const resizer = css`
|
||||||
@ -376,7 +376,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme, props: Props) => {
|
|||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background: ${theme.colors.bodyBg};
|
background: ${theme.colors.dashboardBg};
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
`,
|
`,
|
||||||
|
@ -90,7 +90,7 @@ export const VisualizationTabUnconnected: FC<Props> = ({ panel, plugin, changePa
|
|||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
return {
|
return {
|
||||||
icon: css`
|
icon: css`
|
||||||
color: ${theme.colors.gray33};
|
color: ${theme.palette.gray33};
|
||||||
`,
|
`,
|
||||||
wrapper: css`
|
wrapper: css`
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -104,7 +104,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
flex-shrink: 1;
|
flex-shrink: 1;
|
||||||
`,
|
`,
|
||||||
searchClear: css`
|
searchClear: css`
|
||||||
color: ${theme.colors.gray60};
|
color: ${theme.palette.gray60};
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
`,
|
`,
|
||||||
visList: css`
|
visList: css`
|
||||||
|
@ -77,7 +77,7 @@ export const SaveProvisionedDashboardForm: React.FC<SaveDashboardFormProps> = ({
|
|||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
return {
|
return {
|
||||||
json: css`
|
json: css`
|
||||||
background: ${theme.isLight ? theme.colors.gray7 : theme.colors.black};
|
background: ${theme.isLight ? theme.palette.gray7 : theme.palette.black};
|
||||||
padding: ${theme.spacing.sm} 0 ${theme.spacing.sm} ${theme.spacing.md};
|
padding: ${theme.spacing.sm} 0 ${theme.spacing.sm} ${theme.spacing.md};
|
||||||
height: 400px;
|
height: 400px;
|
||||||
`,
|
`,
|
||||||
|
@ -71,7 +71,7 @@ const getStyles = (theme: GrafanaTheme) => ({
|
|||||||
`,
|
`,
|
||||||
name: css`
|
name: css`
|
||||||
font-weight: ${theme.typography.weight.semibold};
|
font-weight: ${theme.typography.weight.semibold};
|
||||||
color: ${theme.colors.blue};
|
color: ${theme.palette.blue};
|
||||||
`,
|
`,
|
||||||
iconRow: css`
|
iconRow: css`
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -107,8 +107,8 @@ const getStyles = (theme: GrafanaTheme) => ({
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: ${theme.typography.fontFamily.monospace};
|
font-family: ${theme.typography.fontFamily.monospace};
|
||||||
font-size: ${theme.typography.size.sm};
|
font-size: ${theme.typography.size.sm};
|
||||||
color: ${theme.colors.blueBase};
|
color: ${theme.palette.blueBase};
|
||||||
border-bottom: 1px dashed ${theme.colors.gray15};
|
border-bottom: 1px dashed ${theme.palette.gray15};
|
||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
flex-shrink: 1;
|
flex-shrink: 1;
|
||||||
`,
|
`,
|
||||||
@ -116,8 +116,8 @@ const getStyles = (theme: GrafanaTheme) => ({
|
|||||||
debug: css`
|
debug: css`
|
||||||
margin-top: ${theme.spacing.md};
|
margin-top: ${theme.spacing.md};
|
||||||
padding: 0 ${theme.spacing.sm} ${theme.spacing.sm} ${theme.spacing.sm};
|
padding: 0 ${theme.spacing.sm} ${theme.spacing.sm} ${theme.spacing.sm};
|
||||||
border: 1px dashed ${theme.colors.gray15};
|
border: 1px dashed ${theme.palette.gray15};
|
||||||
background: ${theme.colors.gray05};
|
background: ${theme.palette.gray05};
|
||||||
border-radius: ${theme.border.radius.sm};
|
border-radius: ${theme.border.radius.sm};
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 300px;
|
height: 300px;
|
||||||
|
@ -42,7 +42,7 @@ const getQueryEditorRowTitleStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
return {
|
return {
|
||||||
refId: css`
|
refId: css`
|
||||||
font-weight: ${theme.typography.weight.semibold};
|
font-weight: ${theme.typography.weight.semibold};
|
||||||
color: ${theme.colors.blue95};
|
color: ${theme.palette.blue95};
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -28,11 +28,11 @@ const VizTypePickerPlugin: React.FC<Props> = ({ isCurrent, plugin, onClick, disa
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const itemBorder = `1px solid ${theme.isLight ? theme.colors.gray85 : theme.colors.gray25}`;
|
const itemBorder = `1px solid ${theme.isLight ? theme.palette.gray85 : theme.palette.gray25}`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
item: css`
|
item: css`
|
||||||
background: ${theme.isLight ? theme.colors.gray98 : theme.colors.gray15};
|
background: ${theme.isLight ? theme.palette.gray98 : theme.palette.gray15};
|
||||||
border: ${itemBorder};
|
border: ${itemBorder};
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
@ -49,13 +49,13 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
padding-bottom: 6px;
|
padding-bottom: 6px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: 0 0 4px ${theme.colors.blueLight};
|
box-shadow: 0 0 4px ${theme.palette.blueLight};
|
||||||
border: 1px solid ${theme.colors.blueLight};
|
border: 1px solid ${theme.palette.blueLight};
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
current: css`
|
current: css`
|
||||||
box-shadow: 0 0 6px ${theme.colors.orange} !important;
|
box-shadow: 0 0 6px ${theme.palette.orange} !important;
|
||||||
border: 1px solid ${theme.colors.orange} !important;
|
border: 1px solid ${theme.palette.orange} !important;
|
||||||
`,
|
`,
|
||||||
disabled: css`
|
disabled: css`
|
||||||
opacity: 0.2;
|
opacity: 0.2;
|
||||||
|
@ -24,11 +24,11 @@ const getStyles = (theme: GrafanaTheme) => ({
|
|||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
border-radius: ${theme.border.radius.md};
|
border-radius: ${theme.border.radius.md};
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: ${selectThemeVariant({ light: theme.colors.white, dark: theme.colors.dark4 }, theme.type)};
|
background-color: ${selectThemeVariant({ light: theme.palette.white, dark: theme.palette.dark4 }, theme.type)};
|
||||||
`,
|
`,
|
||||||
disclaimerIcon: css`
|
disclaimerIcon: css`
|
||||||
label: disclaimer-icon;
|
label: disclaimer-icon;
|
||||||
color: ${theme.colors.yellow};
|
color: ${theme.palette.yellow};
|
||||||
margin-right: ${theme.spacing.xs};
|
margin-right: ${theme.spacing.xs};
|
||||||
`,
|
`,
|
||||||
showAllTimeSeries: css`
|
showAllTimeSeries: css`
|
||||||
|
@ -23,13 +23,13 @@ const getStyles = (theme: GrafanaTheme) => ({
|
|||||||
logsRowFade: css`
|
logsRowFade: css`
|
||||||
label: logs-row-fresh;
|
label: logs-row-fresh;
|
||||||
color: ${theme.colors.text};
|
color: ${theme.colors.text};
|
||||||
background-color: ${tinycolor(theme.colors.blueLight)
|
background-color: ${tinycolor(theme.palette.blueLight)
|
||||||
.setAlpha(0.25)
|
.setAlpha(0.25)
|
||||||
.toString()};
|
.toString()};
|
||||||
animation: fade 1s ease-out 1s 1 normal forwards;
|
animation: fade 1s ease-out 1s 1 normal forwards;
|
||||||
@keyframes fade {
|
@keyframes fade {
|
||||||
from {
|
from {
|
||||||
background-color: ${tinycolor(theme.colors.blueLight)
|
background-color: ${tinycolor(theme.palette.blueLight)
|
||||||
.setAlpha(0.25)
|
.setAlpha(0.25)
|
||||||
.toString()};
|
.toString()};
|
||||||
}
|
}
|
||||||
|
@ -10,11 +10,11 @@ import { GrafanaTheme } from '@grafana/data';
|
|||||||
import { ResponsiveButton } from './ResponsiveButton';
|
import { ResponsiveButton } from './ResponsiveButton';
|
||||||
|
|
||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const bgColor = selectThemeVariant({ light: theme.colors.gray5, dark: theme.colors.dark1 }, theme.type);
|
const bgColor = selectThemeVariant({ light: theme.palette.gray5, dark: theme.palette.dark1 }, theme.type);
|
||||||
const orangeLighter = tinycolor(theme.colors.orangeDark)
|
const orangeLighter = tinycolor(theme.palette.orangeDark)
|
||||||
.lighten(10)
|
.lighten(10)
|
||||||
.toString();
|
.toString();
|
||||||
const pulseTextColor = tinycolor(theme.colors.orangeDark)
|
const pulseTextColor = tinycolor(theme.palette.orangeDark)
|
||||||
.desaturate(90)
|
.desaturate(90)
|
||||||
.toString();
|
.toString();
|
||||||
return {
|
return {
|
||||||
@ -28,13 +28,13 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
`,
|
`,
|
||||||
isLive: css`
|
isLive: css`
|
||||||
label: isLive;
|
label: isLive;
|
||||||
border-color: ${theme.colors.orangeDark};
|
border-color: ${theme.palette.orangeDark};
|
||||||
color: ${theme.colors.orangeDark};
|
color: ${theme.palette.orangeDark};
|
||||||
background: transparent;
|
background: transparent;
|
||||||
&:focus {
|
&:focus {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border-color: ${theme.colors.orangeDark};
|
border-color: ${theme.palette.orangeDark};
|
||||||
color: ${theme.colors.orangeDark};
|
color: ${theme.palette.orangeDark};
|
||||||
}
|
}
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: ${bgColor};
|
background-color: ${bgColor};
|
||||||
@ -47,12 +47,12 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
`,
|
`,
|
||||||
isPaused: css`
|
isPaused: css`
|
||||||
label: isPaused;
|
label: isPaused;
|
||||||
border-color: ${theme.colors.orangeDark};
|
border-color: ${theme.palette.orangeDark};
|
||||||
background: transparent;
|
background: transparent;
|
||||||
animation: pulse 3s ease-out 0s infinite normal forwards;
|
animation: pulse 3s ease-out 0s infinite normal forwards;
|
||||||
&:focus {
|
&:focus {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border-color: ${theme.colors.orangeDark};
|
border-color: ${theme.palette.orangeDark};
|
||||||
}
|
}
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: ${bgColor};
|
background-color: ${bgColor};
|
||||||
@ -66,7 +66,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
color: ${pulseTextColor};
|
color: ${pulseTextColor};
|
||||||
}
|
}
|
||||||
50% {
|
50% {
|
||||||
color: ${theme.colors.orangeDark};
|
color: ${theme.palette.orangeDark};
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
color: ${pulseTextColor};
|
color: ${pulseTextColor};
|
||||||
|
@ -50,8 +50,8 @@ interface RichHistoryState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const borderColor = theme.isLight ? theme.colors.gray5 : theme.colors.dark6;
|
const borderColor = theme.isLight ? theme.palette.gray5 : theme.palette.dark6;
|
||||||
const tabContentBg = theme.colors.pageBg;
|
const tabContentBg = theme.colors.bodyBg;
|
||||||
return {
|
return {
|
||||||
container: css`
|
container: css`
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -27,16 +27,16 @@ const getStyles = stylesFactory((theme: GrafanaTheme, isRemoved: boolean) => {
|
|||||||
const rigtColumnWidth = '240px';
|
const rigtColumnWidth = '240px';
|
||||||
const rigtColumnContentWidth = '170px';
|
const rigtColumnContentWidth = '170px';
|
||||||
|
|
||||||
const borderColor = theme.isLight ? theme.colors.gray5 : theme.colors.gray25;
|
const borderColor = theme.isLight ? theme.palette.gray5 : theme.palette.gray25;
|
||||||
|
|
||||||
/* If datasource was removed, card will have inactive color */
|
/* If datasource was removed, card will have inactive color */
|
||||||
const cardColor = theme.isLight
|
const cardColor = theme.isLight
|
||||||
? isRemoved
|
? isRemoved
|
||||||
? theme.colors.gray95
|
? theme.palette.gray95
|
||||||
: theme.colors.white
|
: theme.palette.white
|
||||||
: isRemoved
|
: isRemoved
|
||||||
? theme.colors.gray15
|
? theme.palette.gray15
|
||||||
: theme.colors.gray05;
|
: theme.palette.gray05;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
queryCard: css`
|
queryCard: css`
|
||||||
@ -47,7 +47,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme, isRemoved: boolean) => {
|
|||||||
background-color: ${cardColor};
|
background-color: ${cardColor};
|
||||||
border-radius: ${theme.border.radius.sm};
|
border-radius: ${theme.border.radius.sm};
|
||||||
.starred {
|
.starred {
|
||||||
color: ${theme.colors.orange};
|
color: ${theme.palette.orange};
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
cardRow: css`
|
cardRow: css`
|
||||||
|
@ -22,12 +22,12 @@ import { RichHistory, Tabs } from './RichHistory';
|
|||||||
import { deleteRichHistory } from '../state/actions';
|
import { deleteRichHistory } from '../state/actions';
|
||||||
|
|
||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const containerBackground = theme.isLight ? theme.colors.gray95 : theme.colors.gray15;
|
const containerBackground = theme.isLight ? theme.palette.gray95 : theme.palette.gray15;
|
||||||
const containerBorderColor = theme.isLight ? theme.colors.gray5 : theme.colors.dark6;
|
const containerBorderColor = theme.isLight ? theme.palette.gray5 : theme.palette.dark6;
|
||||||
const handleBackground = theme.isLight ? theme.colors.white : theme.colors.gray15;
|
const handleBackground = theme.isLight ? theme.palette.white : theme.palette.gray15;
|
||||||
const handleDots = theme.isLight ? theme.colors.gray85 : theme.colors.gray33;
|
const handleDots = theme.isLight ? theme.palette.gray85 : theme.palette.gray33;
|
||||||
const handleBackgroundHover = theme.isLight ? theme.colors.gray85 : theme.colors.gray33;
|
const handleBackgroundHover = theme.isLight ? theme.palette.gray85 : theme.palette.gray33;
|
||||||
const handleDotsHover = theme.isLight ? theme.colors.gray70 : theme.colors.dark7;
|
const handleDotsHover = theme.isLight ? theme.palette.gray70 : theme.palette.dark7;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
container: css`
|
container: css`
|
||||||
|
@ -37,7 +37,7 @@ export interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getStyles = stylesFactory((theme: GrafanaTheme, height: number) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme, height: number) => {
|
||||||
const bgColor = theme.isLight ? theme.colors.gray5 : theme.colors.dark4;
|
const bgColor = theme.isLight ? theme.palette.gray5 : theme.palette.dark4;
|
||||||
|
|
||||||
/* 134px is based on the width of the Query history tabs bar, so the content is aligned to right side of the tab */
|
/* 134px is based on the width of the Query history tabs bar, so the content is aligned to right side of the tab */
|
||||||
const cardWidth = '100% - 134px';
|
const cardWidth = '100% - 134px';
|
||||||
|
@ -29,7 +29,7 @@ export interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||||
const bgColor = theme.isLight ? theme.colors.gray5 : theme.colors.dark4;
|
const bgColor = theme.isLight ? theme.palette.gray5 : theme.palette.dark4;
|
||||||
return {
|
return {
|
||||||
container: css`
|
container: css`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -193,7 +193,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: ${theme.colors.white};
|
color: ${theme.palette.white};
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: ${theme.breakpoints.md}) {
|
@media only screen and (max-width: ${theme.breakpoints.md}) {
|
||||||
|
@ -17,18 +17,19 @@ const getSearchFieldStyles = (theme: GrafanaTheme) => ({
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 55px; /* this variable is not part of GrafanaTheme yet*/
|
height: 55px; /* this variable is not part of GrafanaTheme yet*/
|
||||||
display: flex;
|
display: flex;
|
||||||
background-color: ${theme.colors.formInputBg};
|
background-color: ${theme.colors.panelBg};
|
||||||
|
border-bottom: 1px solid ${theme.colors.panelBorder};
|
||||||
position: relative;
|
position: relative;
|
||||||
box-shadow: 0 0 10px ${theme.isLight ? theme.colors.gray85 : theme.colors.black};
|
align-items: center;
|
||||||
`,
|
`,
|
||||||
input: css`
|
input: css`
|
||||||
max-width: 653px;
|
max-width: 653px;
|
||||||
padding: ${theme.spacing.md} ${theme.spacing.md} ${theme.spacing.sm} ${theme.spacing.md};
|
padding: 0 ${theme.spacing.md};
|
||||||
height: 51px;
|
height: 51px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
outline: none;
|
outline: none;
|
||||||
background-color: ${theme.colors.formInputBg};
|
background-color: ${theme.colors.panelBg};
|
||||||
background: ${theme.colors.formInputBg};
|
background: ${theme.colors.panelBg};
|
||||||
flex-grow: 10;
|
flex-grow: 10;
|
||||||
`,
|
`,
|
||||||
spacer: css`
|
spacer: css`
|
||||||
@ -37,10 +38,8 @@ const getSearchFieldStyles = (theme: GrafanaTheme) => ({
|
|||||||
icon: cx(
|
icon: cx(
|
||||||
css`
|
css`
|
||||||
color: ${theme.colors.textWeak};
|
color: ${theme.colors.textWeak};
|
||||||
font-size: ${theme.typography.size.lg};
|
padding: 0 ${theme.spacing.md};
|
||||||
padding: ${theme.spacing.md} ${theme.spacing.md} ${theme.spacing.sm} ${theme.spacing.md};
|
`
|
||||||
`,
|
|
||||||
'pointer'
|
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -54,7 +53,7 @@ export const SearchField: React.FunctionComponent<SearchFieldProps> = ({ query,
|
|||||||
{/* based on it GrafanaCtrl (L256) decides whether or not hide search */}
|
{/* based on it GrafanaCtrl (L256) decides whether or not hide search */}
|
||||||
<div className={`${styles.wrapper} search-field-wrapper`}>
|
<div className={`${styles.wrapper} search-field-wrapper`}>
|
||||||
<div className={styles.icon}>
|
<div className={styles.icon}>
|
||||||
<Icon name="search" />
|
<Icon name="search" size="lg" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
|
@ -82,7 +82,7 @@ const getSectionStyles = stylesFactory((theme: GrafanaTheme) => {
|
|||||||
`,
|
`,
|
||||||
section: css`
|
section: css`
|
||||||
background: ${theme.colors.panelBg};
|
background: ${theme.colors.panelBg};
|
||||||
border-bottom: solid 1px ${theme.isLight ? theme.colors.gray95 : theme.colors.gray25};
|
border-bottom: solid 1px ${theme.isLight ? theme.palette.gray95 : theme.palette.gray25};
|
||||||
padding: 0px 4px 4px 4px;
|
padding: 0px 4px 4px 4px;
|
||||||
margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
`,
|
`,
|
||||||
|
@ -30,10 +30,5 @@ export const SearchWrapper: FC = () => {
|
|||||||
};
|
};
|
||||||
}, [isOpen]);
|
}, [isOpen]);
|
||||||
|
|
||||||
return isOpen ? (
|
return isOpen ? <DashboardSearch onCloseSearch={() => setIsOpen(false)} payload={payload} /> : null;
|
||||||
<>
|
|
||||||
<div className="search-backdrop" />
|
|
||||||
<DashboardSearch onCloseSearch={() => setIsOpen(false)} payload={payload} />
|
|
||||||
</>
|
|
||||||
) : null;
|
|
||||||
};
|
};
|
||||||
|
@ -117,9 +117,9 @@ export class MetricTankMetaInspector extends PureComponent<Props, State> {
|
|||||||
|
|
||||||
const getStyles = stylesFactory(() => {
|
const getStyles = stylesFactory(() => {
|
||||||
const { theme } = config;
|
const { theme } = config;
|
||||||
const borderColor = theme.isDark ? theme.colors.gray25 : theme.colors.gray85;
|
const borderColor = theme.isDark ? theme.palette.gray25 : theme.palette.gray85;
|
||||||
const background = theme.isDark ? theme.colors.dark1 : theme.colors.white;
|
const background = theme.isDark ? theme.palette.dark1 : theme.palette.white;
|
||||||
const headerBg = theme.isDark ? theme.colors.gray15 : theme.colors.gray85;
|
const headerBg = theme.isDark ? theme.palette.gray15 : theme.palette.gray85;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
metaItem: css`
|
metaItem: css`
|
||||||
@ -160,14 +160,14 @@ const getStyles = stylesFactory(() => {
|
|||||||
width: 60px;
|
width: 60px;
|
||||||
`,
|
`,
|
||||||
bucketRetention: css`
|
bucketRetention: css`
|
||||||
background: linear-gradient(0deg, ${theme.colors.blue85}, ${theme.colors.blue95});
|
background: linear-gradient(0deg, ${theme.palette.blue85}, ${theme.palette.blue95});
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: ${theme.colors.white};
|
color: ${theme.palette.white};
|
||||||
margin-right: ${theme.spacing.md};
|
margin-right: ${theme.spacing.md};
|
||||||
border-radius: ${theme.border.radius.md};
|
border-radius: ${theme.border.radius.md};
|
||||||
`,
|
`,
|
||||||
bucketRetentionActive: css`
|
bucketRetentionActive: css`
|
||||||
background: linear-gradient(0deg, ${theme.colors.greenBase}, ${theme.colors.greenShade});
|
background: linear-gradient(0deg, ${theme.palette.greenBase}, ${theme.palette.greenShade});
|
||||||
`,
|
`,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -61,10 +61,10 @@ export class ThresholdFormCtrl {
|
|||||||
onThresholdTypeChange(index: number) {
|
onThresholdTypeChange(index: number) {
|
||||||
// Because of the ng-model binding, threshold's color mode is already set here
|
// Because of the ng-model binding, threshold's color mode is already set here
|
||||||
if (this.panel.thresholds[index].colorMode === 'custom') {
|
if (this.panel.thresholds[index].colorMode === 'custom') {
|
||||||
this.panel.thresholds[index].fillColor = tinycolor(config.theme.colors.blueBase)
|
this.panel.thresholds[index].fillColor = tinycolor(config.theme.palette.blueBase)
|
||||||
.setAlpha(0.2)
|
.setAlpha(0.2)
|
||||||
.toRgbString();
|
.toRgbString();
|
||||||
this.panel.thresholds[index].lineColor = tinycolor(config.theme.colors.blueShade)
|
this.panel.thresholds[index].lineColor = tinycolor(config.theme.palette.blueShade)
|
||||||
.setAlpha(0.6)
|
.setAlpha(0.6)
|
||||||
.toRgbString();
|
.toRgbString();
|
||||||
}
|
}
|
||||||
|
@ -89,10 +89,10 @@ $critical: #e02f44;
|
|||||||
|
|
||||||
// Scaffolding
|
// Scaffolding
|
||||||
// -------------------------
|
// -------------------------
|
||||||
$body-bg: #0b0c0e;
|
$body-bg: #141619;
|
||||||
$page-bg: #141619;
|
$page-bg: #141619;
|
||||||
|
$dashboard-bg: #0b0c0e;
|
||||||
|
|
||||||
$body-color: #d8d9da;
|
|
||||||
$text-color: #c7d0d9;
|
$text-color: #c7d0d9;
|
||||||
$text-color-strong: #ffffff;
|
$text-color-strong: #ffffff;
|
||||||
$text-color-weak: #8e8e8e;
|
$text-color-weak: #8e8e8e;
|
||||||
@ -125,7 +125,7 @@ $hr-border-color: $dark-9;
|
|||||||
// -------------------------
|
// -------------------------
|
||||||
$panel-bg: #141619;
|
$panel-bg: #141619;
|
||||||
$panel-border: 1px solid #202226;
|
$panel-border: 1px solid #202226;
|
||||||
$panel-header-hover-bg: #202226;
|
$panel-header-hover-bg: #343b40;
|
||||||
$panel-corner: $panel-bg;
|
$panel-corner: $panel-bg;
|
||||||
|
|
||||||
// page header
|
// page header
|
||||||
@ -151,7 +151,6 @@ $card-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.
|
|||||||
// Lists
|
// Lists
|
||||||
$list-item-bg: $card-background;
|
$list-item-bg: $card-background;
|
||||||
$list-item-hover-bg: $card-background-hover;
|
$list-item-hover-bg: $card-background-hover;
|
||||||
$list-item-link-color: $text-color;
|
|
||||||
$list-item-shadow: $card-shadow;
|
$list-item-shadow: $card-shadow;
|
||||||
|
|
||||||
$empty-list-cta-bg: $gray-blue;
|
$empty-list-cta-bg: $gray-blue;
|
||||||
@ -231,10 +230,9 @@ $dropdownBorder: #202226;
|
|||||||
$dropdownDividerTop: transparent;
|
$dropdownDividerTop: transparent;
|
||||||
$dropdownDividerBottom: #343b40;
|
$dropdownDividerBottom: #343b40;
|
||||||
|
|
||||||
$dropdownLinkColor: $text-color;
|
$dropdownLinkColor: $link-color;
|
||||||
$dropdownLinkColorHover: $white;
|
$dropdownLinkColorHover: $white;
|
||||||
$dropdownLinkColorActive: $white;
|
$dropdownLinkColorActive: $white;
|
||||||
|
|
||||||
$dropdownLinkBackgroundHover: $dark-9;
|
$dropdownLinkBackgroundHover: $dark-9;
|
||||||
|
|
||||||
// Horizontal forms & lists
|
// Horizontal forms & lists
|
||||||
@ -256,7 +254,7 @@ $side-menu-bg-mobile: $panel-bg;
|
|||||||
$side-menu-border: none;
|
$side-menu-border: none;
|
||||||
$side-menu-item-hover-bg: $dark-3;
|
$side-menu-item-hover-bg: $dark-3;
|
||||||
$side-menu-shadow: 0 0 20px black;
|
$side-menu-shadow: 0 0 20px black;
|
||||||
$side-menu-link-color: $link-color;
|
$side-menu-link-color: #9fa7b3;
|
||||||
|
|
||||||
// Menu dropdowns
|
// Menu dropdowns
|
||||||
// -------------------------
|
// -------------------------
|
||||||
|
@ -82,10 +82,10 @@ $critical: #c4162a;
|
|||||||
|
|
||||||
// Scaffolding
|
// Scaffolding
|
||||||
// -------------------------
|
// -------------------------
|
||||||
$body-bg: #f7f8fa;
|
$body-bg: #ffffff;
|
||||||
$page-bg: #ffffff;
|
$page-bg: #ffffff;
|
||||||
|
$dashboard-bg: #f7f8fa;
|
||||||
|
|
||||||
$body-color: #52545c;
|
|
||||||
$text-color: #52545c;
|
$text-color: #52545c;
|
||||||
$text-color-strong: #41444b;
|
$text-color-strong: #41444b;
|
||||||
$text-color-weak: #767980;
|
$text-color-weak: #767980;
|
||||||
@ -121,9 +121,9 @@ $panel-header-hover-bg: $gray-6;
|
|||||||
$panel-corner: $gray-4;
|
$panel-corner: $gray-4;
|
||||||
|
|
||||||
// Page header
|
// Page header
|
||||||
$page-header-bg: #e9edf2;
|
$page-header-bg: #f7f8fa;
|
||||||
$page-header-shadow: inset 0px -3px 10px $gray-6;
|
$page-header-shadow: inset 0px -3px 10px $gray-6;
|
||||||
$page-header-border-color: #c7d0d9;
|
$page-header-border-color: #e9edf2;
|
||||||
|
|
||||||
$divider-border-color: $gray-2;
|
$divider-border-color: $gray-2;
|
||||||
|
|
||||||
@ -143,7 +143,6 @@ $card-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.
|
|||||||
// Lists
|
// Lists
|
||||||
$list-item-bg: $gray-7;
|
$list-item-bg: $gray-7;
|
||||||
$list-item-hover-bg: $gray-6;
|
$list-item-hover-bg: $gray-6;
|
||||||
$list-item-link-color: $text-color;
|
|
||||||
$list-item-shadow: $card-shadow;
|
$list-item-shadow: $card-shadow;
|
||||||
|
|
||||||
$empty-list-cta-bg: $gray-6;
|
$empty-list-cta-bg: $gray-6;
|
||||||
@ -248,7 +247,7 @@ $side-menu-border: 1px solid #343b40;
|
|||||||
$side-menu-bg-mobile: rgba(0, 0, 0, 0); //$gray-6;
|
$side-menu-bg-mobile: rgba(0, 0, 0, 0); //$gray-6;
|
||||||
$side-menu-item-hover-bg: #343b40;
|
$side-menu-item-hover-bg: #343b40;
|
||||||
$side-menu-shadow: 5px 0px 10px -5px $gray-1;
|
$side-menu-shadow: 5px 0px 10px -5px $gray-1;
|
||||||
$side-menu-link-color: $gray-6;
|
$side-menu-link-color: $gray-4;
|
||||||
|
|
||||||
// Menu dropdowns
|
// Menu dropdowns
|
||||||
// -------------------------
|
// -------------------------
|
||||||
|
@ -73,7 +73,7 @@ body {
|
|||||||
font-size: $font-size-base;
|
font-size: $font-size-base;
|
||||||
line-height: $line-height-base;
|
line-height: $line-height-base;
|
||||||
// Go easy on the eyes and use something other than `#000` for text
|
// Go easy on the eyes and use something other than `#000` for text
|
||||||
color: $body-color;
|
color: $text-color;
|
||||||
// By default, `<body>` has no `background-color` so we set one as a best practice.
|
// By default, `<body>` has no `background-color` so we set one as a best practice.
|
||||||
background-color: $body-bg;
|
background-color: $body-bg;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: $zindex-sidemenu;
|
z-index: $zindex-sidemenu;
|
||||||
background: $body-bg;
|
background: $dashboard-bg;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: $headings-color;
|
|
||||||
font-size: $font-size-lg;
|
font-size: $font-size-lg;
|
||||||
min-height: $navbarHeight;
|
min-height: $navbarHeight;
|
||||||
line-height: $navbarHeight;
|
line-height: $navbarHeight;
|
||||||
@ -74,7 +73,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.navbar-page-btn__folder {
|
.navbar-page-btn__folder {
|
||||||
color: $text-color-weak;
|
|
||||||
display: none;
|
display: none;
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
|
|
||||||
|
@ -1,14 +1,3 @@
|
|||||||
.search-backdrop {
|
|
||||||
position: fixed;
|
|
||||||
right: 0;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
top: 0;
|
|
||||||
z-index: $zindex-modal-backdrop;
|
|
||||||
background-color: $black;
|
|
||||||
@include opacity(60);
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-container {
|
.search-container {
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
@ -16,7 +5,7 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: ($zindex-modal-backdrop + 10);
|
z-index: ($zindex-modal-backdrop + 10);
|
||||||
position: fixed;
|
position: fixed;
|
||||||
background: $body-bg;
|
background: $dashboard-bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search
|
// Search
|
||||||
@ -94,6 +83,9 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
flex-grow: 10;
|
flex-grow: 10;
|
||||||
margin-bottom: $space-md;
|
margin-bottom: $space-md;
|
||||||
|
background: $panel-bg;
|
||||||
|
border: $panel-border;
|
||||||
|
border-radius: 3px;
|
||||||
|
|
||||||
// Fix for search scroller in mobile view
|
// Fix for search scroller in mobile view
|
||||||
height: unset;
|
height: unset;
|
||||||
@ -191,10 +183,6 @@
|
|||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-item__body-title {
|
|
||||||
color: $list-item-link-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-item__body-folder-title {
|
.search-item__body-folder-title {
|
||||||
color: $text-color-weak;
|
color: $text-color-weak;
|
||||||
font-size: $font-size-xs;
|
font-size: $font-size-xs;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user