1 | import { ComponentType, Component, ReactNode, ReactElement } from 'react';
|
2 | import { CSSObject } from '@emotion/serialize';
|
3 |
|
4 | import { borderRadius, colors, spacing } from '../theme';
|
5 | import { CommonProps, GroupTypeBase, OptionTypeBase } from '../types';
|
6 |
|
7 | export type MultiValueProps<
|
8 | OptionType extends OptionTypeBase,
|
9 | GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
|
10 | > = CommonProps<OptionType, true, GroupType> & {
|
11 | children: ReactNode;
|
12 | components: any;
|
13 | cropWithEllipsis: boolean;
|
14 | data: OptionType;
|
15 | innerProps: any;
|
16 | isFocused: boolean;
|
17 | isDisabled: boolean;
|
18 | removeProps: {
|
19 | onTouchEnd: (event: any) => void;
|
20 | onClick: (event: any) => void;
|
21 | onMouseDown: (event: any) => void;
|
22 | };
|
23 | };
|
24 |
|
25 | export function multiValueCSS(): CSSObject;
|
26 | export function multiValueLabelCSS(props: MultiValueProps<any>): CSSObject;
|
27 | export function multiValueRemoveCSS(props: MultiValueProps<any>): CSSObject;
|
28 |
|
29 | export interface MultiValueGenericProps<OptionType extends OptionTypeBase> {
|
30 | children: ReactNode;
|
31 | data: OptionType;
|
32 | innerProps: { className?: string | undefined };
|
33 | selectProps: any;
|
34 | }
|
35 | export function MultiValueGeneric<OptionType extends OptionTypeBase>(
|
36 |
|
37 | props: MultiValueGenericProps<OptionType>,
|
38 | ): ReactElement;
|
39 |
|
40 | export const MultiValueContainer: typeof MultiValueGeneric;
|
41 | export const MultiValueLabel: typeof MultiValueGeneric;
|
42 | export type MultiValueRemoveProps<
|
43 | OptionType extends OptionTypeBase,
|
44 | GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
|
45 | > = CommonProps<OptionType, true, GroupType> & {
|
46 | children: ReactNode;
|
47 | data: OptionType;
|
48 | innerProps: {
|
49 | className: string;
|
50 | onTouchEnd: (event: any) => void;
|
51 | onClick: (event: any) => void;
|
52 | onMouseDown: (event: any) => void;
|
53 | };
|
54 | selectProps: any;
|
55 | };
|
56 | export function MultiValueRemove<
|
57 | OptionType extends OptionTypeBase,
|
58 | GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
|
59 | // tslint:disable-next-line:no-unnecessary-generics
|
60 | >(props: MultiValueRemoveProps<OptionType, GroupType>): ReactElement;
|
61 |
|
62 | declare function MultiValue<
|
63 | OptionType extends OptionTypeBase,
|
64 | GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
|
65 | // tslint:disable-next-line:no-unnecessary-generics
|
66 | >(props: MultiValueProps<OptionType, GroupType>): ReactElement;
|
67 |
|
68 | export default MultiValue;
|