@atlaskit/popup 1.9.0 → 1.9.1

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,11 @@
1
1
  # @atlaskit/popup
2
2
 
3
+ ## 1.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6a0a3c059ba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6a0a3c059ba) - Remove unused argument from internal focus management function.
8
+
3
9
  ## 1.9.0
4
10
 
5
11
  ### Minor Changes
@@ -66,8 +66,7 @@ function PopperWrapper(_ref) {
66
66
  setInitialFocusRef = _useState4[1];
67
67
  (0, _useFocusManager.useFocusManager)({
68
68
  initialFocusRef: initialFocusRef,
69
- popupRef: popupRef,
70
- autoFocus: autoFocus
69
+ popupRef: popupRef
71
70
  });
72
71
  (0, _useCloseManager.useCloseManager)({
73
72
  isOpen: isOpen,
@@ -10,8 +10,7 @@ var _focusTrap = _interopRequireDefault(require("focus-trap"));
10
10
  var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
11
11
  var useFocusManager = function useFocusManager(_ref) {
12
12
  var popupRef = _ref.popupRef,
13
- initialFocusRef = _ref.initialFocusRef,
14
- autoFocus = _ref.autoFocus;
13
+ initialFocusRef = _ref.initialFocusRef;
15
14
  (0, _react.useEffect)(function () {
16
15
  if (!popupRef) {
17
16
  return _noop.default;
@@ -37,6 +36,6 @@ var useFocusManager = function useFocusManager(_ref) {
37
36
  }
38
37
  focusTrap.deactivate();
39
38
  };
40
- }, [popupRef, initialFocusRef, autoFocus]);
39
+ }, [popupRef, initialFocusRef]);
41
40
  };
42
41
  exports.useFocusManager = useFocusManager;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/popup",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "sideEffects": false
5
5
  }
@@ -47,8 +47,7 @@ function PopperWrapper({
47
47
  const [initialFocusRef, setInitialFocusRef] = useState(null);
48
48
  useFocusManager({
49
49
  initialFocusRef,
50
- popupRef,
51
- autoFocus
50
+ popupRef
52
51
  });
53
52
  useCloseManager({
54
53
  isOpen,
@@ -3,8 +3,7 @@ import createFocusTrap from 'focus-trap';
3
3
  import noop from '@atlaskit/ds-lib/noop';
4
4
  export const useFocusManager = ({
5
5
  popupRef,
6
- initialFocusRef,
7
- autoFocus
6
+ initialFocusRef
8
7
  }) => {
9
8
  useEffect(() => {
10
9
  if (!popupRef) {
@@ -31,5 +30,5 @@ export const useFocusManager = ({
31
30
  }
32
31
  focusTrap.deactivate();
33
32
  };
34
- }, [popupRef, initialFocusRef, autoFocus]);
33
+ }, [popupRef, initialFocusRef]);
35
34
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/popup",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "sideEffects": false
5
5
  }
@@ -58,8 +58,7 @@ function PopperWrapper(_ref) {
58
58
  setInitialFocusRef = _useState4[1];
59
59
  useFocusManager({
60
60
  initialFocusRef: initialFocusRef,
61
- popupRef: popupRef,
62
- autoFocus: autoFocus
61
+ popupRef: popupRef
63
62
  });
64
63
  useCloseManager({
65
64
  isOpen: isOpen,
@@ -3,8 +3,7 @@ import createFocusTrap from 'focus-trap';
3
3
  import noop from '@atlaskit/ds-lib/noop';
4
4
  export var useFocusManager = function useFocusManager(_ref) {
5
5
  var popupRef = _ref.popupRef,
6
- initialFocusRef = _ref.initialFocusRef,
7
- autoFocus = _ref.autoFocus;
6
+ initialFocusRef = _ref.initialFocusRef;
8
7
  useEffect(function () {
9
8
  if (!popupRef) {
10
9
  return noop;
@@ -30,5 +29,5 @@ export var useFocusManager = function useFocusManager(_ref) {
30
29
  }
31
30
  focusTrap.deactivate();
32
31
  };
33
- }, [popupRef, initialFocusRef, autoFocus]);
32
+ }, [popupRef, initialFocusRef]);
34
33
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/popup",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "sideEffects": false
5
5
  }
@@ -85,7 +85,8 @@ interface BaseProps {
85
85
  /**
86
86
  * Defines a list of placements to try.
87
87
  * When no space is available on the preferred placement,
88
- * the modifier will test the ones provided in the list, and use the first useful one.
88
+ * the modifier will test the ones provided in the list, and use the first suitable one.
89
+ * If no fallback placements are suitable, it reverts back to the original placement.
89
90
  */
90
91
  fallbackPlacements?: Placement[];
91
92
  /**
@@ -164,7 +165,6 @@ export type CloseManagerHook = Pick<PopupProps, 'isOpen' | 'onClose'> & {
164
165
  export type FocusManagerHook = {
165
166
  popupRef: PopupRef;
166
167
  initialFocusRef: HTMLElement | null;
167
- autoFocus: boolean;
168
168
  };
169
169
  export type RepositionOnUpdateProps = {
170
170
  update: PopperChildrenProps['update'];
@@ -1,2 +1,2 @@
1
1
  import { FocusManagerHook } from './types';
2
- export declare const useFocusManager: ({ popupRef, initialFocusRef, autoFocus, }: FocusManagerHook) => void;
2
+ export declare const useFocusManager: ({ popupRef, initialFocusRef, }: FocusManagerHook) => void;
@@ -88,7 +88,8 @@ interface BaseProps {
88
88
  /**
89
89
  * Defines a list of placements to try.
90
90
  * When no space is available on the preferred placement,
91
- * the modifier will test the ones provided in the list, and use the first useful one.
91
+ * the modifier will test the ones provided in the list, and use the first suitable one.
92
+ * If no fallback placements are suitable, it reverts back to the original placement.
92
93
  */
93
94
  fallbackPlacements?: Placement[];
94
95
  /**
@@ -167,7 +168,6 @@ export type CloseManagerHook = Pick<PopupProps, 'isOpen' | 'onClose'> & {
167
168
  export type FocusManagerHook = {
168
169
  popupRef: PopupRef;
169
170
  initialFocusRef: HTMLElement | null;
170
- autoFocus: boolean;
171
171
  };
172
172
  export type RepositionOnUpdateProps = {
173
173
  update: PopperChildrenProps['update'];
@@ -1,2 +1,2 @@
1
1
  import { FocusManagerHook } from './types';
2
- export declare const useFocusManager: ({ popupRef, initialFocusRef, autoFocus, }: FocusManagerHook) => void;
2
+ export declare const useFocusManager: ({ popupRef, initialFocusRef, }: FocusManagerHook) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/popup",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "A popup displays brief content in an overlay.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"