import { IPartialTheme } from '@uifabric/styling'; import { IStyleFunctionOrObject } from '@uifabric/utilities'; import * as React from 'react'; /** * A baseline set of color plates. */ export declare type ColorTokens = Partial<{ background: string; contentColor: string; subTextColor: string; linkColor: string; iconColor: string; borderColor: string; dividerColor: string; focusColor: string; focusInnerColor: string; opacity: string; }>; export declare type ColorTokenSet = ColorTokens & ColorTokenStates; /** * A set of states for each color plate to use. * * Note: * * State names here align to a consistent naming convention: * * The component is _____ * * Bad: "hover", Good: "hovered" * * Additional considerations: * * The term "active" in css means that the keyboard or mouse button * which activates the component is pressed down. It is however ambiguous * with a focused state, as the HTML object model refers to the focused * element as the "activeElement". To resolve ambiguity and to be more * compatible with other platforms reusing token names, we have decided to snap * to "pressed". */ export declare type ColorTokenStates = Partial<{ hovered: ColorTokens; pressed: ColorTokens; disabled: ColorTokens; checked: ColorTokens; checkedHovered: ColorTokens; checkedPressed: ColorTokens; }>; export declare type FontTokens = Partial<{ fontFamily: string; fontSize: string; fontWeight: string; }>; export declare const getStyleFromPropsAndOptions: , TOptions extends StyleOptions>(props: TProps, options: TOptions, prefix?: string | undefined) => import("react").CSSProperties; /** * Merges multiple themes. */ export declare function mergeThemes(...themes: (undefined | PartialTheme | Theme)[]): TResult; /** * A partial theme, provided by the customer. The internal `createTheme` helper will fill in the rest. */ export declare interface PartialTheme extends RecursivePartial { } /** * Recursive partial type. */ export declare type RecursivePartial = { [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial[] : T[P] extends object ? RecursivePartial : T[P]; }; export declare interface StyleOptions { slotProps: ((props: TProps) => Record)[]; } /** * Typing containing the definition for the `style` and `tokens` props that will be extended for the calculation of the * style prop. */ export declare interface StyleProps { style?: React.CSSProperties; tokens?: TTokens; } /** * A prepared (fully expanded) theme object. */ export declare interface Theme extends IPartialTheme { components?: { [componentName: string]: { styles?: IStyleFunctionOrObject; }; }; tokens?: Tokens; stylesheets?: string[]; } /** * ThemeProvider, used for providing css variables and registering stylesheets. */ export declare const ThemeProvider: React.ForwardRefExoticComponent>; /** * Props for the ThemeProvider component. */ export declare interface ThemeProviderProps extends React.HTMLAttributes { /** * Defines the theme provided by the user. */ theme?: PartialTheme | Theme; } export declare interface Tokens { body: ColorTokenSet & TokenSetType; [key: string]: TokenSetType; } /** * A token set can provide a single string or object, mapping additional sub-parts of a token set. */ export declare type TokenSetType = { [key: string]: string | TokenSetType | undefined; }; export declare const tokensToStyleObject: (tokens?: TokenSetType | undefined, prefix?: string | undefined, style?: import("react").CSSProperties | undefined) => import("react").CSSProperties; /** * Hook which given draftState, will ensure that tokens are spit out to inline styles. * @param draftState - state to read and manipulate. Expected to have `tokens` prop, will * transform into inline * @param prefix - prefix to prepend to variables (e.g. "--button") */ export declare const useInlineTokens: (draftState: { style?: import("react").CSSProperties | undefined; tokens?: TokenSetType | undefined; }, prefix: string) => void; /** * React hook for programatically accessing the theme. */ export declare const useTheme: () => Theme; export { }