import { ReactNode, CSSProperties } from 'react'; /** * Configuration for using a string/ReactNode title */ type DataContainerCardWithTitle = { /** * The title displayed in the header. * Can be a string or any ReactNode. */ title: ReactNode; customTitleComponent?: never; }; /** * Configuration for using a fully custom title component */ type DataContainerCardWithCustomTitle = { /** * A custom component to render as the entire title area. * When provided, this replaces the default title rendering entirely. */ customTitleComponent: ReactNode; title?: never; }; /** * Title can be provided as either `title` or `customTitleComponent`, but not both. * This union type enforces mutual exclusivity. */ type TitleOptions = DataContainerCardWithTitle | DataContainerCardWithCustomTitle; /** * Border radius options for the container */ export type DataContainerCardBorderRadius = 'none' | 'sm' | 'md' | 'lg'; /** * Drop shadow intensity options */ export type DataContainerCardShadow = 'none' | 'sm' | 'md' | 'lg'; /** * Content padding options */ export type DataContainerCardContentPadding = 'none' | 'sm' | 'md'; /** * Props for the DataContainerCard component */ export type DataContainerCardProps = { /** * The content to be displayed inside the container. * For collapsible mode, this is shown when expanded. */ children: ReactNode; /** * Controls whether the container is collapsible (accordion behavior). * When false, the container is always expanded and shows no toggle. * @default false */ collapsible?: boolean; /** * Initial open/closed state for collapsible containers. * Ignored when collapsible is false. * @default true */ defaultOpen?: boolean; /** * Controlled open state. When provided, the component becomes controlled. * Use with `onOpenChange` for full control. */ open?: boolean; /** * Callback fired when the open state changes (collapsible mode only). * @param isOpen - The new open state */ onOpenChange?: (isOpen: boolean) => void; /** * Indicates this is a nested child container within another DataContainerCard. * Applies appropriate visual styling (reduced header size, nested background). * @default false */ isChild?: boolean; /** * Optional content to display on the right side of the header. * Commonly used for action buttons, status indicators, or badges. */ rightSection?: ReactNode; /** * Border radius of the container. * @default 'none' */ borderRadius?: DataContainerCardBorderRadius; /** * Drop shadow intensity. Use for elevated appearance. * @default 'none' */ shadow?: DataContainerCardShadow; /** * Custom border color. When undefined, uses default theme border color. * Accepts any valid CSS color value or theme token path. * @example 'grey.200' | '#e0e0e0' | 'error' */ borderColor?: string; /** * Whether to show a border around the container. * @default false */ showBorder?: boolean; /** * Whether to show a border below the header when content is visible. * @default true */ showHeaderBorderBottom?: boolean; /** * Custom height for the header in pixels. * - Parent containers: 48px (default) * - Child containers: 40px (applied automatically when isChild=true) * - Set to 0 for auto height */ headerHeight?: number; /** * Whether the header should stick to the top when scrolling within a scrollable parent. * @default false */ stickyHeader?: boolean; /** * Padding for the content area. * @default 'md' */ contentPadding?: DataContainerCardContentPadding; /** * Unique identifier for the container. * Used for accessibility attributes and the onOpenChange callback. */ id?: string; /** * Data attribute for tracking/analytics (e.g., Pendo). */ dataId?: string; /** * data-testid attribute for testing purposes. */ dataTestId?: string; /** * Additional CSS class name for custom styling. */ className?: string; /** * Inline styles applied to the container. */ style?: CSSProperties; } & TitleOptions; export {}; //# sourceMappingURL=DataContainerCard.types.d.ts.map