1 | import { Component, ReactElement, ReactNode, ComponentType } from 'react';
|
2 | import { CSSObject } from '@emotion/serialize';
|
3 | import { spacing } from '../theme';
|
4 | import { CommonProps, GroupTypeBase, KeyboardEventHandler, OptionTypeBase } from '../types';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export interface ContainerState {
|
11 |
|
12 | isDisabled: boolean;
|
13 |
|
14 | isRtl: boolean;
|
15 | }
|
16 |
|
17 | export type ContainerProps<
|
18 | OptionType extends OptionTypeBase,
|
19 | IsMulti extends boolean,
|
20 | GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
|
21 | > = CommonProps<OptionType, IsMulti, GroupType> &
|
22 | ContainerState & {
|
23 |
|
24 | children: ReactNode;
|
25 |
|
26 | innerProps: { onKeyDown: KeyboardEventHandler };
|
27 | };
|
28 | export function containerCSS(state: ContainerState): CSSObject;
|
29 | export function SelectContainer<
|
30 | OptionType extends OptionTypeBase,
|
31 | IsMulti extends boolean,
|
32 | GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
|
33 | // tslint:disable-next-line:no-unnecessary-generics
|
34 | >(props: ContainerProps<OptionType, IsMulti, GroupType>): ReactElement;
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 | export type ValueContainerProps<
|
41 | OptionType extends OptionTypeBase,
|
42 | IsMulti extends boolean,
|
43 | GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
|
44 | > = CommonProps<OptionType, IsMulti, GroupType> & {
|
45 |
|
46 | isMulti: boolean;
|
47 |
|
48 | hasValue: boolean;
|
49 |
|
50 | children: ReactNode;
|
51 | };
|
52 | export function valueContainerCSS(): CSSObject;
|
53 | export function ValueContainer<
|
54 | OptionType extends OptionTypeBase,
|
55 | IsMulti extends boolean,
|
56 | GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
|
57 | // tslint:disable-next-line:no-unnecessary-generics
|
58 | >(props: ValueContainerProps<OptionType, IsMulti, GroupType>): ReactElement;
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 | export interface IndicatorsState {
|
65 |
|
66 | isRtl: boolean;
|
67 |
|
68 | isDisabled: boolean;
|
69 | }
|
70 |
|
71 | export type IndicatorContainerProps<
|
72 | OptionType extends OptionTypeBase,
|
73 | IsMulti extends boolean,
|
74 | GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
|
75 | > = CommonProps<OptionType, IsMulti, GroupType> &
|
76 | IndicatorsState & {
|
77 |
|
78 | children: ReactNode;
|
79 | };
|
80 |
|
81 | export function indicatorsContainerCSS(): CSSObject;
|
82 | export function IndicatorsContainer<
|
83 | OptionType extends OptionTypeBase,
|
84 | IsMulti extends boolean,
|
85 | GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
|
86 | // tslint:disable-next-line:no-unnecessary-generics
|
87 | >(props: IndicatorContainerProps<OptionType, IsMulti, GroupType>): ReactElement;
|