@atlaskit/popup 4.13.3 → 4.14.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 +14 -0
- package/dist/cjs/popper-wrapper.js +2 -2
- package/dist/cjs/popup.js +1 -1
- package/dist/es2019/popper-wrapper.js +2 -2
- package/dist/es2019/popup.js +1 -1
- package/dist/esm/popper-wrapper.js +2 -2
- package/dist/esm/popup.js +1 -1
- package/dist/types/compositional/popup.d.ts +2 -2
- package/dist/types/use-appearance.d.ts +1 -1
- package/dist/types-ts4.5/compositional/popup.d.ts +2 -2
- package/dist/types-ts4.5/use-appearance.d.ts +1 -1
- package/package.json +10 -12
- package/popup.docs.tsx +47 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/popup
|
|
2
2
|
|
|
3
|
+
## 4.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`12424cd3197be`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/12424cd3197be) -
|
|
8
|
+
Cleans up the `platform_dst_nav4_flyoutmenuitem_render_to_parent` feature gate. Flyout menu item
|
|
9
|
+
popups now always use `shouldRenderToParent` and are not rendered in a portal.
|
|
10
|
+
|
|
11
|
+
## 4.13.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 4.13.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* popper-wrapper.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* popper-wrapper.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -47,7 +47,7 @@ var DefaultPopupComponent = /*#__PURE__*/(0, _react.forwardRef)(function (props,
|
|
|
47
47
|
htmlAttributes = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
48
48
|
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
|
49
49
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
50
|
-
className: (0, _runtime.ax)([wrapperStyles.root, (0, _platformFeatureFlags.fg)('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' && !(0, _platformFeatureFlags.fg)('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71ldtre _kqsw1n9t _152t1b66", appearance === 'UNSAFE_modal-below-sm' && (0, _platformFeatureFlags.fg)('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71l1ei0 _kqsw1n9t _152t1b66", (!shouldRenderToParent || shouldFitViewport
|
|
50
|
+
className: (0, _runtime.ax)([wrapperStyles.root, (0, _platformFeatureFlags.fg)('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' && !(0, _platformFeatureFlags.fg)('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71ldtre _kqsw1n9t _152t1b66", appearance === 'UNSAFE_modal-below-sm' && (0, _platformFeatureFlags.fg)('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71l1ei0 _kqsw1n9t _152t1b66", (!shouldRenderToParent || shouldFitViewport) && "_1reo1wug _18m91wug", shouldFitContainer && "_1bsb1osq", className])
|
|
51
51
|
}, htmlAttributes, {
|
|
52
52
|
ref: ref
|
|
53
53
|
}), children);
|
package/dist/cjs/popup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* popper-wrapper.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* popper-wrapper.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./popper-wrapper.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
@@ -36,7 +36,7 @@ const DefaultPopupComponent = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
36
36
|
} = props;
|
|
37
37
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
38
38
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
39
|
-
className: ax([wrapperStyles.root, fg('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' && !fg('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71ldtre _kqsw1n9t _152t1b66", appearance === 'UNSAFE_modal-below-sm' && fg('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71l1ei0 _kqsw1n9t _152t1b66", (!shouldRenderToParent || shouldFitViewport
|
|
39
|
+
className: ax([wrapperStyles.root, fg('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' && !fg('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71ldtre _kqsw1n9t _152t1b66", appearance === 'UNSAFE_modal-below-sm' && fg('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71l1ei0 _kqsw1n9t _152t1b66", (!shouldRenderToParent || shouldFitViewport) && "_1reo1wug _18m91wug", shouldFitContainer && "_1bsb1osq", className])
|
|
40
40
|
}, htmlAttributes, {
|
|
41
41
|
ref: ref
|
|
42
42
|
}), children);
|
package/dist/es2019/popup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* popper-wrapper.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* popper-wrapper.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _extends from "@babel/runtime/helpers/extends";
|
|
@@ -38,7 +38,7 @@ var DefaultPopupComponent = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
38
38
|
htmlAttributes = _objectWithoutProperties(props, _excluded);
|
|
39
39
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
40
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
41
|
-
className: ax([wrapperStyles.root, fg('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' && !fg('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71ldtre _kqsw1n9t _152t1b66", appearance === 'UNSAFE_modal-below-sm' && fg('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71l1ei0 _kqsw1n9t _152t1b66", (!shouldRenderToParent || shouldFitViewport
|
|
41
|
+
className: ax([wrapperStyles.root, fg('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' && !fg('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71ldtre _kqsw1n9t _152t1b66", appearance === 'UNSAFE_modal-below-sm' && fg('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71l1ei0 _kqsw1n9t _152t1b66", (!shouldRenderToParent || shouldFitViewport) && "_1reo1wug _18m91wug", shouldFitContainer && "_1bsb1osq", className])
|
|
42
42
|
}, htmlAttributes, {
|
|
43
43
|
ref: ref
|
|
44
44
|
}), children);
|
package/dist/esm/popup.js
CHANGED
|
@@ -25,7 +25,7 @@ export type PopupProps = {
|
|
|
25
25
|
* </Popup>
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
|
-
export declare const Popup: ({ children, id: providedId, isOpen, role }: PopupProps) => React.JSX.Element;
|
|
28
|
+
export declare const Popup: ({ children, id: providedId, isOpen, role, }: PopupProps) => React.JSX.Element;
|
|
29
29
|
export type PopupTriggerProps = {
|
|
30
30
|
children: (props: TriggerProps) => React.ReactNode;
|
|
31
31
|
};
|
|
@@ -68,5 +68,5 @@ export type PopupContentProps = ShouldFitContainerContentPopupProps | StandardPo
|
|
|
68
68
|
*
|
|
69
69
|
* It must be a child of the Popup component.
|
|
70
70
|
*/
|
|
71
|
-
export declare const PopupContent: ({ xcss, appearance: inAppearance, children, boundary, offset, strategy, onClose, testId, rootBoundary, shouldFlip, placement, fallbackPlacements, popupComponent, autoFocus, zIndex, shouldUseCaptureOnOutsideClick, shouldRenderToParent: inShouldRenderToParent, shouldDisableFocusLock, shouldFitContainer, shouldFitViewport, shouldDisableGpuAcceleration, role, titleId }: PopupContentProps) => React.JSX.Element | null;
|
|
71
|
+
export declare const PopupContent: ({ xcss, appearance: inAppearance, children, boundary, offset, strategy, onClose, testId, rootBoundary, shouldFlip, placement, fallbackPlacements, popupComponent, autoFocus, zIndex, shouldUseCaptureOnOutsideClick, shouldRenderToParent: inShouldRenderToParent, shouldDisableFocusLock, shouldFitContainer, shouldFitViewport, shouldDisableGpuAcceleration, role, titleId, }: PopupContentProps) => React.JSX.Element | null;
|
|
72
72
|
export {};
|
|
@@ -10,6 +10,6 @@ export declare function usePopupAppearance({ appearance: _appearance, shouldRend
|
|
|
10
10
|
appearance: 'default' | 'UNSAFE_modal-below-sm';
|
|
11
11
|
shouldRenderToParent?: boolean;
|
|
12
12
|
}): {
|
|
13
|
-
appearance:
|
|
13
|
+
appearance: 'default' | 'UNSAFE_modal-below-sm';
|
|
14
14
|
shouldRenderToParent: boolean | undefined;
|
|
15
15
|
};
|
|
@@ -25,7 +25,7 @@ export type PopupProps = {
|
|
|
25
25
|
* </Popup>
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
|
-
export declare const Popup: ({ children, id: providedId, isOpen, role }: PopupProps) => React.JSX.Element;
|
|
28
|
+
export declare const Popup: ({ children, id: providedId, isOpen, role, }: PopupProps) => React.JSX.Element;
|
|
29
29
|
export type PopupTriggerProps = {
|
|
30
30
|
children: (props: TriggerProps) => React.ReactNode;
|
|
31
31
|
};
|
|
@@ -68,5 +68,5 @@ export type PopupContentProps = ShouldFitContainerContentPopupProps | StandardPo
|
|
|
68
68
|
*
|
|
69
69
|
* It must be a child of the Popup component.
|
|
70
70
|
*/
|
|
71
|
-
export declare const PopupContent: ({ xcss, appearance: inAppearance, children, boundary, offset, strategy, onClose, testId, rootBoundary, shouldFlip, placement, fallbackPlacements, popupComponent, autoFocus, zIndex, shouldUseCaptureOnOutsideClick, shouldRenderToParent: inShouldRenderToParent, shouldDisableFocusLock, shouldFitContainer, shouldFitViewport, shouldDisableGpuAcceleration, role, titleId }: PopupContentProps) => React.JSX.Element | null;
|
|
71
|
+
export declare const PopupContent: ({ xcss, appearance: inAppearance, children, boundary, offset, strategy, onClose, testId, rootBoundary, shouldFlip, placement, fallbackPlacements, popupComponent, autoFocus, zIndex, shouldUseCaptureOnOutsideClick, shouldRenderToParent: inShouldRenderToParent, shouldDisableFocusLock, shouldFitContainer, shouldFitViewport, shouldDisableGpuAcceleration, role, titleId, }: PopupContentProps) => React.JSX.Element | null;
|
|
72
72
|
export {};
|
|
@@ -10,6 +10,6 @@ export declare function usePopupAppearance({ appearance: _appearance, shouldRend
|
|
|
10
10
|
appearance: 'default' | 'UNSAFE_modal-below-sm';
|
|
11
11
|
shouldRenderToParent?: boolean;
|
|
12
12
|
}): {
|
|
13
|
-
appearance:
|
|
13
|
+
appearance: 'default' | 'UNSAFE_modal-below-sm';
|
|
14
14
|
shouldRenderToParent: boolean | undefined;
|
|
15
15
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/popup",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.14.0",
|
|
4
4
|
"description": "A popup displays brief content in an overlay.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/css": "^0.19.0",
|
|
36
|
-
"@atlaskit/ds-lib": "^
|
|
36
|
+
"@atlaskit/ds-lib": "^6.0.0",
|
|
37
37
|
"@atlaskit/layering": "^3.6.0",
|
|
38
38
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
39
39
|
"@atlaskit/popper": "^7.1.0",
|
|
40
40
|
"@atlaskit/portal": "^5.2.0",
|
|
41
41
|
"@atlaskit/primitives": "^18.0.0",
|
|
42
|
-
"@atlaskit/tokens": "^11.
|
|
42
|
+
"@atlaskit/tokens": "^11.1.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
|
-
"@compiled/react": "^0.
|
|
44
|
+
"@compiled/react": "^0.20.0",
|
|
45
45
|
"bind-event-listener": "^3.0.0",
|
|
46
46
|
"focus-trap": "^2.4.5",
|
|
47
47
|
"memoize-one": "^6.0.0",
|
|
@@ -55,19 +55,20 @@
|
|
|
55
55
|
"@af/accessibility-testing": "workspace:^",
|
|
56
56
|
"@af/integration-testing": "workspace:^",
|
|
57
57
|
"@af/visual-regression": "workspace:^",
|
|
58
|
-
"@atlaskit/button": "^23.
|
|
58
|
+
"@atlaskit/button": "^23.10.0",
|
|
59
59
|
"@atlaskit/code": "^17.4.0",
|
|
60
|
-
"@atlaskit/docs": "^11.
|
|
61
|
-
"@atlaskit/form": "^15.
|
|
60
|
+
"@atlaskit/docs": "^11.7.0",
|
|
61
|
+
"@atlaskit/form": "^15.4.0",
|
|
62
62
|
"@atlaskit/heading": "^5.3.0",
|
|
63
|
-
"@atlaskit/icon": "^
|
|
63
|
+
"@atlaskit/icon": "^33.0.0",
|
|
64
64
|
"@atlaskit/link": "^3.3.0",
|
|
65
|
-
"@atlaskit/modal-dialog": "^14.
|
|
65
|
+
"@atlaskit/modal-dialog": "^14.11.0",
|
|
66
66
|
"@atlaskit/section-message": "^8.12.0",
|
|
67
67
|
"@atlaskit/textfield": "^8.2.0",
|
|
68
68
|
"@atlaskit/toggle": "^15.2.0",
|
|
69
69
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
70
70
|
"@atlassian/ssr-tests": "workspace:^",
|
|
71
|
+
"@atlassian/structured-docs-types": "workspace:^",
|
|
71
72
|
"@testing-library/react": "^16.3.0",
|
|
72
73
|
"@testing-library/user-event": "^14.4.3",
|
|
73
74
|
"ast-types": "^0.13.3",
|
|
@@ -119,9 +120,6 @@
|
|
|
119
120
|
"platform_dst_nav4_flyout_menu_slots_close_button": {
|
|
120
121
|
"type": "boolean"
|
|
121
122
|
},
|
|
122
|
-
"platform_dst_nav4_flyoutmenuitem_render_to_parent": {
|
|
123
|
-
"type": "boolean"
|
|
124
|
-
},
|
|
125
123
|
"platform_dst_nested_escape": {
|
|
126
124
|
"type": "boolean"
|
|
127
125
|
}
|
package/popup.docs.tsx
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
|
|
3
|
+
import type { ComponentStructuredContentSource } from '@atlassian/structured-docs-types';
|
|
4
|
+
|
|
5
|
+
const documentation: ComponentStructuredContentSource[] = [
|
|
6
|
+
{
|
|
7
|
+
name: 'Popup',
|
|
8
|
+
description: 'A component for displaying popup content relative to a trigger element.',
|
|
9
|
+
status: 'general-availability',
|
|
10
|
+
import: {
|
|
11
|
+
name: 'Popup',
|
|
12
|
+
package: '@atlaskit/popup',
|
|
13
|
+
type: 'default',
|
|
14
|
+
packagePath: path.resolve(__dirname),
|
|
15
|
+
packageJson: require('./package.json'),
|
|
16
|
+
},
|
|
17
|
+
usageGuidelines: [
|
|
18
|
+
'Use for contextual content that appears on demand',
|
|
19
|
+
'Position appropriately relative to trigger',
|
|
20
|
+
'Consider dismissal behavior',
|
|
21
|
+
'Use appropriate content sizing',
|
|
22
|
+
],
|
|
23
|
+
contentGuidelines: [
|
|
24
|
+
'Keep popup content focused and relevant',
|
|
25
|
+
'Use clear, concise content',
|
|
26
|
+
'Provide appropriate actions when needed',
|
|
27
|
+
'Consider content hierarchy',
|
|
28
|
+
],
|
|
29
|
+
accessibilityGuidelines: [
|
|
30
|
+
'Provide appropriate focus management',
|
|
31
|
+
'Use clear trigger labels',
|
|
32
|
+
'Ensure keyboard navigation support',
|
|
33
|
+
'Provide escape key dismissal',
|
|
34
|
+
],
|
|
35
|
+
examples: [
|
|
36
|
+
{
|
|
37
|
+
name: 'Popup',
|
|
38
|
+
description: 'Popup example',
|
|
39
|
+
source: path.resolve(__dirname, './examples/ai/popup.tsx'),
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
keywords: ['popup', 'overlay', 'floating', 'content', 'trigger'],
|
|
43
|
+
categories: ['overlay'],
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
export default documentation;
|