import { StyleProps, SystemStyleObject } from "@chakra-v2/styled-system"; import { Dict } from "@chakra-v2/utils"; import { CSSObject, FunctionInterpolation } from "@emotion/styled"; import { ElementType } from "react"; import { AsProps, ChakraComponent, ChakraProps, PropsOf } from "./system.types"; import { DOMElements } from "./system.utils"; type StyleResolverProps = SystemStyleObject & { __css?: SystemStyleObject; sx?: SystemStyleObject; theme: any; css?: CSSObject; }; interface GetStyleObject { (options: { baseStyle?: SystemStyleObject | ((props: StyleResolverProps) => SystemStyleObject); }): FunctionInterpolation; } /** * Style resolver function that manages how style props are merged * in combination with other possible ways of defining styles. * * For example, take a component defined this way: * ```jsx * * ``` * * We want to manage the priority of the styles properly to prevent unwanted * behaviors. Right now, the `sx` prop has the highest priority so the resolved * fontSize will be `40px` */ export declare const toCSSObject: GetStyleObject; export interface ChakraStyledOptions extends Dict { shouldForwardProp?(prop: string): boolean; label?: string; baseStyle?: SystemStyleObject | ((props: StyleResolverProps) => SystemStyleObject); } export declare function styled(component: T, options?: ChakraStyledOptions): ChakraComponent; export type HTMLChakraComponents = { [Tag in DOMElements]: ChakraComponent; }; export type HTMLChakraProps = Omit, "ref" | keyof StyleProps> & ChakraProps & AsProps; export {};