@atlaskit/tabs 13.3.5 → 13.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/codemods/utils.tsx +15 -17
- package/dist/cjs/components/tabs.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/tabs.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +5 -13
- package/report.api.md +12 -5
- package/dist/types-ts4.0/components/tab-list.d.ts +0 -13
- package/dist/types-ts4.0/components/tab-panel.d.ts +0 -13
- package/dist/types-ts4.0/components/tab.d.ts +0 -13
- package/dist/types-ts4.0/components/tabs.d.ts +0 -13
- package/dist/types-ts4.0/hooks.d.ts +0 -3
- package/dist/types-ts4.0/index.d.ts +0 -6
- package/dist/types-ts4.0/internal/colors.d.ts +0 -17
- package/dist/types-ts4.0/internal/context.d.ts +0 -5
- package/dist/types-ts4.0/internal/styles.d.ts +0 -5
- package/dist/types-ts4.0/internal/utils.d.ts +0 -2
- package/dist/types-ts4.0/performance/examples.d.ts +0 -24
- package/dist/types-ts4.0/types.d.ts +0 -196
package/CHANGELOG.md
CHANGED
package/codemods/utils.tsx
CHANGED
|
@@ -7,26 +7,24 @@ import {
|
|
|
7
7
|
getJSXAttributesByName,
|
|
8
8
|
} from '@atlaskit/codemod-utils';
|
|
9
9
|
|
|
10
|
-
export const createRemoveFuncWithDefaultSpecifierFor =
|
|
11
|
-
component: string,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
) => (j: core.JSCodeshift, source: Collection<Node>) => {
|
|
15
|
-
const specifier = getDefaultSpecifier(j, source, component);
|
|
10
|
+
export const createRemoveFuncWithDefaultSpecifierFor =
|
|
11
|
+
(component: string, prop: string, comment?: string) =>
|
|
12
|
+
(j: core.JSCodeshift, source: Collection<Node>) => {
|
|
13
|
+
const specifier = getDefaultSpecifier(j, source, component);
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
if (!specifier) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
source.findJSXElements(specifier).forEach((element) => {
|
|
20
|
+
getJSXAttributesByName(j, element, prop).forEach((attribute: any) => {
|
|
21
|
+
if (comment) {
|
|
22
|
+
addCommentToStartOfFile({ j, base: source, message: comment });
|
|
23
|
+
}
|
|
24
|
+
j(attribute).remove();
|
|
25
|
+
});
|
|
27
26
|
});
|
|
28
|
-
}
|
|
29
|
-
};
|
|
27
|
+
};
|
|
30
28
|
|
|
31
29
|
export function doesIdentifierExist({
|
|
32
30
|
j,
|
|
@@ -36,7 +36,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
36
36
|
var analyticsAttributes = {
|
|
37
37
|
componentName: 'tabs',
|
|
38
38
|
packageName: "@atlaskit/tabs",
|
|
39
|
-
packageVersion: "13.3.
|
|
39
|
+
packageVersion: "13.3.7"
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
var getTabPanelWithContext = function getTabPanelWithContext(_ref) {
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
|
@@ -18,7 +18,7 @@ import { onMouseDownBlur } from '../internal/utils';
|
|
|
18
18
|
var analyticsAttributes = {
|
|
19
19
|
componentName: 'tabs',
|
|
20
20
|
packageName: "@atlaskit/tabs",
|
|
21
|
-
packageVersion: "13.3.
|
|
21
|
+
packageVersion: "13.3.7"
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
var getTabPanelWithContext = function getTabPanelWithContext(_ref) {
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/tabs",
|
|
3
|
-
"version": "13.3.
|
|
3
|
+
"version": "13.3.7",
|
|
4
4
|
"description": "Tabs are used to organize content by grouping similar information on the same page.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,14 +12,6 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
-
"typesVersions": {
|
|
16
|
-
">=4.0 <4.5": {
|
|
17
|
-
"*": [
|
|
18
|
-
"dist/types-ts4.0/*",
|
|
19
|
-
"dist/types-ts4.0/index.d.ts"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
15
|
"sideEffects": false,
|
|
24
16
|
"atlaskit:src": "src/index.tsx",
|
|
25
17
|
"atlassian": {
|
|
@@ -34,9 +26,9 @@
|
|
|
34
26
|
"dependencies": {
|
|
35
27
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
36
28
|
"@atlaskit/codemod-utils": "^4.1.0",
|
|
37
|
-
"@atlaskit/ds-explorations": "^1.
|
|
29
|
+
"@atlaskit/ds-explorations": "^1.6.0",
|
|
38
30
|
"@atlaskit/theme": "^12.2.0",
|
|
39
|
-
"@atlaskit/tokens": "^0.
|
|
31
|
+
"@atlaskit/tokens": "^0.12.0",
|
|
40
32
|
"@babel/runtime": "^7.0.0",
|
|
41
33
|
"@emotion/react": "^11.7.1"
|
|
42
34
|
},
|
|
@@ -44,11 +36,11 @@
|
|
|
44
36
|
"react": "^16.8.0"
|
|
45
37
|
},
|
|
46
38
|
"devDependencies": {
|
|
47
|
-
"@atlaskit/button": "^16.
|
|
39
|
+
"@atlaskit/button": "^16.5.0",
|
|
48
40
|
"@atlaskit/docs": "*",
|
|
49
41
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
50
42
|
"@atlaskit/section-message": "^6.3.0",
|
|
51
|
-
"@atlaskit/spinner": "^15.
|
|
43
|
+
"@atlaskit/spinner": "^15.3.0",
|
|
52
44
|
"@atlaskit/ssr": "*",
|
|
53
45
|
"@atlaskit/tooltip": "^17.6.0",
|
|
54
46
|
"@atlaskit/visual-regression": "*",
|
package/report.api.md
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
<!-- API Report Version: 2.2 -->
|
|
2
|
+
|
|
1
3
|
## API Report File for "@atlaskit/tabs"
|
|
2
4
|
|
|
3
|
-
> Do not edit this file.
|
|
5
|
+
> Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
|
|
6
|
+
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
|
+
|
|
8
|
+
### Table of contents
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
Generated API Report version: 2.0
|
|
7
|
-
-->
|
|
10
|
+
- [Main Entry Types](#main-entry-types)
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
### Main Entry Types
|
|
13
|
+
|
|
14
|
+
<!--SECTION START: Main Entry Types-->
|
|
10
15
|
|
|
11
16
|
```ts
|
|
12
17
|
import { jsx } from '@emotion/react';
|
|
@@ -114,3 +119,5 @@ export const useTabPanel: () => TabPanelAttributesType;
|
|
|
114
119
|
|
|
115
120
|
// (No @packageDocumentation comment for this package)
|
|
116
121
|
```
|
|
122
|
+
|
|
123
|
+
<!--SECTION END: Main Entry Types-->
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx } from '@emotion/react';
|
|
2
|
-
import { TabListProps } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* __TabList__
|
|
5
|
-
*
|
|
6
|
-
* A TabList groups `Tab` components together.
|
|
7
|
-
*
|
|
8
|
-
* - [Examples](https://atlassian.design/components/tabs/examples)
|
|
9
|
-
* - [Code](https://atlassian.design/components/tabs/code)
|
|
10
|
-
* - [Usage](https://atlassian.design/components/tabs/usage)
|
|
11
|
-
*/
|
|
12
|
-
declare const TabList: (props: TabListProps) => jsx.JSX.Element;
|
|
13
|
-
export default TabList;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx } from '@emotion/react';
|
|
2
|
-
import { TabPanelProps } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* __TabPanel__
|
|
5
|
-
*
|
|
6
|
-
* A TabPanel houses the contents of a Tab.
|
|
7
|
-
*
|
|
8
|
-
* - [Examples](https://atlassian.design/components/tabs/examples)
|
|
9
|
-
* - [Code](https://atlassian.design/components/tabs/code)
|
|
10
|
-
* - [Usage](https://atlassian.design/components/tabs/usage)
|
|
11
|
-
*/
|
|
12
|
-
declare const TabPanel: ({ children, testId }: TabPanelProps) => jsx.JSX.Element;
|
|
13
|
-
export default TabPanel;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
|
-
import { TabProps } from '../types';
|
|
4
|
-
/**
|
|
5
|
-
* __Tab__
|
|
6
|
-
*
|
|
7
|
-
* Tab represents an indivudal Tab displayed in a TabList.
|
|
8
|
-
*
|
|
9
|
-
* - [Examples](https://atlassian.design/components/tabs/examples)
|
|
10
|
-
* - [Code](https://atlassian.design/components/tabs/code)
|
|
11
|
-
* - [Usage](https://atlassian.design/components/tabs/usage)
|
|
12
|
-
*/
|
|
13
|
-
export default function Tab({ children, testId }: TabProps): jsx.JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx } from '@emotion/react';
|
|
2
|
-
import { TabsProps } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* __Tabs__
|
|
5
|
-
*
|
|
6
|
-
* Tabs acts as a container for all Tab components.
|
|
7
|
-
*
|
|
8
|
-
* - [Examples](https://atlassian.design/components/tabs/examples)
|
|
9
|
-
* - [Code](https://atlassian.design/components/tabs/code)
|
|
10
|
-
* - [Usage](https://atlassian.design/components/tabs/usage)
|
|
11
|
-
*/
|
|
12
|
-
declare const Tabs: (props: TabsProps) => jsx.JSX.Element;
|
|
13
|
-
export default Tabs;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default } from './components/tabs';
|
|
2
|
-
export { default as TabPanel } from './components/tab-panel';
|
|
3
|
-
export { default as Tab } from './components/tab';
|
|
4
|
-
export { default as TabList } from './components/tab-list';
|
|
5
|
-
export type { TabProps, TabPanelProps, TabsProps, TabListProps, TabAttributesType, TabListAttributesType, TabPanelAttributesType, TabData, } from './types';
|
|
6
|
-
export { useTab, useTabPanel } from './hooks';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ThemeModes } from '@atlaskit/theme/types';
|
|
2
|
-
export declare type TabColors = {
|
|
3
|
-
labelColor: string;
|
|
4
|
-
activeLabelColor: string;
|
|
5
|
-
hoverLabelColor: string;
|
|
6
|
-
selectedColor: string;
|
|
7
|
-
focusBorderColor: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const getTabColors: (mode: ThemeModes) => TabColors;
|
|
10
|
-
export declare type TabLineColors = {
|
|
11
|
-
lineColor: string;
|
|
12
|
-
hoveredColor: string;
|
|
13
|
-
activeColor: string;
|
|
14
|
-
selectedColor: string;
|
|
15
|
-
};
|
|
16
|
-
export declare const getTabLineColor: (mode: ThemeModes) => TabLineColors;
|
|
17
|
-
export declare const getTabPanelFocusColor: (mode: ThemeModes) => string;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TabAttributesType, TabListAttributesType, TabPanelAttributesType } from '../types';
|
|
3
|
-
export declare const TabContext: import("react").Context<TabAttributesType | null>;
|
|
4
|
-
export declare const TabListContext: import("react").Context<TabListAttributesType | null>;
|
|
5
|
-
export declare const TabPanelContext: import("react").Context<TabPanelAttributesType | null>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { CSSObject, SerializedStyles } from '@emotion/react';
|
|
2
|
-
import { ThemeModes } from '@atlaskit/theme/types';
|
|
3
|
-
export declare const getTabsStyles: (mode: ThemeModes) => SerializedStyles;
|
|
4
|
-
export declare const getTabListStyles: (mode: ThemeModes) => SerializedStyles;
|
|
5
|
-
export declare const getTabStyles: (mode: ThemeModes) => CSSObject;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { PublicInteractionTask } from 'storybook-addon-performance';
|
|
3
|
-
export declare const performance: {
|
|
4
|
-
(): JSX.Element;
|
|
5
|
-
story: {
|
|
6
|
-
name: string;
|
|
7
|
-
parameters: {
|
|
8
|
-
performance: {
|
|
9
|
-
interactions: PublicInteractionTask[];
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export declare const heavyPerformance: {
|
|
15
|
-
(): JSX.Element;
|
|
16
|
-
story: {
|
|
17
|
-
name: string;
|
|
18
|
-
parameters: {
|
|
19
|
-
performance: {
|
|
20
|
-
interactions: PublicInteractionTask[];
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import { KeyboardEvent, MouseEvent, ReactNode } from 'react';
|
|
2
|
-
import UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
|
|
3
|
-
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
4
|
-
export interface TabProps {
|
|
5
|
-
/**
|
|
6
|
-
* The children to be rendered within a `Tab`.
|
|
7
|
-
*/
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* A `testId` prop is is a unique string that appears as a data attribute `data-testid`
|
|
11
|
-
* on the `Tab` element, serving as a hook for automated tests.
|
|
12
|
-
*/
|
|
13
|
-
testId?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface TabPanelProps {
|
|
16
|
-
/**
|
|
17
|
-
* The children to be rendered within a `TabPanel`.
|
|
18
|
-
*/
|
|
19
|
-
children: ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* A `testId` prop is is a unique string that appears as a data attribute `data-testid`
|
|
22
|
-
* on the `TabPanel` element, serving as a hook for automated tests.
|
|
23
|
-
*/
|
|
24
|
-
testId?: string;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated
|
|
28
|
-
* Previously this was the type for the tabs prop that was used like
|
|
29
|
-
* <Tabs tabs={tabs} />
|
|
30
|
-
* The codemod changes this to be
|
|
31
|
-
* <Tabs>
|
|
32
|
-
* <TabList>
|
|
33
|
-
* {tabs.map(tab => <Tab testId={tab.testId}>{tab.label}</Tab>)}
|
|
34
|
-
* </TabList>
|
|
35
|
-
* {tabs.map(tab => <TabPanel>{tab.content}</TabPanel>)}
|
|
36
|
-
* </Tabs>
|
|
37
|
-
* The TabData type remains so the variable used in tabs can have a type.
|
|
38
|
-
*/
|
|
39
|
-
export interface TabData {
|
|
40
|
-
/**
|
|
41
|
-
* String to be put inside a tab
|
|
42
|
-
*/
|
|
43
|
-
label?: string;
|
|
44
|
-
/**
|
|
45
|
-
* String to be put inside a tab panel
|
|
46
|
-
*/
|
|
47
|
-
content?: ReactNode;
|
|
48
|
-
/**
|
|
49
|
-
* A `testId` prop is provided for specified elements, which is a unique
|
|
50
|
-
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
51
|
-
* serving as a hook for automated tests. This `testId` is put on the tab.
|
|
52
|
-
*/
|
|
53
|
-
testId?: string;
|
|
54
|
-
/**
|
|
55
|
-
* Used by consumers to convey extra information about the tab.
|
|
56
|
-
*/
|
|
57
|
-
[key: string]: any;
|
|
58
|
-
}
|
|
59
|
-
export declare type SelectedType = number;
|
|
60
|
-
export declare type OnChangeCallback = (index: SelectedType, analyticsEvent: UIAnalyticsEvent) => void;
|
|
61
|
-
export interface TabsProps extends WithAnalyticsEventsProps {
|
|
62
|
-
/**
|
|
63
|
-
* The index of the tab that will be selected by default when the component mounts.
|
|
64
|
-
* If not set the first tab will be displayed by default.
|
|
65
|
-
*/
|
|
66
|
-
defaultSelected?: SelectedType;
|
|
67
|
-
/**
|
|
68
|
-
* A callback function which will be fired when a changed. It will be passed
|
|
69
|
-
* the index of the selected tab and a `UIAnalyticsEvent`.
|
|
70
|
-
*/
|
|
71
|
-
onChange?: OnChangeCallback;
|
|
72
|
-
/**
|
|
73
|
-
* The selected tab's index. If this prop is set the component behaves as a
|
|
74
|
-
* controlled component. It will be up to you to listen to `onChange`.
|
|
75
|
-
*/
|
|
76
|
-
selected?: SelectedType;
|
|
77
|
-
/**
|
|
78
|
-
* Tabs by default leaves `TabPanel`'s mounted on the page after they have been selected.
|
|
79
|
-
* If you would like to unmount a `TabPanel` when it is not selected, set this prop to
|
|
80
|
-
* be true.
|
|
81
|
-
*/
|
|
82
|
-
shouldUnmountTabPanelOnChange?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* Additional information to be included in the `context` of analytics events that come from `Tabs`.
|
|
85
|
-
*/
|
|
86
|
-
analyticsContext?: Record<string, any>;
|
|
87
|
-
/**
|
|
88
|
-
* A `testId` prop is a unique string that appears as a data attribute `data-testid`
|
|
89
|
-
* on the `Tabs` element, serving as a hook for automated tests.
|
|
90
|
-
*/
|
|
91
|
-
testId?: string;
|
|
92
|
-
/**
|
|
93
|
-
* The children of Tabs. The first child should be a `TabList` filled with `Tab`'s.
|
|
94
|
-
* Subsequent children should be `TabPanel`'s. There should be a `Tab` for each `TabPanel`.
|
|
95
|
-
* If you want to customize `Tab` or `TabPanel`, refer to the examples in the documentation.
|
|
96
|
-
*/
|
|
97
|
-
children: ReactNode;
|
|
98
|
-
/**
|
|
99
|
-
* A unique ID that will be used to generate IDs for tabs and tab panels.
|
|
100
|
-
* This is required for accessibility purposes.
|
|
101
|
-
*/
|
|
102
|
-
id: string;
|
|
103
|
-
}
|
|
104
|
-
export interface TabListProps {
|
|
105
|
-
/**
|
|
106
|
-
* A collection of `Tab`'s. There should be a `Tab` for each `TabPanel`.
|
|
107
|
-
* If you want to customize `Tab` there is documentation in the tab section.
|
|
108
|
-
*/
|
|
109
|
-
children: ReactNode;
|
|
110
|
-
}
|
|
111
|
-
export declare type TabAttributesType = {
|
|
112
|
-
/**
|
|
113
|
-
* Changes the selected tab.
|
|
114
|
-
*/
|
|
115
|
-
onClick: () => void;
|
|
116
|
-
/**
|
|
117
|
-
* ID of the tab.
|
|
118
|
-
*/
|
|
119
|
-
id: string;
|
|
120
|
-
/**
|
|
121
|
-
* The id of the tab panel that this tab links.
|
|
122
|
-
*/
|
|
123
|
-
'aria-controls': string;
|
|
124
|
-
/**
|
|
125
|
-
* The position of this tab within the tab list.
|
|
126
|
-
*/
|
|
127
|
-
'aria-posinset': number;
|
|
128
|
-
/**
|
|
129
|
-
* Whether this tab is selected.
|
|
130
|
-
*/
|
|
131
|
-
'aria-selected': boolean;
|
|
132
|
-
/**
|
|
133
|
-
* The number of tabs in this tab list.
|
|
134
|
-
*/
|
|
135
|
-
'aria-setsize': number;
|
|
136
|
-
/**
|
|
137
|
-
* Prevents a focus ring being shown when clicked.
|
|
138
|
-
*/
|
|
139
|
-
onMouseDown: (e: MouseEvent<HTMLElement>) => void;
|
|
140
|
-
/**
|
|
141
|
-
* Allows navigation of tabs with automatic activation.
|
|
142
|
-
* Read here for more details: https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html
|
|
143
|
-
*/
|
|
144
|
-
onKeyDown: (e: KeyboardEvent<HTMLElement>) => void;
|
|
145
|
-
/**
|
|
146
|
-
* Role is "tab".
|
|
147
|
-
*/
|
|
148
|
-
role: 'tab';
|
|
149
|
-
/**
|
|
150
|
-
* If the tab is selected the tab index is 0 and is focusable.
|
|
151
|
-
* Otherwise it is -1 and is not focusable.
|
|
152
|
-
*/
|
|
153
|
-
tabIndex: number;
|
|
154
|
-
};
|
|
155
|
-
export declare type TabListAttributesType = {
|
|
156
|
-
/**
|
|
157
|
-
* The index of the selected tab.
|
|
158
|
-
*/
|
|
159
|
-
selected: SelectedType;
|
|
160
|
-
/**
|
|
161
|
-
* A unique ID that will be used to generate IDs for tabs and tab panels.
|
|
162
|
-
* This is required for accessibility reasons.
|
|
163
|
-
*/
|
|
164
|
-
tabsId: string;
|
|
165
|
-
/**
|
|
166
|
-
* A callback function which will be fired when a tab is changed.
|
|
167
|
-
*/
|
|
168
|
-
onChange: (index: SelectedType) => void;
|
|
169
|
-
};
|
|
170
|
-
export declare type TabPanelAttributesType = {
|
|
171
|
-
/**
|
|
172
|
-
* Role is "tabpanel".
|
|
173
|
-
*/
|
|
174
|
-
role: 'tabpanel';
|
|
175
|
-
/**
|
|
176
|
-
* ID of the the tab panel.
|
|
177
|
-
*/
|
|
178
|
-
id: string;
|
|
179
|
-
/**
|
|
180
|
-
* Hidden is true if it is not the selected tab.
|
|
181
|
-
*/
|
|
182
|
-
hidden?: boolean;
|
|
183
|
-
/**
|
|
184
|
-
* The id of the tab that links to this tab panel.
|
|
185
|
-
*/
|
|
186
|
-
'aria-labelledby': string;
|
|
187
|
-
/**
|
|
188
|
-
* Prevents a focus ring being shown when clicked.
|
|
189
|
-
*/
|
|
190
|
-
onMouseDown: (e: MouseEvent<HTMLElement>) => void;
|
|
191
|
-
/**
|
|
192
|
-
* If the tab panel is selected the tab index is 0 and is focusable.
|
|
193
|
-
* Otherwise it is -1 and is not focusable.
|
|
194
|
-
*/
|
|
195
|
-
tabIndex: number;
|
|
196
|
-
};
|