import type { PropsWithChildren, Ref, CSSProperties } from 'react'; import type { Theme, ThemeOptions, PaletteOptions, PaletteColor, Palette, SxProps, Components, ComponentsVariants, TypeAction } from '@mui/material/styles'; import type { ThemePaletteSemanticColors } from './theme-config/colors'; export type { Theme, Components, ThemeOptions, ComponentsVariants, Palette }; export type ColorScheme = 'auto' | 'light' | 'dark'; export type ThemeName = 'default' | 'marketing-suite' | 'hub' | 'unstable' | 'argon-beta' | ({} & string); type AllowedOverrides = 'zIndex'; export type ThemeOptionsOverrides = Partial>; export type ThemeOverrides = (overrides: ThemeOptionsOverrides) => ThemeOptionsOverrides; export type CustomThemePalette = Pick & { action?: { active: TypeAction['active']; focus: TypeAction['focus']; disabled: TypeAction['disabled']; disabledBackground: TypeAction['disabledBackground']; hover: TypeAction['hover']; selected: TypeAction['selected']; __unstableGradientAngle?: TypeAction['__unstableGradientAngle']; }; background?: PaletteOptions['background']; divider?: Palette['divider']; text?: PaletteOptions['text']; }; type HeadingTypographyConfig = { fontFamily?: CSSProperties['fontFamily']; fontSize?: CSSProperties['fontSize']; fontWeight?: CSSProperties['fontWeight']; lineHeight?: CSSProperties['lineHeight']; letterSpacing?: CSSProperties['letterSpacing']; }; type StaticTypographyConfig = { fontFamily?: CSSProperties['fontFamily']; }; type ButtonTypographyConfig = { fontFamily?: CSSProperties['fontFamily']; textTransform?: CSSProperties['textTransform']; }; export type CustomThemeTypography = { fontFamily?: CSSProperties['fontFamily']; display1?: HeadingTypographyConfig; display2?: HeadingTypographyConfig; display3?: HeadingTypographyConfig; display4?: HeadingTypographyConfig; display5?: HeadingTypographyConfig; display6?: HeadingTypographyConfig; h1?: HeadingTypographyConfig; h2?: HeadingTypographyConfig; h3?: HeadingTypographyConfig; h4?: HeadingTypographyConfig; h5?: HeadingTypographyConfig; h6?: HeadingTypographyConfig; subtitle1?: StaticTypographyConfig; subtitle2?: StaticTypographyConfig; body1?: StaticTypographyConfig; body2?: StaticTypographyConfig; caption?: StaticTypographyConfig; overline?: StaticTypographyConfig; button?: ButtonTypographyConfig; }; export type ComponentVariantsMerge = 'concat' | 'replace'; export type CustomThemeOptions = { componentVariantsMerge: ComponentVariantsMerge; }; export type CustomTheme = { name: string; palette: { light: CustomThemePalette; dark: CustomThemePalette; }; shadows?: ThemeOptions['shadows']; shape?: ThemeOptions['shape']; typography?: CustomThemeTypography; zIndex?: ThemeOptions['zIndex']; components?: Components; options?: CustomThemeOptions; }; export interface CustomComponentProps { id?: string; className?: string; sx?: SxProps; ref?: Ref; } export interface CustomComponentWithChildrenProps extends PropsWithChildren { } type MuiBuiltInPaletteSemanticColors = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error'; export type CustomPaletteSemanticColors = Exclude; export type CustomPaletteInterface = { [key in CustomPaletteSemanticColors]: PaletteColor; }; export type CustomPaletteOptionsInterface = { [key in CustomPaletteSemanticColors]?: PaletteColor; }; export type SharedPropsColorOverrides = { [key in CustomPaletteSemanticColors]: true; }; export interface SharedPropsSizeOverrides { tiny: boolean; } export interface SharedPropsFontSizeOverrides { tiny: boolean; } export interface CustomTypographyVariants { display1?: CSSProperties; display2?: CSSProperties; display3?: CSSProperties; display4?: CSSProperties; display5?: CSSProperties; display6?: CSSProperties; }