@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.
Files changed (39) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/__perf__/default.tsx +1 -0
  3. package/dist/cjs/components/tab-list.js +32 -34
  4. package/dist/cjs/components/tab-panel.js +9 -4
  5. package/dist/cjs/components/tab.js +11 -3
  6. package/dist/cjs/components/tabs.js +37 -32
  7. package/dist/cjs/internal/styles.js +0 -10
  8. package/dist/cjs/version.json +1 -1
  9. package/dist/es2019/components/tab-list.js +29 -26
  10. package/dist/es2019/components/tab-panel.js +6 -3
  11. package/dist/es2019/components/tab.js +10 -3
  12. package/dist/es2019/components/tabs.js +36 -27
  13. package/dist/es2019/internal/styles.js +0 -10
  14. package/dist/es2019/version.json +1 -1
  15. package/dist/esm/components/tab-list.js +29 -29
  16. package/dist/esm/components/tab-panel.js +6 -3
  17. package/dist/esm/components/tab.js +10 -3
  18. package/dist/esm/components/tabs.js +36 -29
  19. package/dist/esm/internal/styles.js +0 -10
  20. package/dist/esm/version.json +1 -1
  21. package/dist/types/components/tab-list.d.ts +1 -1
  22. package/dist/types/components/tab-panel.d.ts +0 -1
  23. package/dist/types/components/tabs.d.ts +1 -1
  24. package/dist/types-ts4.0/components/tab-list.d.ts +13 -0
  25. package/dist/types-ts4.0/components/tab-panel.d.ts +13 -0
  26. package/dist/types-ts4.0/components/tab.d.ts +13 -0
  27. package/dist/types-ts4.0/components/tabs.d.ts +13 -0
  28. package/dist/types-ts4.0/hooks.d.ts +3 -0
  29. package/dist/types-ts4.0/index.d.ts +6 -0
  30. package/dist/types-ts4.0/internal/colors.d.ts +17 -0
  31. package/dist/types-ts4.0/internal/context.d.ts +5 -0
  32. package/dist/types-ts4.0/internal/styles.d.ts +5 -0
  33. package/dist/types-ts4.0/internal/utils.d.ts +2 -0
  34. package/dist/types-ts4.0/performance/examples.d.ts +24 -0
  35. package/dist/types-ts4.0/types.d.ts +196 -0
  36. package/hooks/package.json +8 -1
  37. package/package.json +17 -6
  38. package/report.api.md +58 -13
  39. 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.0",
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.2.0",
48
+ "@atlaskit/section-message": "^6.3.0",
41
49
  "@atlaskit/spinner": "^15.1.0",
42
50
  "@atlaskit/ssr": "*",
43
- "@atlaskit/tooltip": "^17.5.0",
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": "^8.0.1",
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.3.5",
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": "lite-mode",
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. It is a report generated by [API Extractor](https://api-extractor.com/).
3
+ > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
4
4
 
5
- ```ts
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
- export declare function Tab({ children, testId }: TabProps): JSX.Element;
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
- /** String to be put inside a tab */
92
+ /**
93
+ * String to be put inside a tab
94
+ */
83
95
  label?: string;
84
- /** String to be put inside a tab panel */
96
+ /**
97
+ * String to be put inside a tab panel
98
+ */
85
99
  content?: ReactNode;
86
- /** A `testId` prop is provided for specified elements, which is a unique
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
- /** Used by consumers to convey extra information about the tab. */
106
+ /**
107
+ * Used by consumers to convey extra information about the tab.
108
+ */
91
109
  [key: string]: any;
92
110
  }
93
111
 
94
- export declare const TabList: (props: TabListProps) => JSX.Element;
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
- declare const Tabs: (props: TabsProps) => JSX.Element;
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 {
@@ -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
  }