import * as React from 'react';
export type HTMLProps = React.HTMLAttributes & {
ref?: React.Ref | undefined;
};
export interface FloatingUIOpenChangeDetails {
open: boolean;
reason: string;
nativeEvent: Event;
nested: boolean;
triggerElement?: Element | undefined;
}
export type BaseUIEvent> = E & {
preventBaseUIHandler: () => void;
readonly baseUIHandlerPrevented?: boolean;
};
type WithPreventBaseUIHandler = T extends ((event: infer E) => any) ? E extends React.SyntheticEvent ? (event: BaseUIEvent) => ReturnType : T : T extends undefined ? undefined : T;
/**
* Adds a `preventBaseUIHandler` method to all event handlers.
*/
export type WithBaseUIEvent = { [K in keyof T]: WithPreventBaseUIHandler };
/**
* Shape of the render prop: a function that takes props to be spread on the element and component's state and returns a React element.
*
* @template Props Props to be spread on the rendered element.
* @template State Component's internal state.
*/
export type ComponentRenderFn = (props: Props, state: State) => React.ReactElement;
/**
* Props shared by all Base UI components.
* Contains `className` (string or callback taking the component's state as an argument) and `render` (function to customize rendering).
*/
export type BaseUIComponentProps = Omit>, 'className' | 'color' | 'defaultValue' | 'defaultChecked'> & {
/**
* CSS class applied to the element, or a function that
* returns a class based on the component’s state.
*/
className?: string | ((state: State) => string | undefined);
/**
* Allows you to replace the component’s HTML element
* with a different tag, or compose it with another component.
*
* Accepts a `ReactElement` or a function that returns the element to render.
*/
render?: ComponentRenderFn | React.ReactElement>;
/**
* Style applied to the element, or a function that
* returns a style object based on the component’s state.
*/
style?: React.CSSProperties | ((state: State) => React.CSSProperties | undefined);
};
export interface NativeButtonProps {
/**
* Whether the component renders a native `