import type { PartsStyleInterpolation, PseudoKey, SemanticValue, StyleObjectOrFn, SystemStyleInterpolation, ThemingProps } from "@chakra-ui/styled-system"; import { Styles } from "@chakra-ui/theme-tools"; type ColorMode = "light" | "dark"; type Dict = Record; type ColorModeOptions = { initialColorMode?: "light" | "dark" | "system"; useSystemColorMode?: boolean; disableTransitionOnChange?: boolean; }; export type RecursiveProperty = RecursiveObject | T; export interface RecursiveObject { [property: string]: RecursiveProperty; } export interface ThemeConfig extends ColorModeOptions { cssVarPrefix?: string; } export type ThemeTransitions = RecursiveObject & { property: RecursiveObject; easing: RecursiveObject; duration: RecursiveObject; }; export interface ColorHues { 50: string; 100: string; 200: string; 300: string; 400: string; 500: string; 600: string; 700: string; 800: string; 900: string; } export type Colors = RecursiveObject> | string>; export type ThemeDirection = "ltr" | "rtl"; export interface ComponentDefaultProps extends Omit, Dict { } export interface ThemeComponentProps extends Omit { colorMode: ColorMode; theme: T; [x: string]: any; } export type ThemeComponentFunction = (props: ThemeComponentProps) => S; export type ThemingPropsThunk = S | ThemeComponentFunction; export interface SystemStyleObjectRecord { [key: string]: StyleObjectOrFn; } export interface ComponentSingleStyleConfig { parts?: never; baseStyle?: SystemStyleInterpolation; sizes?: Record; variants?: Record; defaultProps?: any; } export interface ComponentMultiStyleConfig { parts: string[] | readonly string[]; baseStyle?: PartsStyleInterpolation; sizes?: Record; variants?: Record; defaultProps?: any; } export type ComponentStyleConfig = ComponentSingleStyleConfig | ComponentMultiStyleConfig; export interface ThemeComponents { [componentName: string]: ComponentStyleConfig; } interface Typography { fonts: RecursiveObject; fontSizes: RecursiveObject; fontWeights: RecursiveObject; letterSpacings: RecursiveObject; lineHeights: RecursiveObject; } interface Foundations extends Typography { borders: RecursiveObject; breakpoints: Dict; colors: Colors; radii: RecursiveObject; shadows: RecursiveObject; sizes: RecursiveObject; space: RecursiveObject; transition: ThemeTransitions; zIndices: RecursiveObject; } export interface ChakraTheme extends Foundations { conditions?: Record; semanticTokens?: Partial>>>; components: ThemeComponents; config: ThemeConfig; direction: ThemeDirection; styles: Styles; layerStyles?: SystemStyleObjectRecord; textStyles?: SystemStyleObjectRecord; } export {};