import React from 'react'; import { U as UI } from '../ui-40a4a170.js'; /** * Base props shared across all Card sub-components. * * This interface provides common styling and structural props * that all Card sub-components support. */ interface CardSubComponentProps { /** CSS class names to apply */ className?: string; /** Inline styles to apply */ style?: React.CSSProperties; /** Child elements to render */ children?: React.ReactNode; } /** * Props for the Card.Title sub-component. * * @extends CardSubComponentProps */ interface CardTitleProps extends CardSubComponentProps { /** * HTML element to render as. * @default 'h3' */ as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; /** * HTML id attribute for the title. * Useful for aria-labelledby references. */ id?: string; } /** * Props for the Card.Content sub-component. * * @extends CardSubComponentProps */ interface CardContentProps extends CardSubComponentProps { /** * HTML element to render as. * Use 'article' for standalone content, 'div' for generic containers. * @default 'article' */ as?: 'article' | 'div' | 'section'; } /** * Props for the Card.Footer sub-component. * * @extends CardSubComponentProps */ interface CardFooterProps extends CardSubComponentProps { /** * HTML element to render as. * @default 'div' */ as?: 'div' | 'footer'; } /** * Type for Card component with attached sub-components. * * This type ensures TypeScript recognizes Card.Title, Card.Content, and Card.Footer * as valid properties on the Card component. */ interface CardComponent extends React.FC { Title: React.FC; Content: React.FC; Footer: React.FC; displayName: string; } /** * Props for the main Card component. * * Extends all props from the UI component while adding Card-specific functionality. * Supports polymorphic rendering via the `as` prop. * * @extends React.ComponentProps */ interface CardProps extends React.ComponentProps { /** * HTML element to render the Card as. * Inherits from UI component's polymorphic `as` prop. * @default 'div' */ as?: React.ElementType; /** * ARIA role for the card. * Use 'article' for standalone content, 'region' with aria-label for landmarks. * @example * ```tsx * ... * ... * ``` */ role?: string; /** * Accessible label for the card. * Required when using interactive cards or role="region". * @example * ```tsx * ... * ``` */ 'aria-label'?: string; /** * ID of element that labels this card. * @example * ```tsx * * Title * * ``` */ 'aria-labelledby'?: string; /** * ID of element that describes this card. */ 'aria-describedby'?: string; /** * Makes the card interactive with keyboard support. * Adds tabIndex, role="button", and keyboard event handlers. * @default false */ interactive?: boolean; /** * Click handler for interactive cards. * When provided without `interactive`, a warning will be logged in development. */ onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void; /** * Tab index for keyboard navigation. * Automatically set to 0 when `interactive` is true. */ tabIndex?: number; } /** * Card.Title - Title sub-component for Card * * Renders a heading element for the card title. Defaults to h3 for proper * document outline, but can be customized via the `as` prop. * * ## Accessibility * - Use appropriate heading level based on document structure * - Combine with `aria-labelledby` on parent Card for accessible names * * @example * ```tsx * * Featured Product * * ``` * * @example * ```tsx * // Custom heading level * Section Title * ``` */ declare const Title: { ({ children, className, style, as, ...props }: CardTitleProps): React.JSX.Element; displayName: string; }; /** * Card.Content - Content sub-component for Card * * Renders the main content area of the card. Defaults to `
` for * standalone content, but can be changed to `div` or `section` via the `as` prop. * * ## Semantic HTML Guidelines * - Use `article` (default) for self-contained, syndicate-able content * - Use `div` for generic content containers * - Use `section` for thematic groupings with a heading * * @example * ```tsx * * Article Title * *

This is standalone content...

*
*
* ``` * * @example * ```tsx * // Generic container (not standalone content) * *

Generic content...

*
* ``` */ declare const Content: { ({ children, className, style, as, ...props }: CardContentProps): React.JSX.Element; displayName: string; }; /** * Card.Footer - Footer sub-component for Card * * Renders a footer section for the card. Use for actions, metadata, or * supplementary information. * * @example * ```tsx * * Product * Description... * * * $29.99 * * * ``` * * @example * ```tsx * // Semantic footer element * *

Last updated: 2024-01-15

*
* ``` */ declare const Footer: { ({ children, className, style, as, ...props }: CardFooterProps): React.JSX.Element; displayName: string; }; declare const Card: CardComponent; export { Card, CardProps, Content, Footer, Title, Card as default };