import { default as React, CSSProperties } from 'react';
import { BreakpointSupport } from '../../../helpers';
import { CardContentProps } from './card-content/card-content';
import { BorderRadius, CardBackground, CardBorderType, CardContentPaddingNumber } from './utility';
export type CardContentPadding = CardContentPaddingNumber | {
vertical: CardContentPaddingNumber;
horizontal: CardContentPaddingNumber;
} | {
top: CardContentPaddingNumber;
right: CardContentPaddingNumber;
bottom: CardContentPaddingNumber;
left: CardContentPaddingNumber;
};
export interface SharedCardProps {
/**
* Additional class.
*/
className?: string;
/**
* Card content padding
* Values can be:
* - predefined number value in rems
* - object of separated horizontal and vertical number values in rems
* - object of separated top, right, bottom, left number values in rems
*/
padding?: CardContentPadding;
/**
* Background color.
* @default primary
*/
background?: CardBackground;
/**
* Background image.
*/
backgroundImage?: CSSProperties['backgroundImage'];
/**
* Background position for the image.
*/
backgroundPosition?: CSSProperties['backgroundPosition'];
/**
* Background size for the image.
*/
backgroundSize?: CSSProperties['backgroundSize'];
/**
* Background repeat for the image.
*/
backgroundRepeat?: CSSProperties['backgroundRepeat'];
/**
* Renders a separator line between this section and the adjacent card content.
* Useful for visually dividing stacked `Card.Header`, `Card.Content` and `Card.Notification` sections.
* @default false
*/
hasSeparator?: boolean;
}
type CardBreakpointProps = {
/**
* Additional class.
*/
className?: string;
/**
* Controls card border radius.
*
* Accepts `false` to remove all radius or an object to control sides or individual corners.
*
* Side values affect two corners while corner values take precedence.
*
* Examples:
* `false` → no radius
* `{ top:false }` → removes top corners
* `{ left:false }` → removes left corners
* `{ topLeft:false }` → removes one corner
* `{ bottom:false, bottomRight:true }` → corner override
*/
borderRadius?: BorderRadius;
/**
* Removes the card's border entirely.
* @default false
*/
borderless?: boolean;
/**
* Adds a colored accent border to the top or left of the card (e.g. `top-success-primary`, `left-danger-primary`).
*/
border?: CardBorderType;
} & Pick;
export interface CardProps extends BreakpointSupport {
children?: React.ReactNode;
}
export declare const Card: React.ForwardRefExoticComponent> & {
Content: (props: CardContentProps) => JSX.Element;
Header: (props: CardContentProps) => JSX.Element;
Notification: (props: import('.').CardNotificationProps) => JSX.Element;
};
export default Card;