1 | import * as React from "react";
|
2 | import { type InputGroupProps, type OverlayProps } from "@blueprintjs/core";
|
3 | import { type ListItemsProps } from "../../common";
|
4 | export interface OmnibarProps<T> extends ListItemsProps<T> {
|
5 | /**
|
6 | * Props to spread to the query `InputGroup`. Use `query` and
|
7 | * `onQueryChange` instead of `inputProps.value` and `inputProps.onChange`
|
8 | * to control this input.
|
9 | */
|
10 | inputProps?: InputGroupProps;
|
11 | /**
|
12 | * Toggles the visibility of the omnibar.
|
13 | * This prop is required because the component is controlled.
|
14 | */
|
15 | isOpen: boolean;
|
16 | /**
|
17 | * A callback that is invoked when user interaction causes the omnibar to
|
18 | * close, such as clicking on the overlay or pressing the `esc` key (if
|
19 | * enabled). Receives the event from the user's interaction, if there was an
|
20 | * event (generally either a mouse or key event).
|
21 | *
|
22 | * Note that due to controlled usage, this component will not actually close
|
23 | * itself until the `isOpen` prop becomes `false`.
|
24 | * .
|
25 | */
|
26 | onClose?: (event?: React.SyntheticEvent<HTMLElement>) => void;
|
27 | /** Props to spread to `Overlay`. */
|
28 | overlayProps?: Partial<OverlayProps>;
|
29 | }
|
30 | /**
|
31 | * Omnibar component.
|
32 | *
|
33 | * @see https://blueprintjs.com/docs/#select/omnibar
|
34 | */
|
35 | export declare class Omnibar<T> extends React.PureComponent<OmnibarProps<T>> {
|
36 | static displayName: string;
|
37 | static ofType<U>(): new (props: OmnibarProps<U>) => Omnibar<U>;
|
38 | render(): React.JSX.Element;
|
39 | private renderQueryList;
|
40 | private handleOverlayClose;
|
41 | }
|