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