@atlaskit/popup 1.17.2 → 1.19.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.
- package/CHANGELOG.md +454 -432
- package/__perf__/closed.tsx +30 -30
- package/__perf__/default.tsx +23 -19
- package/__perf__/open.tsx +19 -23
- package/__perf__/popup.tsx +26 -26
- package/__perf__/utils/interaction-tasks.tsx +37 -50
- package/codemods/1.0.0-lite-mode.tsx +148 -181
- package/codemods/__tests__/1.0.0-lite-mode.tsx +88 -88
- package/codemods/utils/helpers.tsx +250 -261
- package/dist/cjs/popper-wrapper.js +18 -6
- package/dist/cjs/popup.js +22 -4
- package/dist/es2019/popper-wrapper.js +18 -5
- package/dist/es2019/popup.js +21 -4
- package/dist/esm/popper-wrapper.js +19 -6
- package/dist/esm/popup.js +22 -4
- package/dist/types/compositional/popup.d.ts +1 -1
- package/dist/types/entry-points/experimental/compositional.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/popper-wrapper.d.ts +1 -1
- package/dist/types/popup.d.ts +3 -0
- package/dist/types/reposition-on-update.d.ts +1 -1
- package/dist/types/types.d.ts +24 -1
- package/dist/types-ts4.5/compositional/popup.d.ts +1 -1
- package/dist/types-ts4.5/entry-points/experimental/compositional.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/popper-wrapper.d.ts +1 -1
- package/dist/types-ts4.5/popup.d.ts +3 -0
- package/dist/types-ts4.5/reposition-on-update.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +24 -1
- package/package.json +117 -118
- package/report.api.md +41 -40
package/package.json
CHANGED
|
@@ -1,119 +1,118 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
2
|
+
"name": "@atlaskit/popup",
|
|
3
|
+
"version": "1.19.0",
|
|
4
|
+
"description": "A popup displays brief content in an overlay.",
|
|
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
|
+
"af:exports": {
|
|
26
|
+
".": "./src/index.tsx",
|
|
27
|
+
"./types": "./src/types.tsx",
|
|
28
|
+
"./experimental": "./src/entry-points/experimental/compositional.tsx"
|
|
29
|
+
},
|
|
30
|
+
"atlassian": {
|
|
31
|
+
"team": "Design System Team",
|
|
32
|
+
"productPushConsumption": [
|
|
33
|
+
"jira"
|
|
34
|
+
],
|
|
35
|
+
"releaseModel": "continuous",
|
|
36
|
+
"runReact18": true,
|
|
37
|
+
"website": {
|
|
38
|
+
"name": "Popup",
|
|
39
|
+
"category": "Components"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@atlaskit/ds-lib": "^2.3.0",
|
|
44
|
+
"@atlaskit/layering": "^0.3.0",
|
|
45
|
+
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
46
|
+
"@atlaskit/popper": "^6.1.0",
|
|
47
|
+
"@atlaskit/portal": "^4.6.0",
|
|
48
|
+
"@atlaskit/primitives": "^7.4.0",
|
|
49
|
+
"@atlaskit/theme": "^12.10.0",
|
|
50
|
+
"@atlaskit/tokens": "^1.51.0",
|
|
51
|
+
"@babel/runtime": "^7.0.0",
|
|
52
|
+
"@emotion/react": "^11.7.1",
|
|
53
|
+
"bind-event-listener": "^3.0.0",
|
|
54
|
+
"focus-trap": "^2.4.5",
|
|
55
|
+
"memoize-one": "^6.0.0",
|
|
56
|
+
"react-uid": "^2.2.0",
|
|
57
|
+
"tiny-invariant": "^1.2.0"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"react": "^16.8.0 || ^17.0.0 || ~18.2.0",
|
|
61
|
+
"react-dom": "^16.8.0"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@af/accessibility-testing": "*",
|
|
65
|
+
"@af/visual-regression": "*",
|
|
66
|
+
"@atlaskit/button": "^17.17.0",
|
|
67
|
+
"@atlaskit/icon": "^22.4.0",
|
|
68
|
+
"@atlaskit/ssr": "*",
|
|
69
|
+
"@atlaskit/textfield": "^6.4.0",
|
|
70
|
+
"@atlaskit/toggle": "^13.2.0",
|
|
71
|
+
"@atlaskit/visual-regression": "*",
|
|
72
|
+
"@atlassian/feature-flags-test-utils": "*",
|
|
73
|
+
"@testing-library/dom": "^8.17.1",
|
|
74
|
+
"@testing-library/react": "^12.1.5",
|
|
75
|
+
"@testing-library/user-event": "^14.4.3",
|
|
76
|
+
"ast-types": "^0.13.3",
|
|
77
|
+
"jscodeshift": "^0.13.0",
|
|
78
|
+
"raf-stub": "^2.0.1",
|
|
79
|
+
"react-dom": "^16.8.0",
|
|
80
|
+
"storybook-addon-performance": "^0.16.0",
|
|
81
|
+
"typescript": "~5.4.2",
|
|
82
|
+
"wait-for-expect": "^1.2.0"
|
|
83
|
+
},
|
|
84
|
+
"keywords": [
|
|
85
|
+
"atlaskit",
|
|
86
|
+
"react",
|
|
87
|
+
"ui"
|
|
88
|
+
],
|
|
89
|
+
"techstack": {
|
|
90
|
+
"@atlassian/frontend": {
|
|
91
|
+
"import-structure": "atlassian-conventions"
|
|
92
|
+
},
|
|
93
|
+
"@repo/internal": {
|
|
94
|
+
"dom-events": "use-bind-event-listener",
|
|
95
|
+
"design-system": "v1",
|
|
96
|
+
"ui-components": "lite-mode",
|
|
97
|
+
"analytics": "analytics-next",
|
|
98
|
+
"design-tokens": [
|
|
99
|
+
"color",
|
|
100
|
+
"spacing"
|
|
101
|
+
],
|
|
102
|
+
"deprecation": "no-deprecated-imports",
|
|
103
|
+
"styling": [
|
|
104
|
+
"static",
|
|
105
|
+
"emotion"
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"platform-feature-flags": {
|
|
110
|
+
"platform.design-system-team.iframe_gojiv": {
|
|
111
|
+
"type": "boolean"
|
|
112
|
+
},
|
|
113
|
+
"platform.design-system-team.iframe-layering_p3eb8": {
|
|
114
|
+
"type": "boolean"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"homepage": "https://atlassian.design/components/popup/"
|
|
118
|
+
}
|
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/popup"
|
|
4
4
|
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
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
|
|
@@ -28,29 +29,29 @@ import { SetStateAction } from 'react';
|
|
|
28
29
|
|
|
29
30
|
// @public (undocumented)
|
|
30
31
|
interface BaseProps {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
autoFocus?: boolean;
|
|
33
|
+
boundary?: 'clippingParents' | HTMLElement;
|
|
34
|
+
content: (props: ContentProps) => React_2.ReactNode;
|
|
35
|
+
fallbackPlacements?: Placement[];
|
|
36
|
+
id?: string;
|
|
37
|
+
isOpen: boolean;
|
|
38
|
+
offset?: [number, number];
|
|
39
|
+
onClose?(event: Event | React_2.KeyboardEvent | React_2.MouseEvent): void;
|
|
40
|
+
placement?: Placement;
|
|
41
|
+
popupComponent?: ComponentType<PopupComponentProps>;
|
|
42
|
+
rootBoundary?: 'document' | 'viewport';
|
|
43
|
+
shouldFlip?: boolean;
|
|
44
|
+
shouldRenderToParent?: boolean;
|
|
45
|
+
shouldUseCaptureOnOutsideClick?: boolean;
|
|
46
|
+
testId?: string;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
// @public (undocumented)
|
|
49
50
|
export interface ContentProps {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
isOpen: boolean;
|
|
52
|
+
onClose?: BaseProps['onClose'];
|
|
53
|
+
setInitialFocusRef: Dispatch<SetStateAction<HTMLElement | null>>;
|
|
54
|
+
update: PopperChildrenProps['update'];
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
// @public (undocumented)
|
|
@@ -60,32 +61,32 @@ export default Popup;
|
|
|
60
61
|
|
|
61
62
|
// @public (undocumented)
|
|
62
63
|
export interface PopupComponentProps {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
'data-placement': Placement;
|
|
65
|
+
'data-testid'?: string;
|
|
66
|
+
children: ReactNode;
|
|
67
|
+
id?: string;
|
|
68
|
+
ref: Ref<HTMLDivElement>;
|
|
69
|
+
shouldRenderToParent?: boolean;
|
|
70
|
+
style: CSSProperties;
|
|
71
|
+
tabIndex: number | undefined;
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
// @public (undocumented)
|
|
74
75
|
export interface PopupProps extends BaseProps {
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
trigger: (props: TriggerProps) => React_2.ReactNode;
|
|
77
|
+
zIndex?: number;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
// @public (undocumented)
|
|
80
81
|
export interface TriggerProps {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
// (undocumented)
|
|
83
|
+
'aria-controls'?: string;
|
|
84
|
+
// (undocumented)
|
|
85
|
+
'aria-expanded': boolean;
|
|
86
|
+
// (undocumented)
|
|
87
|
+
'aria-haspopup': boolean;
|
|
88
|
+
// (undocumented)
|
|
89
|
+
ref: Ref<any>;
|
|
89
90
|
}
|
|
90
91
|
|
|
91
92
|
// (No @packageDocumentation comment for this package)
|
|
@@ -99,8 +100,8 @@ export interface TriggerProps {
|
|
|
99
100
|
|
|
100
101
|
```json
|
|
101
102
|
{
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
"react": "^16.8.0",
|
|
104
|
+
"react-dom": "^16.8.0"
|
|
104
105
|
}
|
|
105
106
|
```
|
|
106
107
|
|