1 | import * as React from 'react';
|
2 | import { ClassNamesState, InputActionMeta, OptionsType, OptionTypeBase, ValueType } from './types';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | export function noop(): void;
|
9 | export function emptyString(): string;
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export function classNames(
|
16 | prefix?: string | null,
|
17 | cssKey?: string | null,
|
18 | state?: ClassNamesState,
|
19 | className?: string,
|
20 | ): string;
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | export function cleanValue<OptionType extends OptionTypeBase>(
|
27 | value: ValueType<OptionType, boolean>,
|
28 | ): OptionsType<OptionType>;
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 | export function handleInputChange(
|
35 | inputValue: string,
|
36 | actionMeta: InputActionMeta,
|
37 | onInputChange?: (inputValue: string, actionMeta: InputActionMeta) => string | void,
|
38 | ): string;
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 | export function isDocumentElement(el: Element): boolean;
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | export function normalizedHeight(el: Element): number;
|
50 |
|
51 |
|
52 |
|
53 |
|
54 | export function getScrollTop(el: Element): number;
|
55 |
|
56 | export function scrollTo(el: Element, top: number): void;
|
57 |
|
58 |
|
59 |
|
60 |
|
61 | export function getScrollParent(element: React.Ref<any>): Element;
|
62 |
|
63 |
|
64 |
|
65 |
|
66 | export function animatedScrollTo(
|
67 | element: HTMLElement | typeof window,
|
68 | to: number,
|
69 | duration?: number,
|
70 | callback?: (element: HTMLElement | typeof window) => void,
|
71 | ): void;
|
72 |
|
73 |
|
74 |
|
75 |
|
76 | export function scrollIntoView(menuEl: HTMLElement, focusedEl: HTMLElement): void;
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 | export function getBoundingClientObj(
|
84 | element: HTMLElement,
|
85 | ): {
|
86 | bottom: number;
|
87 | height: number;
|
88 | left: number;
|
89 | right: number;
|
90 | top: number;
|
91 | width: number;
|
92 | };
|
93 | export interface RectType {
|
94 | left: number;
|
95 | right: number;
|
96 | bottom: number;
|
97 | height: number;
|
98 | width: number;
|
99 | }
|
100 |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 | export function toKey(str: string): string;
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 | export function isTouchCapable(): boolean;
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 | export function isMobileDevice(): boolean;
|