import { Node } from "react-stately"; import { SectionProps as RSSectionProps } from "react-stately"; import { Key, RenderBaseProps, RenderStyleProps } from "../types"; import { LinkDOMProps } from "@react-types/shared"; export interface ItemRenderProps { isSelected: boolean; isFocused: boolean; isFocusVisible: boolean; } export interface ElementItemProps extends RenderBaseProps, LinkDOMProps { /** Id for this item */ id?: Key; /** Associated callback when an action is performed on this item*/ onAction?: () => void; /** A string representation of the item's contents, used for features like typeahead. */ textValue?: string; /** An accessibility label for this item. */ "aria-label"?: string; } interface ItemContextValue { render: (props: ElementItemProps, ref: React.ForwardedRef, item: Node) => React.ReactElement; } export declare const ItemContext: import("react").Context; /** An Item in a Collection component * @example * * Apple * Orange * Banana * */ export declare const Item: (props: ElementItemProps & import("react").RefAttributes) => import("react").ReactElement | null; export interface ElementSectionProps extends RSSectionProps, RenderStyleProps { id?: Key; } interface SectionContextValue { render: (props: ElementSectionProps, ref: React.ForwardedRef, section: Node) => React.ReactElement; } export declare const SectionContext: import("react").Context; /** A Section / grouping of items in a collection component * @example * *
* Apple * Orange * Banana *
*
* Carrot * Potato * Onion *
*
*/ export declare const Section: (props: ElementSectionProps & import("react").RefAttributes) => React.ReactElement | null; export type { ElementItemProps as ItemProps, ElementSectionProps as SectionProps, };