UNPKG

2.61 kBTypeScriptView Raw
1import { JSXElementConstructor, Key, ReactElement, ReactNode } from 'react';
2import { TabsPosition } from './enum';
3import { TabGroupProps } from './TabGroup';
4import { TabPaneProps } from './TabPane';
5import { GroupPanelMap, TabsCustomized } from './Tabs';
6export declare function toGroups(children: ReactNode): ReactElement<TabGroupProps>[];
7export declare function toArray(children: ReactNode): ReactElement<TabPaneProps>[];
8export declare function getDefaultActiveKeyInGroup(panelMap: Map<string, TabPaneProps>): string | undefined;
9export declare function getDefaultActiveKey(totalPanelsMap: Map<string, TabPaneProps>, groupedPanelsMap: Map<string, GroupPanelMap>, option: {
10 activeKey?: string | undefined;
11 defaultActiveKey?: string | undefined;
12}): string | undefined;
13export declare function getDefaultGroupKey(groupedPanelsMap: Map<string, GroupPanelMap>): string | undefined;
14export declare function getActiveKeyByGroupKey(groupedPanelsMap: Map<string, GroupPanelMap>, key: string): string | undefined;
15export declare function generateKey(key: Key | undefined | null, index: number): string;
16export declare function getActiveIndex(map: Map<string, TabPaneProps>, activeKey: string | undefined): number;
17export declare function setTransform(style: CSSStyleDeclaration, v?: string): void;
18export declare function isTransformSupported(style: CSSStyleDeclaration): boolean;
19export declare function setTransition(style: CSSStyleDeclaration, v?: string): void;
20export declare function getTransformPropValue(v: string): {
21 transform: string;
22 WebkitTransform: string;
23};
24export declare function isVertical(tabBarPosition: TabsPosition | undefined): boolean;
25export declare function getTransformByIndex(index: number, tabBarPosition: TabsPosition | undefined): string;
26export declare function getMarginStyle(index: number, tabBarPosition: TabsPosition | undefined): {
27 [x: string]: string;
28};
29export declare function getStyle(el: HTMLElement, property: string): number;
30export declare function setPxStyle(el: HTMLElement, value: string | number, vertical: boolean): void;
31export declare function getDataAttr(props: object): object;
32export declare function getLeft(tabNode: HTMLElement, wrapperNode: HTMLElement): number;
33export declare function getTop(tabNode: HTMLElement, wrapperNode: HTMLElement): number;
34export declare function getHeader(props: TabPaneProps): ReactNode;
35export declare function normalizePanes(children: ReactNode, customized?: TabsCustomized | undefined | null): [Map<string, TabPaneProps & {
36 type: string | JSXElementConstructor<any>;
37}>, Map<string, GroupPanelMap>];