@atlaskit/popup 4.20.1 → 4.21.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 +27 -0
- package/dist/cjs/compositional/popup-content.js +12 -5
- package/dist/cjs/compositional/popup-trigger.js +1 -1
- package/dist/cjs/popper-wrapper.compiled.css +0 -1
- package/dist/cjs/popper-wrapper.js +1 -2
- package/dist/cjs/popup.js +12 -5
- package/dist/es2019/compositional/popup-content.js +12 -5
- package/dist/es2019/compositional/popup-trigger.js +1 -1
- package/dist/es2019/popper-wrapper.compiled.css +0 -1
- package/dist/es2019/popper-wrapper.js +1 -2
- package/dist/es2019/popup.js +12 -5
- package/dist/esm/compositional/popup-content.js +12 -5
- package/dist/esm/compositional/popup-trigger.js +1 -1
- package/dist/esm/popper-wrapper.compiled.css +0 -1
- package/dist/esm/popper-wrapper.js +1 -2
- package/dist/esm/popup.js +12 -5
- package/dist/types/types.d.ts +1 -2
- package/dist/types-ts4.5/types.d.ts +1 -2
- package/package.json +5 -7
- package/popup.docs.tsx +41 -39
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @atlaskit/popup
|
|
2
2
|
|
|
3
|
+
## 4.21.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`8e9ab10567283`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8e9ab10567283) -
|
|
8
|
+
When `platform-dst-top-layer` is enabled, the open layer observer registration now happens inside
|
|
9
|
+
the `Dialog` and `Popover` primitives directly, so `popup`, `modal-dialog`, and `tooltip` no
|
|
10
|
+
longer register with the open layer observer separately (avoiding double-counting).
|
|
11
|
+
- `Dialog` registers as `type: 'modal'`, with a no-op `onClose`, as there is no current use case
|
|
12
|
+
for programmatic close of modals via the open layer observer.
|
|
13
|
+
- `Popover` registers as `type: 'popup'` for interactive overlay roles (`dialog`, `alertdialog`,
|
|
14
|
+
`menu`, `listbox`, `tree`, `grid`) and omits `type` for other roles (e.g. `tooltip`).
|
|
15
|
+
- A new `programmatic` value has been added to `TPopoverCloseReason` to distinguish programmatic
|
|
16
|
+
closes, such as those from the open layer observer's `closeLayers()` calls.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
22
|
+
## 4.20.2
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- [`cc4a66306965d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cc4a66306965d) -
|
|
27
|
+
Cleanup feature gate `platform_dst_nav4_flyout_menu_slots_close_button`. Flyout menu slot
|
|
28
|
+
subcomponents (header, body, footer) and close button are now permanently enabled.
|
|
29
|
+
|
|
3
30
|
## 4.20.1
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -80,11 +80,18 @@ var PopupContent = exports.PopupContent = function PopupContent(_ref) {
|
|
|
80
80
|
var handleOpenLayerObserverCloseSignal = (0, _react.useCallback)(function () {
|
|
81
81
|
onClose === null || onClose === void 0 || onClose(null);
|
|
82
82
|
}, [onClose]);
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
|
|
84
|
+
// On the top-layer path, the Popover primitive registers with the observer
|
|
85
|
+
// directly, so we skip registration here to avoid double-counting.
|
|
86
|
+
// Safe conditional hook: feature flags are resolved once at startup.
|
|
87
|
+
if (!(0, _platformFeatureFlags.fg)('platform-dst-top-layer')) {
|
|
88
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
89
|
+
(0, _openLayerObserver.useNotifyOpenLayerObserver)({
|
|
90
|
+
isOpen: isOpen,
|
|
91
|
+
onClose: handleOpenLayerObserverCloseSignal,
|
|
92
|
+
type: 'popup'
|
|
93
|
+
});
|
|
94
|
+
}
|
|
88
95
|
|
|
89
96
|
// Top-layer rendering path: native Popover API via @atlaskit/top-layer.
|
|
90
97
|
// Mirrors the FF branch in the legacy `Popup` component (popup.tsx).
|
|
@@ -40,7 +40,7 @@ var PopupTrigger = exports.PopupTrigger = function PopupTrigger(_ref) {
|
|
|
40
40
|
var triggerRef = (0, _react.useCallback)(function (node) {
|
|
41
41
|
triggerRefObject.current = node;
|
|
42
42
|
}, [triggerRefObject]);
|
|
43
|
-
var ariaHasPopup = role === 'dialog'
|
|
43
|
+
var ariaHasPopup = role === 'dialog' ? 'dialog' : true;
|
|
44
44
|
|
|
45
45
|
// When the top-layer flag is on, bypass Popper's <Reference> entirely.
|
|
46
46
|
// We only need to set triggerRefObject.current — no Popper ref merging needed.
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
._bfhk1i5c{background-color:var(--ds-blanket,#050c1f75)}
|
|
16
16
|
._c71l1ei0{max-height:calc(100vh - var(--ds-space-050, 4px)*2)}
|
|
17
17
|
._c71l1kw7{max-height:inherit}
|
|
18
|
-
._c71ldtre{max-height:50vh}
|
|
19
18
|
._kqsw1n9t{position:fixed}
|
|
20
19
|
._syazi7uo{color:var(--ds-text,#292a2e)}
|
|
21
20
|
._vchhusvi{box-sizing:border-box}
|
|
@@ -38,7 +38,6 @@ var wrapperStyles = {
|
|
|
38
38
|
var scrollableStyles = null;
|
|
39
39
|
var blanketStyles = null;
|
|
40
40
|
var modalStyles = null;
|
|
41
|
-
var newModalStyles = null;
|
|
42
41
|
var focusRingStyles = {
|
|
43
42
|
root: "_mizu1v1w _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y"
|
|
44
43
|
};
|
|
@@ -103,7 +102,7 @@ var DefaultPopupComponent = /*#__PURE__*/(0, _react.forwardRef)(function (props,
|
|
|
103
102
|
htmlAttributes = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
104
103
|
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
|
105
104
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
106
|
-
className: (0, _runtime.ax)([wrapperStyles.root, (0, _platformFeatureFlags.fg)('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' &&
|
|
105
|
+
className: (0, _runtime.ax)([wrapperStyles.root, (0, _platformFeatureFlags.fg)('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' && "_dk5d1b66 _c71l1ei0 _kqsw1n9t _152t1b66", (!shouldRenderToParent || shouldFitViewport) && "_1reo1wug _18m91wug", shouldFitContainer && "_1bsb1osq", className])
|
|
107
106
|
}, htmlAttributes, {
|
|
108
107
|
ref: !(0, _platformFeatureFlags.fg)('platform-dst-motion-uplift-popup') ? ref : undefined
|
|
109
108
|
}), children);
|
package/dist/cjs/popup.js
CHANGED
|
@@ -88,11 +88,18 @@ var Popup = exports.Popup = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
88
88
|
var handleOpenLayerObserverCloseSignal = (0, _react.useCallback)(function () {
|
|
89
89
|
onClose === null || onClose === void 0 || onClose(null);
|
|
90
90
|
}, [onClose]);
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
|
|
92
|
+
// On the top-layer path, the Popover primitive registers with the observer
|
|
93
|
+
// directly, so we skip registration here to avoid double-counting.
|
|
94
|
+
// Safe conditional hook: feature flags are resolved once at startup.
|
|
95
|
+
if (!(0, _platformFeatureFlags.fg)('platform-dst-top-layer')) {
|
|
96
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
97
|
+
(0, _openLayerObserver.useNotifyOpenLayerObserver)({
|
|
98
|
+
isOpen: isOpen,
|
|
99
|
+
onClose: handleOpenLayerObserverCloseSignal,
|
|
100
|
+
type: 'popup'
|
|
101
|
+
});
|
|
102
|
+
}
|
|
96
103
|
|
|
97
104
|
// Top-layer rendering path: native Popover API via @atlaskit/top-layer
|
|
98
105
|
if ((0, _platformFeatureFlags.fg)('platform-dst-top-layer')) {
|
|
@@ -64,11 +64,18 @@ export const PopupContent = ({
|
|
|
64
64
|
const handleOpenLayerObserverCloseSignal = useCallback(() => {
|
|
65
65
|
onClose === null || onClose === void 0 ? void 0 : onClose(null);
|
|
66
66
|
}, [onClose]);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
|
|
68
|
+
// On the top-layer path, the Popover primitive registers with the observer
|
|
69
|
+
// directly, so we skip registration here to avoid double-counting.
|
|
70
|
+
// Safe conditional hook: feature flags are resolved once at startup.
|
|
71
|
+
if (!fg('platform-dst-top-layer')) {
|
|
72
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
73
|
+
useNotifyOpenLayerObserver({
|
|
74
|
+
isOpen,
|
|
75
|
+
onClose: handleOpenLayerObserverCloseSignal,
|
|
76
|
+
type: 'popup'
|
|
77
|
+
});
|
|
78
|
+
}
|
|
72
79
|
|
|
73
80
|
// Top-layer rendering path: native Popover API via @atlaskit/top-layer.
|
|
74
81
|
// Mirrors the FF branch in the legacy `Popup` component (popup.tsx).
|
|
@@ -33,7 +33,7 @@ export const PopupTrigger = ({
|
|
|
33
33
|
const triggerRef = useCallback(node => {
|
|
34
34
|
triggerRefObject.current = node;
|
|
35
35
|
}, [triggerRefObject]);
|
|
36
|
-
const ariaHasPopup = role === 'dialog'
|
|
36
|
+
const ariaHasPopup = role === 'dialog' ? 'dialog' : true;
|
|
37
37
|
|
|
38
38
|
// When the top-layer flag is on, bypass Popper's <Reference> entirely.
|
|
39
39
|
// We only need to set triggerRefObject.current — no Popper ref merging needed.
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
._bfhk1i5c{background-color:var(--ds-blanket,#050c1f75)}
|
|
16
16
|
._c71l1ei0{max-height:calc(100vh - var(--ds-space-050, 4px)*2)}
|
|
17
17
|
._c71l1kw7{max-height:inherit}
|
|
18
|
-
._c71ldtre{max-height:50vh}
|
|
19
18
|
._kqsw1n9t{position:fixed}
|
|
20
19
|
._syazi7uo{color:var(--ds-text,#292a2e)}
|
|
21
20
|
._vchhusvi{box-sizing:border-box}
|
|
@@ -22,7 +22,6 @@ const wrapperStyles = {
|
|
|
22
22
|
const scrollableStyles = null;
|
|
23
23
|
const blanketStyles = null;
|
|
24
24
|
const modalStyles = null;
|
|
25
|
-
const newModalStyles = null;
|
|
26
25
|
const focusRingStyles = {
|
|
27
26
|
root: "_mizu1v1w _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y"
|
|
28
27
|
};
|
|
@@ -89,7 +88,7 @@ const DefaultPopupComponent = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
89
88
|
} = props;
|
|
90
89
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
91
90
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
92
|
-
className: ax([wrapperStyles.root, fg('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' &&
|
|
91
|
+
className: ax([wrapperStyles.root, fg('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' && "_dk5d1b66 _c71l1ei0 _kqsw1n9t _152t1b66", (!shouldRenderToParent || shouldFitViewport) && "_1reo1wug _18m91wug", shouldFitContainer && "_1bsb1osq", className])
|
|
93
92
|
}, htmlAttributes, {
|
|
94
93
|
ref: !fg('platform-dst-motion-uplift-popup') ? ref : undefined
|
|
95
94
|
}), children);
|
package/dist/es2019/popup.js
CHANGED
|
@@ -67,11 +67,18 @@ export const Popup = /*#__PURE__*/memo(props => {
|
|
|
67
67
|
const handleOpenLayerObserverCloseSignal = useCallback(() => {
|
|
68
68
|
onClose === null || onClose === void 0 ? void 0 : onClose(null);
|
|
69
69
|
}, [onClose]);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
|
|
71
|
+
// On the top-layer path, the Popover primitive registers with the observer
|
|
72
|
+
// directly, so we skip registration here to avoid double-counting.
|
|
73
|
+
// Safe conditional hook: feature flags are resolved once at startup.
|
|
74
|
+
if (!fg('platform-dst-top-layer')) {
|
|
75
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
76
|
+
useNotifyOpenLayerObserver({
|
|
77
|
+
isOpen,
|
|
78
|
+
onClose: handleOpenLayerObserverCloseSignal,
|
|
79
|
+
type: 'popup'
|
|
80
|
+
});
|
|
81
|
+
}
|
|
75
82
|
|
|
76
83
|
// Top-layer rendering path: native Popover API via @atlaskit/top-layer
|
|
77
84
|
if (fg('platform-dst-top-layer')) {
|
|
@@ -71,11 +71,18 @@ export var PopupContent = function PopupContent(_ref) {
|
|
|
71
71
|
var handleOpenLayerObserverCloseSignal = useCallback(function () {
|
|
72
72
|
onClose === null || onClose === void 0 || onClose(null);
|
|
73
73
|
}, [onClose]);
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
|
|
75
|
+
// On the top-layer path, the Popover primitive registers with the observer
|
|
76
|
+
// directly, so we skip registration here to avoid double-counting.
|
|
77
|
+
// Safe conditional hook: feature flags are resolved once at startup.
|
|
78
|
+
if (!fg('platform-dst-top-layer')) {
|
|
79
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
80
|
+
useNotifyOpenLayerObserver({
|
|
81
|
+
isOpen: isOpen,
|
|
82
|
+
onClose: handleOpenLayerObserverCloseSignal,
|
|
83
|
+
type: 'popup'
|
|
84
|
+
});
|
|
85
|
+
}
|
|
79
86
|
|
|
80
87
|
// Top-layer rendering path: native Popover API via @atlaskit/top-layer.
|
|
81
88
|
// Mirrors the FF branch in the legacy `Popup` component (popup.tsx).
|
|
@@ -32,7 +32,7 @@ export var PopupTrigger = function PopupTrigger(_ref) {
|
|
|
32
32
|
var triggerRef = useCallback(function (node) {
|
|
33
33
|
triggerRefObject.current = node;
|
|
34
34
|
}, [triggerRefObject]);
|
|
35
|
-
var ariaHasPopup = role === 'dialog'
|
|
35
|
+
var ariaHasPopup = role === 'dialog' ? 'dialog' : true;
|
|
36
36
|
|
|
37
37
|
// When the top-layer flag is on, bypass Popper's <Reference> entirely.
|
|
38
38
|
// We only need to set triggerRefObject.current — no Popper ref merging needed.
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
._bfhk1i5c{background-color:var(--ds-blanket,#050c1f75)}
|
|
16
16
|
._c71l1ei0{max-height:calc(100vh - var(--ds-space-050, 4px)*2)}
|
|
17
17
|
._c71l1kw7{max-height:inherit}
|
|
18
|
-
._c71ldtre{max-height:50vh}
|
|
19
18
|
._kqsw1n9t{position:fixed}
|
|
20
19
|
._syazi7uo{color:var(--ds-text,#292a2e)}
|
|
21
20
|
._vchhusvi{box-sizing:border-box}
|
|
@@ -29,7 +29,6 @@ var wrapperStyles = {
|
|
|
29
29
|
var scrollableStyles = null;
|
|
30
30
|
var blanketStyles = null;
|
|
31
31
|
var modalStyles = null;
|
|
32
|
-
var newModalStyles = null;
|
|
33
32
|
var focusRingStyles = {
|
|
34
33
|
root: "_mizu1v1w _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y"
|
|
35
34
|
};
|
|
@@ -94,7 +93,7 @@ var DefaultPopupComponent = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
94
93
|
htmlAttributes = _objectWithoutProperties(props, _excluded);
|
|
95
94
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
96
95
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
97
|
-
className: ax([wrapperStyles.root, fg('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' &&
|
|
96
|
+
className: ax([wrapperStyles.root, fg('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' && "_dk5d1b66 _c71l1ei0 _kqsw1n9t _152t1b66", (!shouldRenderToParent || shouldFitViewport) && "_1reo1wug _18m91wug", shouldFitContainer && "_1bsb1osq", className])
|
|
98
97
|
}, htmlAttributes, {
|
|
99
98
|
ref: !fg('platform-dst-motion-uplift-popup') ? ref : undefined
|
|
100
99
|
}), children);
|
package/dist/esm/popup.js
CHANGED
|
@@ -80,11 +80,18 @@ export var Popup = /*#__PURE__*/memo(function (props) {
|
|
|
80
80
|
var handleOpenLayerObserverCloseSignal = useCallback(function () {
|
|
81
81
|
onClose === null || onClose === void 0 || onClose(null);
|
|
82
82
|
}, [onClose]);
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
|
|
84
|
+
// On the top-layer path, the Popover primitive registers with the observer
|
|
85
|
+
// directly, so we skip registration here to avoid double-counting.
|
|
86
|
+
// Safe conditional hook: feature flags are resolved once at startup.
|
|
87
|
+
if (!fg('platform-dst-top-layer')) {
|
|
88
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
89
|
+
useNotifyOpenLayerObserver({
|
|
90
|
+
isOpen: isOpen,
|
|
91
|
+
onClose: handleOpenLayerObserverCloseSignal,
|
|
92
|
+
type: 'popup'
|
|
93
|
+
});
|
|
94
|
+
}
|
|
88
95
|
|
|
89
96
|
// Top-layer rendering path: native Popover API via @atlaskit/top-layer
|
|
90
97
|
if (fg('platform-dst-top-layer')) {
|
package/dist/types/types.d.ts
CHANGED
|
@@ -94,8 +94,7 @@ export interface PopupComponentProps {
|
|
|
94
94
|
/**
|
|
95
95
|
* The "default" appearance is used for standard popups.
|
|
96
96
|
* The "UNSAFE_modal-below-sm" appearance makes the popup appear as a modal when the viewport is smaller than "sm".
|
|
97
|
-
*
|
|
98
|
-
* be set to "UNSAFE_modal-below-sm" if the provided popup includes a close button.
|
|
97
|
+
* The appearance should only be set to "UNSAFE_modal-below-sm" if the provided popup includes a close button.
|
|
99
98
|
*/
|
|
100
99
|
appearance?: 'default' | 'UNSAFE_modal-below-sm';
|
|
101
100
|
/**
|
|
@@ -94,8 +94,7 @@ export interface PopupComponentProps {
|
|
|
94
94
|
/**
|
|
95
95
|
* The "default" appearance is used for standard popups.
|
|
96
96
|
* The "UNSAFE_modal-below-sm" appearance makes the popup appear as a modal when the viewport is smaller than "sm".
|
|
97
|
-
*
|
|
98
|
-
* be set to "UNSAFE_modal-below-sm" if the provided popup includes a close button.
|
|
97
|
+
* The appearance should only be set to "UNSAFE_modal-below-sm" if the provided popup includes a close button.
|
|
99
98
|
*/
|
|
100
99
|
appearance?: 'default' | 'UNSAFE_modal-below-sm';
|
|
101
100
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/popup",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.21.0",
|
|
4
4
|
"description": "A popup displays brief content in an overlay.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/portal": "^5.5.0",
|
|
49
49
|
"@atlaskit/primitives": "^19.0.0",
|
|
50
50
|
"@atlaskit/tokens": "^13.0.0",
|
|
51
|
-
"@atlaskit/top-layer": "^0.
|
|
51
|
+
"@atlaskit/top-layer": "^0.9.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@compiled/react": "^0.20.0",
|
|
54
54
|
"bind-event-listener": "^3.0.0",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"@atlaskit/heading": "^5.4.0",
|
|
72
72
|
"@atlaskit/icon": "^35.0.0",
|
|
73
73
|
"@atlaskit/link": "^3.4.0",
|
|
74
|
-
"@atlaskit/modal-dialog": "^15.
|
|
75
|
-
"@atlaskit/section-message": "^8.
|
|
74
|
+
"@atlaskit/modal-dialog": "^15.2.0",
|
|
75
|
+
"@atlaskit/section-message": "^8.13.0",
|
|
76
76
|
"@atlaskit/textfield": "^8.3.0",
|
|
77
77
|
"@atlaskit/toggle": "^15.6.0",
|
|
78
78
|
"@atlassian/feature-flags-test-utils": "^1.1.0",
|
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
"ast-types": "^0.13.3",
|
|
86
86
|
"jscodeshift": "^17.0.0",
|
|
87
87
|
"raf-stub": "^2.0.1",
|
|
88
|
+
"react": "^18.2.0",
|
|
88
89
|
"react-dom": "^18.2.0"
|
|
89
90
|
},
|
|
90
91
|
"keywords": [
|
|
@@ -131,9 +132,6 @@
|
|
|
131
132
|
"platform-dst-shape-theme-default": {
|
|
132
133
|
"type": "boolean"
|
|
133
134
|
},
|
|
134
|
-
"platform_dst_nav4_flyout_menu_slots_close_button": {
|
|
135
|
-
"type": "boolean"
|
|
136
|
-
},
|
|
137
135
|
"platform_dst_nested_escape": {
|
|
138
136
|
"type": "boolean"
|
|
139
137
|
},
|
package/popup.docs.tsx
CHANGED
|
@@ -1,47 +1,49 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
|
|
4
4
|
|
|
5
|
-
const documentation:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
description: 'A component for displaying popup content relative to a trigger element.',
|
|
9
|
-
status: 'general-availability',
|
|
10
|
-
import: {
|
|
5
|
+
const documentation: StructuredContentSource = {
|
|
6
|
+
components: [
|
|
7
|
+
{
|
|
11
8
|
name: 'Popup',
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
{
|
|
9
|
+
description: 'A component for displaying popup content relative to a trigger element.',
|
|
10
|
+
status: 'general-availability',
|
|
11
|
+
import: {
|
|
37
12
|
name: 'Popup',
|
|
38
|
-
|
|
39
|
-
|
|
13
|
+
package: '@atlaskit/popup',
|
|
14
|
+
type: 'default',
|
|
15
|
+
packagePath: path.resolve(__dirname),
|
|
16
|
+
packageJson: require('./package.json'),
|
|
40
17
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
18
|
+
usageGuidelines: [
|
|
19
|
+
'Use for contextual content that appears on demand',
|
|
20
|
+
'Position appropriately relative to trigger',
|
|
21
|
+
'Consider dismissal behavior',
|
|
22
|
+
'Use appropriate content sizing',
|
|
23
|
+
],
|
|
24
|
+
contentGuidelines: [
|
|
25
|
+
'Keep popup content focused and relevant',
|
|
26
|
+
'Use clear, concise content',
|
|
27
|
+
'Provide appropriate actions when needed',
|
|
28
|
+
'Consider content hierarchy',
|
|
29
|
+
],
|
|
30
|
+
accessibilityGuidelines: [
|
|
31
|
+
'Provide appropriate focus management',
|
|
32
|
+
'Use clear trigger labels',
|
|
33
|
+
'Ensure keyboard navigation support',
|
|
34
|
+
'Provide escape key dismissal',
|
|
35
|
+
],
|
|
36
|
+
examples: [
|
|
37
|
+
{
|
|
38
|
+
name: 'Popup',
|
|
39
|
+
description: 'Popup example',
|
|
40
|
+
source: path.resolve(__dirname, './examples/ai/popup.tsx'),
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
keywords: ['popup', 'overlay', 'floating', 'content', 'trigger'],
|
|
44
|
+
categories: ['overlay'],
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
};
|
|
46
48
|
|
|
47
49
|
export default documentation;
|