import * as React from 'react'; /** Props for items rendered inside a CardList. */ export interface CardListItemProps { /** The data item to render. */ item: T; /** Whether this item is currently selected/active. */ isActive: boolean; /** Whether this item's checkbox is checked (multi-select). */ isChecked: boolean; /** Called when the item's checkbox state changes. */ onCheckboxChange: () => void; } /** Configuration for the CardList header area. */ export interface CardListHeader { /** Title displayed in the header. */ title?: string; /** Subtitle or count displayed below the title. */ subtitle?: string; /** Additional content rendered to the right of the title (e.g. action buttons). */ actions?: React.ReactNode; } /** Props for the CardList component. */ export interface CardListProps { /** Array of items to display. */ items: T[]; /** Unique key extractor for each item. */ keyExtractor: (item: T) => string | number; /** Render function for each item. Receives item data and interaction state. */ renderItem: (props: CardListItemProps) => React.ReactNode; /** Header configuration with title, subtitle, and action buttons. */ header?: CardListHeader; /** Placeholder text for the search input. */ searchPlaceholder?: string; /** Called with debounced search query when user types in the search input. */ onSearch?: (query: string) => void; /** Search debounce delay in milliseconds. Defaults to 500ms. */ searchDebounceMs?: number; /** Called when the user scrolls to the bottom of the list. Use for infinite scroll / pagination. */ onLoadMore?: () => void; /** Whether more items are currently being loaded. Disables onLoadMore while true. */ isLoading?: boolean; /** Whether all items have been loaded. Hides the infinite scroll sentinel when true. */ hasMore?: boolean; /** Message displayed when items array is empty and isLoading is false. */ emptyMessage?: string; /** Loading message displayed at the bottom of the list while isLoading is true. */ loadingMessage?: string; /** The key/id of the currently active (selected) item. Compared against keyExtractor output. */ activeItemKey?: string | number | null; /** Array of checked item keys for multi-select. */ checkedItemKeys?: (string | number)[]; /** Called when an item's checkbox state changes. */ onItemCheckChange?: (key: string | number) => void; /** Called when select-all checkbox changes. */ onSelectAll?: () => void; /** Called to clear all selections. */ onClearSelection?: () => void; /** Content rendered in the bulk action bar. */ bulkActions?: React.ReactNode; /** Renders the selection counter label. Receives the current checked count. Defaults to `${count} selected`. */ selectionLabel?: (count: number) => string; /** Additional CSS class for the root container. */ className?: string; /** Additional CSS class for the scroll container. */ scrollClassName?: string; } /** * A generic, scrollable card list with built-in search, infinite scroll, and multi-select support. * * @example * ```tsx * m.uid} * renderItem={({ item, isActive, onClick }) => ( *
* {item.subject} *
* )} * header={{ title: 'INBOX', subtitle: '29 messages' }} * searchPlaceholder="Search..." * onSearch={setSearchQuery} * onLoadMore={loadMore} * hasMore={messages.length < total} * isLoading={isLoading} * emptyMessage="No items" * /> * ``` */ declare const CardList: ({ items, keyExtractor, renderItem, header, searchPlaceholder, onSearch, searchDebounceMs, onLoadMore, isLoading, hasMore, emptyMessage, loadingMessage, activeItemKey, checkedItemKeys, onItemCheckChange, onSelectAll, onClearSelection, bulkActions, selectionLabel, className, scrollClassName, }: CardListProps) => React.JSX.Element; export default CardList; //# sourceMappingURL=CardList.d.ts.map