/// import type { Interpolation } from '@emotion/react'; import { type ResponsiveSystemCssProperties, type SystemStyleObject } from '../css-fn'; import { type Pseudos } from '../pseudos'; import { type Assign } from '../utility-types'; export type As = React.ElementType; /** * Extract the props of a React element or component */ export type PropsOf = React.ComponentPropsWithoutRef & { as?: As; }; type OmitCommonProps = Omit; export type RightJoinProps = OmitCommonProps & OverrideProps; type MergeWithAs = (RightJoinProps | RightJoinProps) & { as?: AsComponent; }; export type ComponentWithAs = { (props: MergeWithAs, React.ComponentProps, Props, AsComponent>): JSX.Element; displayName?: string; propTypes?: React.WeakValidationMap; contextTypes?: React.ValidationMap; defaultProps?: Partial; id?: string; }; type PseudoProps = { [K in Pseudos]?: SystemStyleObject; }; interface SystemProps extends ResponsiveSystemCssProperties, PseudoProps { } interface StyledProps extends SystemProps { /** * Used to pass theme-aware style props. * NB: This is the public API for user-land */ sx?: SystemStyleObject; /** * The emotion's css style object */ css?: Interpolation<{}>; } export interface StyledAntdComponent extends ComponentWithAs> { } export type HtmlAntdProps = Omit, 'ref' | keyof ResponsiveSystemCssProperties> & StyledProps & { as?: As; }; export {};