import { CSSProperties } from 'react'; export type TextStyle = { fontFamily: Exclude; fontSize: Exclude; fill: string; outlineWidth: number; outlineColor: string; outlineOpacity: number; } & Partial; export type Theme = { background: string; text: TextStyle; axis: { domain: { line: Partial; }; ticks: { line: Partial; text: TextStyle; }; legend: { text: TextStyle; }; }; grid: { line: Partial; }; crosshair: { line: { stroke: string; strokeWidth: number; strokeOpacity: number; strokeDasharray: string; }; }; legends: { hidden: { symbol: Partial<{ fill: string; opacity: number; }>; text: TextStyle; }; text: TextStyle; title: { text: TextStyle; }; ticks: { line: Partial; text: TextStyle; }; }; labels: { text: TextStyle; }; markers: { lineColor: string; lineStrokeWidth: number; text: TextStyle; }; dots: { text: TextStyle; }; tooltip: { container: Partial; basic: Partial; chip: Partial; table: Partial; tableCell: Partial; tableCellValue: Partial; }; annotations: { text: TextStyle; link: { stroke: string; strokeWidth: number; outlineWidth: number; outlineColor: string; outlineOpacity: number; } & Partial>; outline: { stroke: string; strokeWidth: number; outlineWidth: number; outlineColor: string; outlineOpacity: number; } & Partial>; symbol: { fill: string; outlineWidth: number; outlineColor: string; outlineOpacity: number; } & Partial>; }; }; /** * Theme which can be passed to chart components. * * Internal component will often rely on `Theme` to avoid * having to recompute the inherited properties each time we need the theme. */ export type PartialTheme = Partial<{ background: Theme['background']; text: Partial; axis: Partial<{ domain: Partial<{ line: Partial; }>; ticks: Partial<{ line: Partial; text: Partial; }>; legend: Partial<{ text: Partial; }>; }>; grid: Partial<{ line: Partial; }>; crosshair: Partial<{ line: Partial; }>; legends: Partial<{ hidden: Partial<{ symbol: Theme['legends']['hidden']['symbol']; text: Theme['legends']['hidden']['text']; }>; title: Partial<{ text: Partial; }>; text: Partial; ticks: Partial<{ line: Partial; text: Partial; }>; }>; labels: Partial<{ text: Partial; }>; markers: Partial; dots: Partial<{ text: Partial; }>; tooltip: Partial; annotations: Partial<{ text: Partial; link: Partial; outline: Partial; symbol: Partial; }>; }>; /** * Required properties without inheritance. * * The theme supports defining styles at the top level * (for text for example), which are then used to populate * similar nested properties. * * For example `text` will be merged with `axis.ticks.text`, * we use this approach so that it's simpler to define global styles. */ export type ThemeWithoutInheritance = { background: Theme['background']; text: Theme['text']; axis: { domain: { line: Theme['axis']['domain']['line']; }; ticks: { line: Theme['axis']['ticks']['line']; text: Partial; }; legend: { text: Partial; }; }; grid: { line: Theme['grid']['line']; }; crosshair: { line: Theme['crosshair']['line']; }; legends: { hidden: { symbol: Theme['legends']['hidden']['symbol']; text: Partial; }; title: { text: Partial; }; text: Partial; ticks: { line: Theme['legends']['ticks']['line']; text: Partial; }; }; labels: { text: Partial; }; markers: { lineColor: Theme['markers']['lineColor']; lineStrokeWidth: Theme['markers']['lineStrokeWidth']; text: Partial; }; dots: { text: Partial; }; tooltip: Theme['tooltip']; annotations: { text: Partial; link: Theme['annotations']['link']; outline: Theme['annotations']['outline']; symbol: Theme['annotations']['symbol']; }; }; //# sourceMappingURL=types.d.ts.map