import * as React from 'react'; import * as CSS from 'csstype'; import { OverridableStringUnion } from '@mui/types'; type CSSProperties = CSS.PropertiesFallback; type CSSPropertiesMultiValue = { [K in keyof CSSProperties]: CSSProperties[K] | Array>; }; type CSSPropertiesWithCallback = { [K in keyof CSSProperties]: CSSProperties[K] | Array> | ((props: Props) => CSSProperties[K]); }; type CSSPseudos = { [K in CSS.Pseudos]?: CSSObject; }; type CSSPseudosNoCallback = { [K in CSS.Pseudos]?: CSSObjectNoCallback; }; interface CSSOthersObject { [selector: string]: CSSObject; } interface CSSOthersObjectNoCallback { [selector: string]: CSSObjectNoCallback; } type CSSObject = CSSPropertiesWithCallback | CSSPseudos | CSSOthersObject; type CSSObjectNoCallback = CSSPropertiesMultiValue | CSSPseudosNoCallback | CSSOthersObjectNoCallback; type BaseDefaultProps = object; type NoInfer = [T][T extends any ? 0 : never]; type FastOmit = { [K in keyof T as K extends U ? never : K]: T[K]; }; type Substitute = FastOmit & B; type PolymorphicComponentProps : BaseDefaultProps> = NoInfer, 'as'>> & { as?: AsTarget; sx?: SxProp; children?: React.ReactNode; }; interface PolymorphicComponent extends React.ForwardRefExoticComponent { (props: PolymorphicComponentProps): React.JSX.Element; } interface BreakpointOverrides { } type Breakpoint = OverridableStringUnion<'xs' | 'sm' | 'md' | 'lg' | 'xl', BreakpointOverrides>; interface ThemeInput extends Record { /** * The prefix to be used for the CSS variables. */ cssVarPrefix?: string; /** * The color schemes to be used for the theme. */ colorSchemes?: Record; /** * The default color scheme to be used for the theme. It must be one of the keys from `theme.colorSchemes`. * Required when `colorSchemes` is provided. * @default 'light' */ defaultColorScheme?: ColorScheme; /** * If provided, it will be used to create a selector for the color scheme. * This is useful if you want to use class or data-* attributes to apply the color scheme. * * The callback receives the colorScheme with the possible values of: * - undefined: the selector for tokens that are not color scheme dependent * - string: the selector for the color scheme * * @example * // class selector * (colorScheme) => colorScheme !== 'light' ? `.theme-${colorScheme}` : ":root" * * @example * // data-* attribute selector * (colorScheme) => colorScheme !== 'light' ? `[data-theme="${colorScheme}"]` : ":root" */ getSelector?: (colorScheme: ColorScheme | undefined, css: Record) => string | Record; /** * A function to skip generating a CSS variable for a specific path or value. * * Note: properties with function as a value are always skipped. * * @example * // skip the `meta.*` fields from generating CSS variables and `theme.vars` * (keys, value) => keys[0] === 'meta' * */ shouldSkipGeneratingVar?: (objectPathKeys: Array, value: string | number) => boolean; components?: Partial; defaultProps: Record; }>>; } type ExtendTheme; } = { colorScheme: string; tokens: Record; }> = ThemeInput & Options['tokens'] & { vars: Options['tokens']; applyStyles: (colorScheme: Options['colorScheme'], styles: CSSObject) => Record>; getColorSchemeSelector: (colorScheme: Options['colorScheme']) => string; generateStyleSheets: () => Array>; }; interface ThemeArgs { } export type { BaseDefaultProps as B, CSSObjectNoCallback as C, ExtendTheme as E, NoInfer as N, PolymorphicComponent as P, Substitute as S, ThemeArgs as T, Breakpoint as a, CSSProperties as b, CSSObject as c, CSSPropertiesMultiValue as d, CSSPropertiesWithCallback as e, CSSPseudos as f, CSSPseudosNoCallback as g, CSSOthersObject as h, CSSOthersObjectNoCallback as i, PolymorphicComponentProps as j, BreakpointOverrides as k };