import { type PropsWithChildren } from 'react'; import type { BehaviorTrackingProps } from '../../core/types/behavior-tracking-props.js'; import type { DataTestId } from '../../core/types/data-props.js'; import type { DOMProps } from '../../core/types/dom.js'; import type { FormControlProps } from '../../core/types/form-control-props.js'; import type { MaskingProps } from '../../core/types/masking-props.js'; import type { StylingProps } from '../../core/types/styling-props.js'; import type { FormControlWithOverlayRef } from '../shared-types.js'; import { ComboboxContent } from './ComboboxContent.js'; import { ComboboxGroup } from './ComboboxGroup.js'; import { ComboboxGroupLabel } from './ComboboxGroupLabel.js'; import { ComboboxOption } from './ComboboxOption.js'; import { ComboboxPrefix } from './ComboboxPrefix.js'; import { ComboboxSuffix } from './ComboboxSuffix.js'; /** * Props for the Combobox component. * @public */ export type ComboboxProps = PropsWithChildren void, HTMLInputElement>, 'controlState' | 'validationMode'>> & DOMProps & StylingProps & DataTestId & BehaviorTrackingProps & MaskingProps & { /** * Called when the user creates a new option by typing a value not in the list. * Receives the trimmed input string. * When `value` is controlled, `onChange` is not called for the created value; * set `value` in this callback to apply it. When uncontrolled, the value is * applied and `onChange` is called before this callback. */ onCreateOption?: (inputValue: string) => void; /** * Called when the open state of the dropdown changes. */ onOpenChange?: (isOpen: boolean) => void; /** * Placeholder text shown when no value is selected. * @defaultValue "Search or create" */ placeholder?: string; /** * Action word shown before the typed input in the option to create a new value. * For example, pass `"Use"` to render "Use xyz" instead of the default "Create xyz". * @defaultValue "Create" */ createLabel?: string; }; /** * The `Combobox` component allows users to choose one option from a collapsed dropdown, filter options by typing, or create a new one. * @public */ export declare const Combobox: ((props: Omit void, HTMLInputElement>, "controlState" | "validationMode"> & { children?: import("react").ReactNode | undefined; } & DOMProps & StylingProps & DataTestId & BehaviorTrackingProps & MaskingProps & { /** * Called when the user creates a new option by typing a value not in the list. * Receives the trimmed input string. * When `value` is controlled, `onChange` is not called for the created value; * set `value` in this callback to apply it. When uncontrolled, the value is * applied and `onChange` is called before this callback. */ onCreateOption?: (inputValue: string) => void; /** * Called when the open state of the dropdown changes. */ onOpenChange?: (isOpen: boolean) => void; /** * Placeholder text shown when no value is selected. * @defaultValue "Search or create" */ placeholder?: string; /** * Action word shown before the typed input in the option to create a new value. * For example, pass `"Use"` to render "Use xyz" instead of the default "Create xyz". * @defaultValue "Create" */ createLabel?: string; } & import("react").RefAttributes>) => import("react").ReactElement | null) & { Content: typeof ComboboxContent; Option: typeof ComboboxOption; Group: typeof ComboboxGroup; GroupLabel: typeof ComboboxGroupLabel; Prefix: typeof ComboboxPrefix; Suffix: typeof ComboboxSuffix; }; //# sourceMappingURL=Combobox.d.ts.map