@atlaskit/tabs 16.1.2 → 16.2.0

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 (42) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/__perf__/default.tsx +16 -16
  3. package/codemods/13.0.0-lite-mode.tsx +14 -18
  4. package/codemods/__tests__/13.0.0-lite-mode.tsx +44 -44
  5. package/codemods/__tests__/add-id-prop.tsx +13 -13
  6. package/codemods/__tests__/map-tabs-prop.tsx +42 -42
  7. package/codemods/__tests__/on-select-to-on-change.tsx +49 -49
  8. package/codemods/__tests__/remove-components-prop.tsx +14 -14
  9. package/codemods/__tests__/remove-is-selected-test-prop.tsx +14 -14
  10. package/codemods/__tests__/remove-tab-item-tab-content.tsx +7 -7
  11. package/codemods/__tests__/remove-types.tsx +14 -14
  12. package/codemods/__tests__/rename-is-content-persisted-to-should-unmount-tab-panel-on-change.tsx +36 -38
  13. package/codemods/migrations/add-id-prop.tsx +37 -45
  14. package/codemods/migrations/map-tabs-prop.tsx +143 -164
  15. package/codemods/migrations/on-select-to-on-change.tsx +66 -76
  16. package/codemods/migrations/remove-components-prop.tsx +3 -3
  17. package/codemods/migrations/remove-is-selected-test-prop.tsx +3 -3
  18. package/codemods/migrations/remove-tab-item-tab-content.tsx +19 -22
  19. package/codemods/migrations/remove-types.tsx +32 -32
  20. package/codemods/migrations/rename-is-content-persisted-to-should-unmount-tab-panel-on-change.tsx +46 -59
  21. package/codemods/utils.tsx +25 -28
  22. package/dist/cjs/components/tab-list.js +5 -0
  23. package/dist/cjs/components/tab-panel.js +5 -0
  24. package/dist/cjs/components/tab.js +4 -0
  25. package/dist/cjs/components/tabs.js +4 -2
  26. package/dist/cjs/internal/styles.js +8 -5
  27. package/dist/es2019/components/tab-list.js +5 -0
  28. package/dist/es2019/components/tab-panel.js +5 -0
  29. package/dist/es2019/components/tab.js +4 -0
  30. package/dist/es2019/components/tabs.js +6 -1
  31. package/dist/es2019/internal/styles.js +9 -4
  32. package/dist/esm/components/tab-list.js +5 -0
  33. package/dist/esm/components/tab-panel.js +5 -0
  34. package/dist/esm/components/tab.js +4 -0
  35. package/dist/esm/components/tabs.js +6 -1
  36. package/dist/esm/internal/styles.js +8 -4
  37. package/dist/types/components/tab.d.ts +3 -0
  38. package/dist/types-ts4.5/components/tab.d.ts +3 -0
  39. package/extract-react-types/tab-attributes.tsx +1 -1
  40. package/extract-react-types/tab-panel-attributes.tsx +1 -1
  41. package/package.json +93 -93
  42. package/report.api.md +40 -42
package/package.json CHANGED
@@ -1,94 +1,94 @@
1
1
  {
2
- "name": "@atlaskit/tabs",
3
- "version": "16.1.2",
4
- "description": "Tabs are used to organize content by grouping similar information on the same page.",
5
- "publishConfig": {
6
- "registry": "https://registry.npmjs.org/"
7
- },
8
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
- "author": "Atlassian Pty Ltd",
10
- "license": "Apache-2.0",
11
- "main": "dist/cjs/index.js",
12
- "module": "dist/esm/index.js",
13
- "module:es2019": "dist/es2019/index.js",
14
- "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.5 <4.9": {
17
- "*": [
18
- "dist/types-ts4.5/*",
19
- "dist/types-ts4.5/index.d.ts"
20
- ]
21
- }
22
- },
23
- "sideEffects": false,
24
- "atlaskit:src": "src/index.tsx",
25
- "atlassian": {
26
- "team": "Design System Team",
27
- "releaseModel": "continuous",
28
- "productPushConsumption": [
29
- "jira"
30
- ],
31
- "website": {
32
- "name": "Tabs",
33
- "category": "Components"
34
- },
35
- "runReact18": true
36
- },
37
- "dependencies": {
38
- "@atlaskit/analytics-next": "^9.3.0",
39
- "@atlaskit/codemod-utils": "^4.2.0",
40
- "@atlaskit/focus-ring": "^1.4.0",
41
- "@atlaskit/primitives": "^7.0.0",
42
- "@atlaskit/theme": "^12.9.0",
43
- "@atlaskit/tokens": "^1.49.0",
44
- "@babel/runtime": "^7.0.0",
45
- "@emotion/react": "^11.7.1"
46
- },
47
- "peerDependencies": {
48
- "react": "^16.8.0 || ^17.0.0 || ~18.2.0"
49
- },
50
- "devDependencies": {
51
- "@af/accessibility-testing": "*",
52
- "@af/integration-testing": "*",
53
- "@atlaskit/ds-lib": "^2.3.0",
54
- "@atlaskit/ssr": "*",
55
- "@atlaskit/tooltip": "^18.4.0",
56
- "@atlaskit/visual-regression": "*",
57
- "@testing-library/react": "^12.1.5",
58
- "jscodeshift": "^0.13.0",
59
- "react-dom": "^16.8.0",
60
- "react-lorem-component": "^0.13.0",
61
- "storybook-addon-performance": "^0.16.0",
62
- "typescript": "~5.4.2",
63
- "wait-for-expect": "^1.2.0"
64
- },
65
- "techstack": {
66
- "@atlassian/frontend": {
67
- "import-structure": "atlassian-conventions"
68
- },
69
- "@repo/internal": {
70
- "dom-events": "use-bind-event-listener",
71
- "design-system": "v1",
72
- "ui-components": [
73
- "primitives",
74
- "lite-mode"
75
- ],
76
- "analytics": "analytics-next",
77
- "design-tokens": [
78
- "color",
79
- "spacing"
80
- ],
81
- "styling": [
82
- "static",
83
- "emotion"
84
- ],
85
- "deprecation": "no-deprecated-imports"
86
- }
87
- },
88
- "af:exports": {
89
- ".": "./src/index.tsx",
90
- "./types": "./src/types.tsx",
91
- "./hooks": "./src/hooks.tsx"
92
- },
93
- "homepage": "https://atlassian.design/components/tabs/"
94
- }
2
+ "name": "@atlaskit/tabs",
3
+ "version": "16.2.0",
4
+ "description": "Tabs are used to organize content by grouping similar information on the same page.",
5
+ "publishConfig": {
6
+ "registry": "https://registry.npmjs.org/"
7
+ },
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
+ "author": "Atlassian Pty Ltd",
10
+ "license": "Apache-2.0",
11
+ "main": "dist/cjs/index.js",
12
+ "module": "dist/esm/index.js",
13
+ "module:es2019": "dist/es2019/index.js",
14
+ "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.5 <4.9": {
17
+ "*": [
18
+ "dist/types-ts4.5/*",
19
+ "dist/types-ts4.5/index.d.ts"
20
+ ]
21
+ }
22
+ },
23
+ "sideEffects": false,
24
+ "atlaskit:src": "src/index.tsx",
25
+ "atlassian": {
26
+ "team": "Design System Team",
27
+ "releaseModel": "continuous",
28
+ "productPushConsumption": [
29
+ "jira"
30
+ ],
31
+ "website": {
32
+ "name": "Tabs",
33
+ "category": "Components"
34
+ },
35
+ "runReact18": true
36
+ },
37
+ "dependencies": {
38
+ "@atlaskit/analytics-next": "^9.3.0",
39
+ "@atlaskit/codemod-utils": "^4.2.0",
40
+ "@atlaskit/focus-ring": "^1.4.0",
41
+ "@atlaskit/primitives": "^7.3.0",
42
+ "@atlaskit/theme": "^12.10.0",
43
+ "@atlaskit/tokens": "^1.51.0",
44
+ "@babel/runtime": "^7.0.0",
45
+ "@emotion/react": "^11.7.1"
46
+ },
47
+ "peerDependencies": {
48
+ "react": "^16.8.0 || ^17.0.0 || ~18.2.0"
49
+ },
50
+ "devDependencies": {
51
+ "@af/accessibility-testing": "*",
52
+ "@af/integration-testing": "*",
53
+ "@atlaskit/ds-lib": "^2.3.0",
54
+ "@atlaskit/ssr": "*",
55
+ "@atlaskit/tooltip": "^18.5.0",
56
+ "@atlaskit/visual-regression": "*",
57
+ "@testing-library/react": "^12.1.5",
58
+ "jscodeshift": "^0.13.0",
59
+ "react-dom": "^16.8.0",
60
+ "react-lorem-component": "^0.13.0",
61
+ "storybook-addon-performance": "^0.16.0",
62
+ "typescript": "~5.4.2",
63
+ "wait-for-expect": "^1.2.0"
64
+ },
65
+ "techstack": {
66
+ "@atlassian/frontend": {
67
+ "import-structure": "atlassian-conventions"
68
+ },
69
+ "@repo/internal": {
70
+ "dom-events": "use-bind-event-listener",
71
+ "design-system": "v1",
72
+ "ui-components": [
73
+ "primitives",
74
+ "lite-mode"
75
+ ],
76
+ "analytics": "analytics-next",
77
+ "design-tokens": [
78
+ "color",
79
+ "spacing"
80
+ ],
81
+ "styling": [
82
+ "static",
83
+ "emotion"
84
+ ],
85
+ "deprecation": "no-deprecated-imports"
86
+ }
87
+ },
88
+ "af:exports": {
89
+ ".": "./src/index.tsx",
90
+ "./types": "./src/types.tsx",
91
+ "./hooks": "./src/hooks.tsx"
92
+ },
93
+ "homepage": "https://atlassian.design/components/tabs/"
94
+ }
package/report.api.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## API Report File for "@atlaskit/tabs"
4
4
 
5
- > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
5
+ > Do not edit this file. This report is auto-generated using
6
+ > [API Extractor](https://api-extractor.com/).
6
7
  > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
8
 
8
9
  ### Table of contents
@@ -23,10 +24,7 @@ import UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
23
24
  import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
24
25
 
25
26
  // @public (undocumented)
26
- type OnChangeCallback = (
27
- index: SelectedType,
28
- analyticsEvent: UIAnalyticsEvent,
29
- ) => void;
27
+ type OnChangeCallback = (index: SelectedType, analyticsEvent: UIAnalyticsEvent) => void;
30
28
 
31
29
  // @public (undocumented)
32
30
  type SelectedType = number;
@@ -36,24 +34,24 @@ export function Tab({ children, testId }: TabProps): jsx.JSX.Element;
36
34
 
37
35
  // @public (undocumented)
38
36
  export type TabAttributesType = {
39
- onClick: () => void;
40
- id: string;
41
- 'aria-controls': string;
42
- 'aria-posinset': number;
43
- 'aria-selected': boolean;
44
- 'aria-setsize': number;
45
- onMouseDown: (e: MouseEvent_2<HTMLElement>) => void;
46
- onKeyDown: (e: KeyboardEvent_2<HTMLElement>) => void;
47
- role: 'tab';
48
- tabIndex: number;
37
+ onClick: () => void;
38
+ id: string;
39
+ 'aria-controls': string;
40
+ 'aria-posinset': number;
41
+ 'aria-selected': boolean;
42
+ 'aria-setsize': number;
43
+ onMouseDown: (e: MouseEvent_2<HTMLElement>) => void;
44
+ onKeyDown: (e: KeyboardEvent_2<HTMLElement>) => void;
45
+ role: 'tab';
46
+ tabIndex: number;
49
47
  };
50
48
 
51
49
  // @public @deprecated (undocumented)
52
50
  export interface TabData {
53
- [key: string]: any;
54
- content?: ReactNode;
55
- label?: string;
56
- testId?: string;
51
+ [key: string]: any;
52
+ content?: ReactNode;
53
+ label?: string;
54
+ testId?: string;
57
55
  }
58
56
 
59
57
  // @public
@@ -61,14 +59,14 @@ export const TabList: ({ children }: TabListProps) => jsx.JSX.Element;
61
59
 
62
60
  // @public (undocumented)
63
61
  export type TabListAttributesType = {
64
- selected: SelectedType;
65
- tabsId: string;
66
- onChange: (index: SelectedType) => void;
62
+ selected: SelectedType;
63
+ tabsId: string;
64
+ onChange: (index: SelectedType) => void;
67
65
  };
68
66
 
69
67
  // @public (undocumented)
70
68
  export interface TabListProps {
71
- children: ReactNode;
69
+ children: ReactNode;
72
70
  }
73
71
 
74
72
  // @public
@@ -76,24 +74,24 @@ export const TabPanel: ({ children, testId }: TabPanelProps) => jsx.JSX.Element;
76
74
 
77
75
  // @public (undocumented)
78
76
  export type TabPanelAttributesType = {
79
- role: 'tabpanel';
80
- id: string;
81
- hidden?: boolean;
82
- 'aria-labelledby': string;
83
- onMouseDown: (e: MouseEvent_2<HTMLElement>) => void;
84
- tabIndex: number;
77
+ role: 'tabpanel';
78
+ id: string;
79
+ hidden?: boolean;
80
+ 'aria-labelledby': string;
81
+ onMouseDown: (e: MouseEvent_2<HTMLElement>) => void;
82
+ tabIndex: number;
85
83
  };
86
84
 
87
85
  // @public (undocumented)
88
86
  export interface TabPanelProps {
89
- children: ReactNode;
90
- testId?: string;
87
+ children: ReactNode;
88
+ testId?: string;
91
89
  }
92
90
 
93
91
  // @public (undocumented)
94
92
  export interface TabProps {
95
- children: ReactNode;
96
- testId?: string;
93
+ children: ReactNode;
94
+ testId?: string;
97
95
  }
98
96
 
99
97
  // @public
@@ -102,14 +100,14 @@ export default Tabs;
102
100
 
103
101
  // @public (undocumented)
104
102
  export interface TabsProps extends WithAnalyticsEventsProps {
105
- analyticsContext?: Record<string, any>;
106
- children: ReactNode;
107
- defaultSelected?: SelectedType;
108
- id: string;
109
- onChange?: OnChangeCallback;
110
- selected?: SelectedType;
111
- shouldUnmountTabPanelOnChange?: boolean;
112
- testId?: string;
103
+ analyticsContext?: Record<string, any>;
104
+ children: ReactNode;
105
+ defaultSelected?: SelectedType;
106
+ id: string;
107
+ onChange?: OnChangeCallback;
108
+ selected?: SelectedType;
109
+ shouldUnmountTabPanelOnChange?: boolean;
110
+ testId?: string;
113
111
  }
114
112
 
115
113
  // @public (undocumented)
@@ -129,7 +127,7 @@ export const useTabPanel: () => TabPanelAttributesType;
129
127
 
130
128
  ```json
131
129
  {
132
- "react": "^16.8.0"
130
+ "react": "^16.8.0"
133
131
  }
134
132
  ```
135
133