@atlaskit/popup 4.2.0 → 4.3.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
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/popup
|
|
2
2
|
|
|
3
|
+
## 4.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#160438](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/160438)
|
|
8
|
+
[`b68b92230b3a3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b68b92230b3a3) -
|
|
9
|
+
Pass isReferenceHidden prop from the Popper component to the Popup to allow Popup to determine if
|
|
10
|
+
it's trigger is hidden.
|
|
11
|
+
|
|
3
12
|
## 4.2.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -21,7 +21,7 @@ var _popper = require("@atlaskit/popper");
|
|
|
21
21
|
var _repositionOnUpdate = require("./reposition-on-update");
|
|
22
22
|
var _useCloseManager = require("./use-close-manager");
|
|
23
23
|
var _useFocusManager = require("./use-focus-manager");
|
|
24
|
-
var _excluded = ["shouldRenderToParent", "shouldFitContainer", "children", "appearance", "className"];
|
|
24
|
+
var _excluded = ["shouldRenderToParent", "shouldFitContainer", "children", "appearance", "className", "isReferenceHidden"];
|
|
25
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
26
26
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
27
27
|
var LOCAL_CURRENT_SURFACE_CSS_VAR = '--ds-elevation-surface-current';
|
|
@@ -41,6 +41,7 @@ var DefaultPopupComponent = /*#__PURE__*/(0, _react.forwardRef)(function (props,
|
|
|
41
41
|
children = props.children,
|
|
42
42
|
appearance = props.appearance,
|
|
43
43
|
className = props.className,
|
|
44
|
+
isReferenceHidden = props.isReferenceHidden,
|
|
44
45
|
htmlAttributes = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
45
46
|
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
|
46
47
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -136,7 +137,8 @@ function PopperWrapper(_ref) {
|
|
|
136
137
|
var _ref3 = _ref2.ref,
|
|
137
138
|
style = _ref2.style,
|
|
138
139
|
placement = _ref2.placement,
|
|
139
|
-
update = _ref2.update
|
|
140
|
+
update = _ref2.update,
|
|
141
|
+
isReferenceHidden = _ref2.isReferenceHidden;
|
|
140
142
|
var popupContainer = /*#__PURE__*/React.createElement(PopupContainer
|
|
141
143
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
142
144
|
, {
|
|
@@ -171,7 +173,8 @@ function PopperWrapper(_ref) {
|
|
|
171
173
|
,
|
|
172
174
|
tabIndex: autoFocus ? 0 : undefined,
|
|
173
175
|
shouldRenderToParent: shouldRenderToParent,
|
|
174
|
-
shouldFitContainer: shouldFitContainer
|
|
176
|
+
shouldFitContainer: shouldFitContainer,
|
|
177
|
+
isReferenceHidden: isReferenceHidden
|
|
175
178
|
}, /*#__PURE__*/React.createElement(_repositionOnUpdate.RepositionOnUpdate, {
|
|
176
179
|
update: update
|
|
177
180
|
}, content({
|
|
@@ -28,6 +28,7 @@ const DefaultPopupComponent = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
28
28
|
children,
|
|
29
29
|
appearance,
|
|
30
30
|
className,
|
|
31
|
+
isReferenceHidden,
|
|
31
32
|
...htmlAttributes
|
|
32
33
|
} = props;
|
|
33
34
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
@@ -114,7 +115,8 @@ function PopperWrapper({
|
|
|
114
115
|
ref,
|
|
115
116
|
style,
|
|
116
117
|
placement,
|
|
117
|
-
update
|
|
118
|
+
update,
|
|
119
|
+
isReferenceHidden
|
|
118
120
|
}) => {
|
|
119
121
|
const popupContainer = /*#__PURE__*/React.createElement(PopupContainer
|
|
120
122
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -150,7 +152,8 @@ function PopperWrapper({
|
|
|
150
152
|
,
|
|
151
153
|
tabIndex: autoFocus ? 0 : undefined,
|
|
152
154
|
shouldRenderToParent: shouldRenderToParent,
|
|
153
|
-
shouldFitContainer: shouldFitContainer
|
|
155
|
+
shouldFitContainer: shouldFitContainer,
|
|
156
|
+
isReferenceHidden: isReferenceHidden
|
|
154
157
|
}, /*#__PURE__*/React.createElement(RepositionOnUpdate, {
|
|
155
158
|
update: update
|
|
156
159
|
}, content({
|
|
@@ -3,7 +3,7 @@ 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";
|
|
5
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
6
|
-
var _excluded = ["shouldRenderToParent", "shouldFitContainer", "children", "appearance", "className"];
|
|
6
|
+
var _excluded = ["shouldRenderToParent", "shouldFitContainer", "children", "appearance", "className", "isReferenceHidden"];
|
|
7
7
|
import "./popper-wrapper.compiled.css";
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { forwardRef, Fragment, useMemo, useState } from 'react';
|
|
@@ -31,6 +31,7 @@ var DefaultPopupComponent = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
31
31
|
children = props.children,
|
|
32
32
|
appearance = props.appearance,
|
|
33
33
|
className = props.className,
|
|
34
|
+
isReferenceHidden = props.isReferenceHidden,
|
|
34
35
|
htmlAttributes = _objectWithoutProperties(props, _excluded);
|
|
35
36
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
36
37
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -126,7 +127,8 @@ function PopperWrapper(_ref) {
|
|
|
126
127
|
var _ref3 = _ref2.ref,
|
|
127
128
|
style = _ref2.style,
|
|
128
129
|
placement = _ref2.placement,
|
|
129
|
-
update = _ref2.update
|
|
130
|
+
update = _ref2.update,
|
|
131
|
+
isReferenceHidden = _ref2.isReferenceHidden;
|
|
130
132
|
var popupContainer = /*#__PURE__*/React.createElement(PopupContainer
|
|
131
133
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
132
134
|
, {
|
|
@@ -161,7 +163,8 @@ function PopperWrapper(_ref) {
|
|
|
161
163
|
,
|
|
162
164
|
tabIndex: autoFocus ? 0 : undefined,
|
|
163
165
|
shouldRenderToParent: shouldRenderToParent,
|
|
164
|
-
shouldFitContainer: shouldFitContainer
|
|
166
|
+
shouldFitContainer: shouldFitContainer,
|
|
167
|
+
isReferenceHidden: isReferenceHidden
|
|
165
168
|
}, /*#__PURE__*/React.createElement(RepositionOnUpdate, {
|
|
166
169
|
update: update
|
|
167
170
|
}, content({
|
package/dist/types/types.d.ts
CHANGED
|
@@ -85,6 +85,10 @@ export interface PopupComponentProps {
|
|
|
85
85
|
* Class name to apply to the popup container element.
|
|
86
86
|
*/
|
|
87
87
|
className?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Boolean to indicate if the reference element is hidden.
|
|
90
|
+
*/
|
|
91
|
+
isReferenceHidden?: boolean;
|
|
88
92
|
}
|
|
89
93
|
interface BaseProps {
|
|
90
94
|
/**
|
|
@@ -85,6 +85,10 @@ export interface PopupComponentProps {
|
|
|
85
85
|
* Class name to apply to the popup container element.
|
|
86
86
|
*/
|
|
87
87
|
className?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Boolean to indicate if the reference element is hidden.
|
|
90
|
+
*/
|
|
91
|
+
isReferenceHidden?: boolean;
|
|
88
92
|
}
|
|
89
93
|
interface BaseProps {
|
|
90
94
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/popup",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "A popup displays brief content in an overlay.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/popper": "^7.0.0",
|
|
46
46
|
"@atlaskit/portal": "^5.1.0",
|
|
47
|
-
"@atlaskit/primitives": "^14.
|
|
48
|
-
"@atlaskit/tokens": "^4.
|
|
47
|
+
"@atlaskit/primitives": "^14.8.0",
|
|
48
|
+
"@atlaskit/tokens": "^4.9.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
50
50
|
"@compiled/react": "^0.18.3",
|
|
51
51
|
"bind-event-listener": "^3.0.0",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"@af/accessibility-testing": "workspace:^",
|
|
62
62
|
"@af/integration-testing": "workspace:^",
|
|
63
63
|
"@af/visual-regression": "workspace:^",
|
|
64
|
-
"@atlaskit/button": "^23.
|
|
65
|
-
"@atlaskit/code": "^17.
|
|
64
|
+
"@atlaskit/button": "^23.2.0",
|
|
65
|
+
"@atlaskit/code": "^17.2.0",
|
|
66
66
|
"@atlaskit/docs": "^10.0.0",
|
|
67
67
|
"@atlaskit/form": "^12.0.0",
|
|
68
68
|
"@atlaskit/heading": "^5.2.0",
|
|
69
|
-
"@atlaskit/icon": "^26.
|
|
70
|
-
"@atlaskit/link": "^3.
|
|
69
|
+
"@atlaskit/icon": "^26.1.0",
|
|
70
|
+
"@atlaskit/link": "^3.2.0",
|
|
71
71
|
"@atlaskit/modal-dialog": "^14.2.0",
|
|
72
72
|
"@atlaskit/section-message": "^8.2.0",
|
|
73
73
|
"@atlaskit/ssr": "workspace:^",
|