import { ElementType, ReactNode } from 'react'; import { Interpolation } from '@nex-ui/system'; import { ClassValue } from 'clsx'; import { OverrideProps, ComponentSlotClasses, ComponentPropsWithCommonProps } from '../../types/utils.js'; import { CardVariants } from '../../theme/recipes/card.js'; interface CardPropsOverrides { } type CardOwnProps = { /** * Usually, CardHeader, CardBody, CardFooter, and other custom content. */ children?: ReactNode; /** * The component or element to render as the root. * * @default 'div' */ as?: RootComponent; /** * Additional class names to apply to the root. */ className?: ClassValue; /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx?: Interpolation; /** * The shadow of the Card. * * @default 'md' */ shadow?: CardVariants['shadow']; /** * The border radius of the Card. * * @default 'md' */ radius?: CardVariants['radius']; /** * If true, applies a backdrop filter to the Card. */ blurred?: boolean; /** * If true, the Card will have a hover effect. */ hoverable?: boolean; }; type CardProps = OverrideProps, CardPropsOverrides>; type CardHeaderSlotProps = { content?: ComponentPropsWithCommonProps<'div'>; title?: ComponentPropsWithCommonProps<'div'>; subtitle?: ComponentPropsWithCommonProps<'div'>; }; type CardHeaderOwnProps = { /** * The content of the CardHeader, which disables the avatar, action, title, and subtitle props. */ children?: ReactNode; /** * The component or element to render as the root. * @default 'div' */ as?: RootComponent; /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx?: Interpolation; /** * The title of the CardHeader. */ title?: ReactNode; /** * The subtitle of the CardHeader. */ subtitle?: ReactNode; /** * The avatar of the CardHeader. */ avatar?: ReactNode; /** * The action area of the CardHeader. */ action?: ReactNode; /** * Additional class names to apply to the root. */ className?: ClassValue; /** * The className used for each slot. */ classNames?: ComponentSlotClasses; /** * The props used for each slot. */ slotProps?: CardHeaderSlotProps; }; interface CardHeaderPropsOverrides { } type CardHeaderProps = OverrideProps, CardHeaderPropsOverrides>; type CardBodyOwnProps = { /** * The component or element to render as the root. * @default 'div' */ as?: RootComponent; /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx?: Interpolation; /** * Additional class names to apply to the root. */ className?: ClassValue; /** * The content of the CardBody. */ children?: ReactNode; }; interface CardBodyPropsOverrides { } type CardBodyProps = OverrideProps, CardBodyPropsOverrides>; type CardFooterOwnProps = { /** * The component or element to render as the root. * @default 'div' */ as?: RootComponent; /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx?: Interpolation; /** * Additional class names to apply to the root. */ className?: ClassValue; /** * The content of the CardFooter. */ children?: ReactNode; }; interface CardFooterPropsOverrides { } type CardFooterProps = OverrideProps, CardFooterPropsOverrides>; interface CardActionAreaPropsOverrides { } type CardActionAreaOwnProps = { /** * The component or element to render as the root. * @default 'button' */ as?: RootComponent; /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx?: Interpolation; /** * If `true`, the component is disabled. */ disabled?: boolean; /** * Additional class names to apply to the root. */ className?: ClassValue; }; type CardActionAreaProps = OverrideProps, CardActionAreaPropsOverrides>; export type { CardActionAreaProps, CardActionAreaPropsOverrides, CardBodyProps, CardBodyPropsOverrides, CardFooterProps, CardFooterPropsOverrides, CardHeaderProps, CardHeaderPropsOverrides, CardProps, CardPropsOverrides };