import { AriaLabelingProps, RefObject, DOMProps as SharedDOMProps } from '@react-types/shared'; import React, { AnchorHTMLAttributes, Context, CSSProperties, DetailedHTMLProps, ForwardedRef, JSX, ReactElement, ReactNode, RefCallback } from 'react'; export declare const DEFAULT_SLOT: unique symbol; interface SlottedValue { slots?: Record; } export type SlottedContextValue = SlottedValue | T | null | undefined; export type ContextValue = SlottedContextValue>; type ProviderValue = [Context, T]; type ProviderValues = [ProviderValue] | [ProviderValue, ProviderValue] | [ProviderValue, ProviderValue, ProviderValue] | [ProviderValue, ProviderValue, ProviderValue, ProviderValue] | [ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue] | [ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue] | [ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue] | [ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue] | [ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue] | [ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue] | [ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue] | [ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue, ProviderValue]; interface ProviderProps { values: ProviderValues; children: ReactNode; } export declare function Provider({ values, children }: ProviderProps): JSX.Element; export interface StyleProps { /** The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. */ className?: string; /** The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the element. */ style?: CSSProperties; } export interface DOMProps extends StyleProps, SharedDOMProps { /** The children of the component. */ children?: ReactNode; } export type ClassNameOrFunction = string | ((values: T & { defaultClassName: string | undefined; }) => string); type StyleOrFunction = CSSProperties | ((values: T & { defaultStyle: CSSProperties; }) => CSSProperties | undefined); export interface StyleRenderProps extends DOMRenderProps { /** The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state. */ className?: ClassNameOrFunction; /** The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the element. A function may be provided to compute the style based on component state. */ style?: StyleOrFunction; } export type ChildrenOrFunction = ReactNode | ((values: T & { defaultChildren: ReactNode | undefined; }) => ReactNode); export interface RenderProps extends StyleRenderProps { /** The children of the component. A function may be provided to alter the children based on component state. */ children?: ChildrenOrFunction; } interface RenderPropsHookOptions extends RenderProps, SharedDOMProps, AriaLabelingProps { values: T; defaultChildren?: ReactNode; defaultClassName?: string; defaultStyle?: CSSProperties; } interface RenderPropsHookRetVal { className?: string; style?: CSSProperties; children?: ReactNode; 'data-rac': string; render?: DOMRenderFunction; } export declare function useRenderProps(props: RenderPropsHookOptions): RenderPropsHookRetVal; /** * A helper function that accepts a user-provided render prop value (either a static value or a function), * and combines it with another value to create a final result. */ export declare function composeRenderProps(value: T extends any ? (T | ((renderProps: U) => V)) : never, wrap: (prevValue: T, renderProps: U) => V): (renderProps: U) => V; export type WithRef = T & { ref?: ForwardedRef; }; export interface SlotProps { /** * A slot name for the component. Slots allow the component to receive props from a parent component. * An explicit `null` value indicates that the local props completely override all props received from a parent. */ slot?: string | null; } export declare function useSlottedContext(context: Context>, slot?: string | null): T | null | undefined; export declare function useContextProps(props: T & SlotProps, ref: ForwardedRef | undefined, context: Context>): [T, RefObject]; export declare function useSlot(initialState?: boolean | (() => boolean)): [RefCallback, boolean]; /** * Filters out `data-*` attributes to keep them from being passed down and duplicated. * @param props */ export declare function removeDataAttributes(props: T): T; export interface RACValidation { /** * Whether to use native HTML form validation to prevent form submission * when the value is missing or invalid, or mark the field as required * or invalid via ARIA. * @default 'native' */ validationBehavior?: 'native' | 'aria'; } export type DOMRenderFunction = (props: React.JSX.IntrinsicElements[E], renderProps: T) => ReactElement; export interface DOMRenderProps { /** * Overrides the default DOM element with a custom render function. * This allows rendering existing components with built-in styles and behaviors * such as router links, animation libraries, and pre-styled components. * * Requirements: * * * You must render the expected element type (e.g. if `