import * as React$1 from 'react'; declare const none: 'none'; declare const triggerPress: 'trigger-press'; declare const triggerHover: 'trigger-hover'; declare const triggerFocus: 'trigger-focus'; declare const outsidePress: 'outside-press'; declare const itemPress: 'item-press'; declare const closePress: 'close-press'; declare const linkPress: 'link-press'; declare const clearPress: 'clear-press'; declare const chipRemovePress: 'chip-remove-press'; declare const trackPress: 'track-press'; declare const incrementPress: 'increment-press'; declare const decrementPress: 'decrement-press'; declare const inputChange: 'input-change'; declare const inputClear: 'input-clear'; declare const inputBlur: 'input-blur'; declare const inputPaste: 'input-paste'; declare const inputPress: 'input-press'; declare const focusOut: 'focus-out'; declare const escapeKey: 'escape-key'; declare const closeWatcher: 'close-watcher'; declare const listNavigation: 'list-navigation'; declare const keyboard: 'keyboard'; declare const pointer: 'pointer'; declare const drag: 'drag'; declare const wheel: 'wheel'; declare const scrub: 'scrub'; declare const cancelOpen: 'cancel-open'; declare const siblingOpen: 'sibling-open'; declare const disabled: 'disabled'; declare const missing: 'missing'; declare const initial: 'initial'; declare const imperativeAction: 'imperative-action'; declare const swipe: 'swipe'; declare const windowResize: 'window-resize'; interface ReasonToEventMap { [none]: Event; [triggerPress]: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent; [triggerHover]: MouseEvent; [triggerFocus]: FocusEvent; [outsidePress]: MouseEvent | PointerEvent | TouchEvent; [itemPress]: MouseEvent | KeyboardEvent | PointerEvent; [closePress]: MouseEvent | KeyboardEvent | PointerEvent; [linkPress]: MouseEvent | PointerEvent; [clearPress]: PointerEvent | MouseEvent | KeyboardEvent; [chipRemovePress]: PointerEvent | MouseEvent | KeyboardEvent; [trackPress]: PointerEvent | MouseEvent | TouchEvent; [incrementPress]: PointerEvent | MouseEvent | TouchEvent; [decrementPress]: PointerEvent | MouseEvent | TouchEvent; [inputChange]: InputEvent | Event; [inputClear]: InputEvent | FocusEvent | Event; [inputBlur]: FocusEvent; [inputPaste]: ClipboardEvent; [inputPress]: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent; [focusOut]: FocusEvent | KeyboardEvent; [escapeKey]: KeyboardEvent; [closeWatcher]: Event; [listNavigation]: KeyboardEvent; [keyboard]: KeyboardEvent; [pointer]: PointerEvent; [drag]: PointerEvent | TouchEvent; [swipe]: PointerEvent | TouchEvent; [wheel]: WheelEvent; [scrub]: PointerEvent; [cancelOpen]: MouseEvent; [siblingOpen]: Event; [disabled]: Event; [missing]: Event; [initial]: Event; [imperativeAction]: Event; [windowResize]: UIEvent; } /** * Maps a change `reason` string to the corresponding native event type. */ type ReasonToEvent = Reason extends keyof ReasonToEventMap ? ReasonToEventMap[Reason] : Event; type BaseUIChangeEventDetail = { /** * The reason for the event. */ reason: Reason; /** * The native event associated with the custom event. */ event: ReasonToEvent; /** * Cancels Base UI from handling the event. */ cancel: () => void; /** * Allows the event to propagate in cases where Base UI will stop the propagation. */ allowPropagation: () => void; /** * Indicates whether the event has been canceled. */ isCanceled: boolean; /** * Indicates whether the event is allowed to propagate. */ isPropagationAllowed: boolean; /** * The element that triggered the event, if applicable. */ trigger: Element | undefined; } & CustomProperties; /** * Details of custom change events emitted by Base UI components. */ type BaseUIChangeEventDetails = Reason extends string ? BaseUIChangeEventDetail & {} : never; /** * Details of custom generic events emitted by Base UI components. */ type BaseUIGenericEventDetail = { /** * The reason for the event. */ reason: Reason; /** * The native event associated with the custom event. */ event: ReasonToEvent; } & CustomProperties; type BaseUIGenericEventDetails = Reason extends string ? BaseUIGenericEventDetail & {} : never; type HTMLProps = React$1.HTMLAttributes & { ref?: React$1.Ref | undefined; }; /** * 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. */ type ComponentRenderFn = (props: Props, state: State) => React$1.ReactElement; type BaseUIEvent> = E & { preventBaseUIHandler: () => void; readonly baseUIHandlerPrevented?: boolean | undefined; }; type WithPreventBaseUIHandler = T extends ((event: infer E) => any) ? E extends React$1.SyntheticEvent ? (event: BaseUIEvent) => ReturnType : T : T extends undefined ? undefined : T; /** * Adds a `preventBaseUIHandler` method to all event handlers. */ type WithBaseUIEvent = { [K in keyof T]: WithPreventBaseUIHandler }; /** * 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). */ type BaseUIComponentProps = Omit>, 'className' | 'color' | 'defaultValue' | 'defaultChecked' | 'style'> & { /** * 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) | 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?: React$1.ReactElement | ComponentRenderFn | undefined; /** * Style applied to the element, or a function that * returns a style object based on the component's state. */ style?: React$1.CSSProperties | ((state: State) => React$1.CSSProperties | undefined) | undefined; }; interface NativeButtonProps { /** * Whether the component renders a native `