@atlaskit/tabs 13.3.0 → 13.3.2
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/__perf__/default.tsx +1 -0
- package/dist/cjs/components/tab-list.js +32 -34
- package/dist/cjs/components/tab-panel.js +9 -4
- package/dist/cjs/components/tab.js +11 -3
- package/dist/cjs/components/tabs.js +37 -32
- package/dist/cjs/internal/styles.js +0 -10
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/tab-list.js +29 -26
- package/dist/es2019/components/tab-panel.js +6 -3
- package/dist/es2019/components/tab.js +10 -3
- package/dist/es2019/components/tabs.js +36 -27
- package/dist/es2019/internal/styles.js +0 -10
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/tab-list.js +29 -29
- package/dist/esm/components/tab-panel.js +6 -3
- package/dist/esm/components/tab.js +10 -3
- package/dist/esm/components/tabs.js +36 -29
- package/dist/esm/internal/styles.js +0 -10
- package/dist/esm/version.json +1 -1
- package/dist/types/components/tab-list.d.ts +1 -1
- package/dist/types/components/tab-panel.d.ts +0 -1
- package/dist/types/components/tabs.d.ts +1 -1
- package/dist/types-ts4.0/components/tab-list.d.ts +13 -0
- package/dist/types-ts4.0/components/tab-panel.d.ts +13 -0
- package/dist/types-ts4.0/components/tab.d.ts +13 -0
- package/dist/types-ts4.0/components/tabs.d.ts +13 -0
- package/dist/types-ts4.0/hooks.d.ts +3 -0
- package/dist/types-ts4.0/index.d.ts +6 -0
- package/dist/types-ts4.0/internal/colors.d.ts +17 -0
- package/dist/types-ts4.0/internal/context.d.ts +5 -0
- package/dist/types-ts4.0/internal/styles.d.ts +5 -0
- package/dist/types-ts4.0/internal/utils.d.ts +2 -0
- package/dist/types-ts4.0/performance/examples.d.ts +24 -0
- package/dist/types-ts4.0/types.d.ts +196 -0
- package/hooks/package.json +8 -1
- package/package.json +17 -6
- package/report.api.md +58 -13
- package/types/package.json +8 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/tabs",
|
|
3
|
-
"version": "13.3.
|
|
3
|
+
"version": "13.3.2",
|
|
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,6 +12,13 @@
|
|
|
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
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
15
22
|
"sideEffects": false,
|
|
16
23
|
"atlaskit:src": "src/index.tsx",
|
|
17
24
|
"atlassian": {
|
|
@@ -25,6 +32,7 @@
|
|
|
25
32
|
"dependencies": {
|
|
26
33
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
27
34
|
"@atlaskit/codemod-utils": "^4.1.0",
|
|
35
|
+
"@atlaskit/ds-explorations": "^0.1.0",
|
|
28
36
|
"@atlaskit/theme": "^12.2.0",
|
|
29
37
|
"@atlaskit/tokens": "^0.10.0",
|
|
30
38
|
"@babel/runtime": "^7.0.0",
|
|
@@ -37,20 +45,20 @@
|
|
|
37
45
|
"@atlaskit/button": "^16.3.0",
|
|
38
46
|
"@atlaskit/docs": "*",
|
|
39
47
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
40
|
-
"@atlaskit/section-message": "^6.
|
|
48
|
+
"@atlaskit/section-message": "^6.3.0",
|
|
41
49
|
"@atlaskit/spinner": "^15.1.0",
|
|
42
50
|
"@atlaskit/ssr": "*",
|
|
43
|
-
"@atlaskit/tooltip": "^17.
|
|
51
|
+
"@atlaskit/tooltip": "^17.6.0",
|
|
44
52
|
"@atlaskit/visual-regression": "*",
|
|
45
53
|
"@atlaskit/webdriver-runner": "*",
|
|
46
54
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
47
|
-
"@testing-library/react": "^
|
|
55
|
+
"@testing-library/react": "^12.1.5",
|
|
48
56
|
"enzyme": "^3.10.0",
|
|
49
57
|
"jscodeshift": "^0.13.0",
|
|
50
58
|
"react-dom": "^16.8.0",
|
|
51
59
|
"react-lorem-component": "^0.13.0",
|
|
52
60
|
"storybook-addon-performance": "^0.16.0",
|
|
53
|
-
"typescript": "4.
|
|
61
|
+
"typescript": "4.5.5",
|
|
54
62
|
"wait-for-expect": "^1.2.0"
|
|
55
63
|
},
|
|
56
64
|
"techstack": {
|
|
@@ -60,7 +68,10 @@
|
|
|
60
68
|
"@repo/internal": {
|
|
61
69
|
"dom-events": "use-bind-event-listener",
|
|
62
70
|
"design-system": "v1",
|
|
63
|
-
"ui-components":
|
|
71
|
+
"ui-components": [
|
|
72
|
+
"primitives",
|
|
73
|
+
"lite-mode"
|
|
74
|
+
],
|
|
64
75
|
"analytics": "analytics-next",
|
|
65
76
|
"theming": "tokens",
|
|
66
77
|
"styling": [
|
package/report.api.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/tabs"
|
|
1
|
+
## API Report File for "@atlaskit/tabs".
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
/// <reference types="react" />
|
|
5
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
6
|
|
|
7
|
+
```ts
|
|
8
|
+
import { jsx } from '@emotion/react';
|
|
8
9
|
import { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
|
9
10
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
10
11
|
import { ReactNode } from 'react';
|
|
@@ -18,7 +19,16 @@ declare type OnChangeCallback = (
|
|
|
18
19
|
|
|
19
20
|
declare type SelectedType = number;
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
/**
|
|
23
|
+
* __Tab__
|
|
24
|
+
*
|
|
25
|
+
* Tab represents an indivudal Tab displayed in a TabList.
|
|
26
|
+
*
|
|
27
|
+
* - [Examples](https://atlassian.design/components/tabs/examples)
|
|
28
|
+
* - [Code](https://atlassian.design/components/tabs/code)
|
|
29
|
+
* - [Usage](https://atlassian.design/components/tabs/usage)
|
|
30
|
+
*/
|
|
31
|
+
export declare function Tab({ children, testId }: TabProps): jsx.JSX.Element;
|
|
22
32
|
|
|
23
33
|
export declare type TabAttributesType = {
|
|
24
34
|
/**
|
|
@@ -79,19 +89,36 @@ export declare type TabAttributesType = {
|
|
|
79
89
|
* The TabData type remains so the variable used in tabs can have a type.
|
|
80
90
|
*/
|
|
81
91
|
export declare interface TabData {
|
|
82
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* String to be put inside a tab
|
|
94
|
+
*/
|
|
83
95
|
label?: string;
|
|
84
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* String to be put inside a tab panel
|
|
98
|
+
*/
|
|
85
99
|
content?: ReactNode;
|
|
86
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* A `testId` prop is provided for specified elements, which is a unique
|
|
87
102
|
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
88
|
-
* serving as a hook for automated tests. This `testId` is put on the tab.
|
|
103
|
+
* serving as a hook for automated tests. This `testId` is put on the tab.
|
|
104
|
+
*/
|
|
89
105
|
testId?: string;
|
|
90
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* Used by consumers to convey extra information about the tab.
|
|
108
|
+
*/
|
|
91
109
|
[key: string]: any;
|
|
92
110
|
}
|
|
93
111
|
|
|
94
|
-
|
|
112
|
+
/**
|
|
113
|
+
* __TabList__
|
|
114
|
+
*
|
|
115
|
+
* A TabList groups `Tab` components together.
|
|
116
|
+
*
|
|
117
|
+
* - [Examples](https://atlassian.design/components/tabs/examples)
|
|
118
|
+
* - [Code](https://atlassian.design/components/tabs/code)
|
|
119
|
+
* - [Usage](https://atlassian.design/components/tabs/usage)
|
|
120
|
+
*/
|
|
121
|
+
export declare const TabList: (props: TabListProps) => jsx.JSX.Element;
|
|
95
122
|
|
|
96
123
|
export declare type TabListAttributesType = {
|
|
97
124
|
/**
|
|
@@ -117,10 +144,19 @@ export declare interface TabListProps {
|
|
|
117
144
|
children: ReactNode;
|
|
118
145
|
}
|
|
119
146
|
|
|
147
|
+
/**
|
|
148
|
+
* __TabPanel__
|
|
149
|
+
*
|
|
150
|
+
* A TabPanel houses the contents of a Tab.
|
|
151
|
+
*
|
|
152
|
+
* - [Examples](https://atlassian.design/components/tabs/examples)
|
|
153
|
+
* - [Code](https://atlassian.design/components/tabs/code)
|
|
154
|
+
* - [Usage](https://atlassian.design/components/tabs/usage)
|
|
155
|
+
*/
|
|
120
156
|
export declare const TabPanel: ({
|
|
121
157
|
children,
|
|
122
158
|
testId,
|
|
123
|
-
}: TabPanelProps) => JSX.Element;
|
|
159
|
+
}: TabPanelProps) => jsx.JSX.Element;
|
|
124
160
|
|
|
125
161
|
export declare type TabPanelAttributesType = {
|
|
126
162
|
/**
|
|
@@ -174,7 +210,16 @@ export declare interface TabProps {
|
|
|
174
210
|
testId?: string;
|
|
175
211
|
}
|
|
176
212
|
|
|
177
|
-
|
|
213
|
+
/**
|
|
214
|
+
* __Tabs__
|
|
215
|
+
*
|
|
216
|
+
* Tabs acts as a container for all Tab components.
|
|
217
|
+
*
|
|
218
|
+
* - [Examples](https://atlassian.design/components/tabs/examples)
|
|
219
|
+
* - [Code](https://atlassian.design/components/tabs/code)
|
|
220
|
+
* - [Usage](https://atlassian.design/components/tabs/usage)
|
|
221
|
+
*/
|
|
222
|
+
declare const Tabs: (props: TabsProps) => jsx.JSX.Element;
|
|
178
223
|
export default Tabs;
|
|
179
224
|
|
|
180
225
|
export declare interface TabsProps extends WithAnalyticsEventsProps {
|
package/types/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/types.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/types.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/types.d.ts"
|
|
7
|
+
"types": "../dist/types/types.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/types.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|