1 | import * as React from 'react';
|
2 | import {Override} from '../overrides';
|
3 |
|
4 | export interface SIZE {
|
5 | compact: 'compact';
|
6 | default: 'default';
|
7 | large: 'large';
|
8 | mini: 'mini';
|
9 | }
|
10 |
|
11 | export type PropsT<OptionT = unknown> = {
|
12 | autocomplete?: boolean;
|
13 | disabled?: boolean;
|
14 | mapOptionToNode?: ({isSelected: boolean, option: OptionT}) => React.ReactNode;
|
15 | mapOptionToString: (OptionT) => string;
|
16 | id?: string;
|
17 | name?: string;
|
18 | onBlur?: (event: React.FocusEvent<HTMLInputElement>) => any;
|
19 | onChange?: (value: string, option: OptionT | null) => any;
|
20 | onFocus?: (event: React.FocusEvent<HTMLInputElement>) => any;
|
21 | onSubmit?: (params: {closeListbox: () => void; value: string}) => any;
|
22 | options: OptionT;
|
23 | overrides?: {
|
24 | Root?: Override<any>;
|
25 | InputContainer?: Override<any>;
|
26 | Input?: Override<any>;
|
27 | Popover?: Override<any>;
|
28 | ListBox?: Override<any>;
|
29 | ListItem?: Override<any>;
|
30 | };
|
31 | size?: SIZE[keyof SIZE];
|
32 | value: string;
|
33 | };
|
34 |
|
35 | export const Combobox: React.FC<PropsT>;
|
36 | export const SIZE: SIZE;
|