import "./Select.css"; import { AriaLabelingProps, InteractionStatesProps } from "../../shared"; import { ComponentProps, ElementType, ForwardedRef, ReactElement, ReactNode, SyntheticEvent } from "react"; import { OverlayProps as OverlayPropsForDocumentation } from "../../overlay"; interface OverlayProps extends Partial { } export interface InnerSelectProps extends InteractionStatesProps, AriaLabelingProps { /** * @ignore */ name?: string; /** * Whether or not to open the select element. */ open?: boolean | null; /** * The initial value of open when in auto controlled mode. */ defaultOpen?: boolean; /** * A controlled selected key. */ selectedKey?: string | null; /** * The initial value of `selectedKey` when uncontrolled. */ defaultSelectedKey?: string; /** * Temporary text that occupies the select trigger when no value is selected. */ placeholder?: string; /** * Whether or not a user input is required before form submission. */ required?: boolean; /** * Whether or not the select should display as "valid" or "invalid". */ validationState?: "valid" | "invalid"; /** * Called when the select value change. * @param {SyntheticEvent} event - React's original event. * @param {string} selectedKey - The new selected key. * @returns {void} */ onSelectionChange?: (event: SyntheticEvent, selectedKey: string) => void; /** * Called when the select open state change. * @param {SyntheticEvent} event - React's original event. * @param {boolean} isOpen - Indicate if the menu is open. * @returns {void} */ onOpenChange?: (event: SyntheticEvent, isOpen: boolean) => void; /** * The style to use. */ variant?: "outline" | "ghost"; /** * A trigger icon. */ icon?: ReactElement; /** * The direction the select menu will open relative to the input. */ direction?: "bottom" | "top"; /** * The horizontal alignment of the select menu relative to the input. */ align?: "start" | "end"; /** * Whether or not the select should autofocus on render. */ autoFocus?: boolean | number; /** * Whether or not the select take up the width of its container. */ fluid?: boolean; /** * Whether or not the select is disabled. */ disabled?: boolean; /** * Whether or not the select is readonly. */ readOnly?: boolean; /** * Whether or not the select menu can flip when it will overflow it's boundary area. */ allowFlip?: boolean; /** * Whether or not the selection menu position can change to prevent it from being cut off so that it stays visible within its boundary area. */ allowPreventOverflow?: boolean; /** * Whether or not the selection menu should match the trigger width. */ allowResponsiveMenuWidth?: boolean; /** * The z-index of the overlay element. */ zIndex?: number; /** * Additional props to render on the menu of options. */ overlayProps?: Partial; /** * An HTML element type or a custom React element type to render as. */ as?: ElementType; /** * React children. */ children: ReactNode; /** * @ignore */ forwardedRef: ForwardedRef; } export declare function InnerSelect(props: InnerSelectProps): JSX.Element; export declare const Select: import("../../shared").OrbitComponent; export declare type SelectProps = ComponentProps; export {};