1 |
|
2 | import * as React from 'react';
|
3 | import { PickOptional } from '../../helpers/typeUtils';
|
4 | import { OUIAProps } from '../../helpers';
|
5 | export declare enum TabsComponent {
|
6 | div = "div",
|
7 | nav = "nav"
|
8 | }
|
9 | export interface TabsProps extends Omit<React.HTMLProps<HTMLElement | HTMLDivElement>, 'onSelect'>, OUIAProps {
|
10 |
|
11 | children: React.ReactNode;
|
12 |
|
13 | className?: string;
|
14 |
|
15 | variant?: 'default' | 'light300';
|
16 |
|
17 | activeKey?: number | string;
|
18 |
|
19 | defaultActiveKey?: number | string;
|
20 |
|
21 | onSelect?: (event: React.MouseEvent<HTMLElement, MouseEvent>, eventKey: number | string) => void;
|
22 |
|
23 | onClose?: (event: React.MouseEvent<HTMLElement, MouseEvent>, eventKey: number | string) => void;
|
24 |
|
25 | onAdd?: () => void;
|
26 |
|
27 | addButtonAriaLabel?: string;
|
28 |
|
29 | id?: string;
|
30 |
|
31 | isFilled?: boolean;
|
32 |
|
33 | isSecondary?: boolean;
|
34 |
|
35 | isBox?: boolean;
|
36 |
|
37 | isVertical?: boolean;
|
38 |
|
39 | hasBorderBottom?: boolean;
|
40 |
|
41 | hasSecondaryBorderBottom?: boolean;
|
42 |
|
43 | leftScrollAriaLabel?: string;
|
44 |
|
45 | rightScrollAriaLabel?: string;
|
46 |
|
47 | component?: 'div' | 'nav';
|
48 |
|
49 | 'aria-label'?: string;
|
50 |
|
51 | mountOnEnter?: boolean;
|
52 |
|
53 | unmountOnExit?: boolean;
|
54 |
|
55 | usePageInsets?: boolean;
|
56 |
|
57 | inset?: {
|
58 | default?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
|
59 | sm?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
|
60 | md?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
|
61 | lg?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
|
62 | xl?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
|
63 | '2xl'?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
|
64 | };
|
65 |
|
66 | expandable?: {
|
67 | default?: 'expandable' | 'nonExpandable';
|
68 | sm?: 'expandable' | 'nonExpandable';
|
69 | md?: 'expandable' | 'nonExpandable';
|
70 | lg?: 'expandable' | 'nonExpandable';
|
71 | xl?: 'expandable' | 'nonExpandable';
|
72 | '2xl'?: 'expandable' | 'nonExpandable';
|
73 | };
|
74 |
|
75 | isExpanded?: boolean;
|
76 |
|
77 | defaultIsExpanded?: boolean;
|
78 |
|
79 | toggleText?: string;
|
80 |
|
81 | toggleAriaLabel?: string;
|
82 |
|
83 | onToggle?: (isExpanded: boolean) => void;
|
84 | }
|
85 | interface TabsState {
|
86 | showScrollButtons: boolean;
|
87 | disableLeftScrollButton: boolean;
|
88 | disableRightScrollButton: boolean;
|
89 | shownKeys: (string | number)[];
|
90 | uncontrolledActiveKey: number | string;
|
91 | uncontrolledIsExpandedLocal: boolean;
|
92 | ouiaStateId: string;
|
93 | }
|
94 | export declare class Tabs extends React.Component<TabsProps, TabsState> {
|
95 | static displayName: string;
|
96 | tabList: React.RefObject<HTMLUListElement>;
|
97 | constructor(props: TabsProps);
|
98 | scrollTimeout: NodeJS.Timeout;
|
99 | static defaultProps: PickOptional<TabsProps>;
|
100 | handleTabClick(event: React.MouseEvent<HTMLElement, MouseEvent>, eventKey: number | string, tabContentRef: React.RefObject<any>): void;
|
101 | handleScrollButtons: () => void;
|
102 | scrollLeft: () => void;
|
103 | scrollRight: () => void;
|
104 | componentDidMount(): void;
|
105 | componentWillUnmount(): void;
|
106 | componentDidUpdate(prevProps: TabsProps): void;
|
107 | render(): JSX.Element;
|
108 | }
|
109 | export {};
|
110 |
|
\ | No newline at end of file |