@atlaskit/inline-dialog 13.1.9 → 13.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,34 @@
1
1
  # @atlaskit/inline-dialog
2
2
 
3
+ ## 13.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`2a53f51adc6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2a53f51adc6) - Introduce the prop `strategy` to allow consumers to override the default positioning strategy
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
13
+ ## 13.2.2
14
+
15
+ ### Patch Changes
16
+
17
+ - [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - Updates usage of deprecated token names so they're aligned with the latest naming conventions. No UI or visual changes
18
+ - Updated dependencies
19
+
20
+ ## 13.2.1
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+
26
+ ## 13.2.0
27
+
28
+ ### Minor Changes
29
+
30
+ - [`2fe0d03807f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2fe0d03807f) - This removes the preventDefault functionality (reverts it back to the previous version of inline dialog where event listeners were added in the capture phase). It also refactors handleClickOutside so that it is now triggered by a ref.
31
+
3
32
  ## 13.1.9
4
33
 
5
34
  ### Patch Changes
@@ -31,7 +31,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
31
31
 
32
32
  /** @jsx jsx */
33
33
  var packageName = "@atlaskit/inline-dialog";
34
- var packageVersion = "13.1.9";
34
+ var packageVersion = "13.3.0";
35
35
 
36
36
  var checkIsChildOfPortal = function checkIsChildOfPortal(node) {
37
37
  if (!node) {
@@ -54,16 +54,19 @@ var InlineDialog = /*#__PURE__*/(0, _react.memo)(function InlineDialog(_ref) {
54
54
  onClose = _ref$onClose === void 0 ? _noop.default : _ref$onClose,
55
55
  _ref$placement = _ref.placement,
56
56
  placement = _ref$placement === void 0 ? 'bottom-start' : _ref$placement,
57
+ _ref$strategy = _ref.strategy,
58
+ strategy = _ref$strategy === void 0 ? 'fixed' : _ref$strategy,
57
59
  testId = _ref.testId,
58
60
  content = _ref.content,
59
61
  children = _ref.children;
60
62
  var containerRef = (0, _react.useRef)(null);
61
- var triggerRef = (0, _react.useRef)(null);
62
- var handleClickOutside = (0, _react.useCallback)(function (event) {
63
- if (event.defaultPrevented) {
64
- return;
65
- }
63
+ var triggerRef = (0, _react.useRef)(null); // we put this into a ref to avoid handleClickOutside having this as a dependency
66
64
 
65
+ var onCloseRef = (0, _react.useRef)(onClose);
66
+ (0, _react.useEffect)(function () {
67
+ onCloseRef.current = onClose;
68
+ });
69
+ var handleClickOutside = (0, _react.useCallback)(function (event) {
67
70
  var target = event.target; // checks for when target is not HTMLElement
68
71
 
69
72
  if (!(target instanceof HTMLElement)) {
@@ -89,45 +92,34 @@ var InlineDialog = /*#__PURE__*/(0, _react.memo)(function InlineDialog(_ref) {
89
92
 
90
93
 
91
94
  if (containerRef.current && !containerRef.current.contains(target)) {
92
- onClose && onClose({
95
+ var _onCloseRef$current;
96
+
97
+ (_onCloseRef$current = onCloseRef.current) === null || _onCloseRef$current === void 0 ? void 0 : _onCloseRef$current.call(onCloseRef, {
93
98
  isOpen: false,
94
99
  event: event
95
100
  });
96
101
  }
97
- }, [onClose]);
102
+ }, []);
98
103
  (0, _react.useEffect)(function () {
99
104
  if (!isOpen) {
100
105
  return;
101
106
  }
102
107
 
103
- var unbind; // Under most circumstances, `useEffect` should run after an event has ended
104
- // In this particular case, the popperjs library has a setState inside of a ref,
105
- // which cases `useEffect` to run synchronously instead. To avoid this, we use a
106
- // `setTimeout` so `useEffect` after the event. We only want to start listening
107
- // for clicks after the original click event that triggered the dialog
108
- // has finished. You can see more in the Codesandbox here:
109
- // https://codesandbox.io/s/useeffect-and-event-timing-refs-in-state-5tys3?file=/src/App.tsx
110
-
111
- var timeoutId = setTimeout(function () {
112
- unbind = (0, _bindEventListener.bind)(window, {
113
- type: 'click',
114
- listener: function listener(event) {
115
- return handleClickOutside(event);
116
- },
117
- options: {
118
- capture: false
119
- }
120
- });
108
+ var unbind;
109
+ unbind = (0, _bindEventListener.bind)(window, {
110
+ type: 'click',
111
+ listener: function listener(e) {
112
+ return handleClickOutside(e);
113
+ },
114
+ options: {
115
+ capture: true
116
+ }
121
117
  });
122
- return function () {
123
- var _unbind;
124
-
125
- window.clearTimeout(timeoutId);
126
- (_unbind = unbind) === null || _unbind === void 0 ? void 0 : _unbind();
127
- };
128
- }, [handleClickOutside, isOpen]);
118
+ return unbind;
119
+ }, [isOpen, handleClickOutside]);
129
120
  var popper = isOpen ? (0, _core.jsx)(_popper.Popper, {
130
- placement: placement
121
+ placement: placement,
122
+ strategy: strategy
131
123
  }, function (_ref2) {
132
124
  var _ref3 = _ref2.ref,
133
125
  style = _ref2.style;
@@ -164,8 +156,7 @@ var InlineDialog = /*#__PURE__*/(0, _react.memo)(function InlineDialog(_ref) {
164
156
  }
165
157
  }, children);
166
158
  }), popper);
167
- }); // enzyme relies on components having a display name
168
-
159
+ });
169
160
  exports.InlineDialogWithoutAnalytics = InlineDialog;
170
161
  InlineDialog.displayName = 'InlineDialog';
171
162
  var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
@@ -25,21 +25,21 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
25
25
 
26
26
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
27
 
28
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
28
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
29
29
 
30
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
30
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
31
31
 
32
32
  var themedBackground = (0, _components.themed)({
33
- light: "var(--ds-background-overlay, ".concat(_colors.N0, ")"),
34
- dark: "var(--ds-background-overlay, ".concat(_colors.DN50, ")")
33
+ light: "var(--ds-surface-overlay, ".concat(_colors.N0, ")"),
34
+ dark: "var(--ds-surface-overlay, ".concat(_colors.DN50, ")")
35
35
  });
36
36
  var themedColor = (0, _components.themed)({
37
- light: "var(--ds-text-highEmphasis, ".concat(_colors.N900, ")"),
38
- dark: "var(--ds-text-highEmphasis, ".concat(_colors.DN600, ")")
37
+ light: "var(--ds-text, ".concat(_colors.N900, ")"),
38
+ dark: "var(--ds-text, ".concat(_colors.DN600, ")")
39
39
  });
40
40
  var themedBoxShadow = (0, _components.themed)({
41
- light: "var(--ds-overlay, ".concat("0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")"),
42
- dark: "var(--ds-overlay, ".concat("0 4px 8px -2px ".concat(_colors.DN50A, ", 0 0 1px ").concat(_colors.DN60A), ")")
41
+ light: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")"),
42
+ dark: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.DN50A, ", 0 0 1px ").concat(_colors.DN60A), ")")
43
43
  });
44
44
  var borderRadius = (0, _constants.borderRadius)();
45
45
  var gridSize = (0, _constants.gridSize)();
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-dialog",
3
- "version": "13.1.9",
3
+ "version": "13.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -8,7 +8,7 @@ import noop from '@atlaskit/ds-lib/noop';
8
8
  import { Manager, Popper, Reference } from '@atlaskit/popper';
9
9
  import { Container } from './styled/container';
10
10
  const packageName = "@atlaskit/inline-dialog";
11
- const packageVersion = "13.1.9";
11
+ const packageVersion = "13.3.0";
12
12
 
13
13
  const checkIsChildOfPortal = node => {
14
14
  if (!node) {
@@ -25,17 +25,19 @@ const InlineDialog = /*#__PURE__*/memo(function InlineDialog({
25
25
  onContentFocus = noop,
26
26
  onClose = noop,
27
27
  placement = 'bottom-start',
28
+ strategy = 'fixed',
28
29
  testId,
29
30
  content,
30
31
  children
31
32
  }) {
32
33
  const containerRef = useRef(null);
33
- const triggerRef = useRef(null);
34
- const handleClickOutside = useCallback(event => {
35
- if (event.defaultPrevented) {
36
- return;
37
- }
34
+ const triggerRef = useRef(null); // we put this into a ref to avoid handleClickOutside having this as a dependency
38
35
 
36
+ const onCloseRef = useRef(onClose);
37
+ useEffect(() => {
38
+ onCloseRef.current = onClose;
39
+ });
40
+ const handleClickOutside = useCallback(event => {
39
41
  const {
40
42
  target
41
43
  } = event; // checks for when target is not HTMLElement
@@ -63,43 +65,32 @@ const InlineDialog = /*#__PURE__*/memo(function InlineDialog({
63
65
 
64
66
 
65
67
  if (containerRef.current && !containerRef.current.contains(target)) {
66
- onClose && onClose({
68
+ var _onCloseRef$current;
69
+
70
+ (_onCloseRef$current = onCloseRef.current) === null || _onCloseRef$current === void 0 ? void 0 : _onCloseRef$current.call(onCloseRef, {
67
71
  isOpen: false,
68
72
  event: event
69
73
  });
70
74
  }
71
- }, [onClose]);
75
+ }, []);
72
76
  useEffect(() => {
73
77
  if (!isOpen) {
74
78
  return;
75
79
  }
76
80
 
77
- let unbind; // Under most circumstances, `useEffect` should run after an event has ended
78
- // In this particular case, the popperjs library has a setState inside of a ref,
79
- // which cases `useEffect` to run synchronously instead. To avoid this, we use a
80
- // `setTimeout` so `useEffect` after the event. We only want to start listening
81
- // for clicks after the original click event that triggered the dialog
82
- // has finished. You can see more in the Codesandbox here:
83
- // https://codesandbox.io/s/useeffect-and-event-timing-refs-in-state-5tys3?file=/src/App.tsx
84
-
85
- const timeoutId = setTimeout(() => {
86
- unbind = bind(window, {
87
- type: 'click',
88
- listener: event => handleClickOutside(event),
89
- options: {
90
- capture: false
91
- }
92
- });
81
+ let unbind;
82
+ unbind = bind(window, {
83
+ type: 'click',
84
+ listener: e => handleClickOutside(e),
85
+ options: {
86
+ capture: true
87
+ }
93
88
  });
94
- return () => {
95
- var _unbind;
96
-
97
- window.clearTimeout(timeoutId);
98
- (_unbind = unbind) === null || _unbind === void 0 ? void 0 : _unbind();
99
- };
100
- }, [handleClickOutside, isOpen]);
89
+ return unbind;
90
+ }, [isOpen, handleClickOutside]);
101
91
  const popper = isOpen ? jsx(Popper, {
102
- placement: placement
92
+ placement: placement,
93
+ strategy: strategy
103
94
  }, ({
104
95
  ref,
105
96
  style
@@ -134,8 +125,7 @@ const InlineDialog = /*#__PURE__*/memo(function InlineDialog({
134
125
  }
135
126
  }
136
127
  }, children)), popper);
137
- }); // enzyme relies on components having a display name
138
-
128
+ });
139
129
  InlineDialog.displayName = 'InlineDialog';
140
130
  export { InlineDialog as InlineDialogWithoutAnalytics };
141
131
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
@@ -9,16 +9,16 @@ import { DN50, DN50A, DN600, DN60A, N0, N50A, N60A, N900 } from '@atlaskit/theme
9
9
  import { themed, useGlobalTheme } from '@atlaskit/theme/components';
10
10
  import { borderRadius as getBorderRadius, gridSize as getGridSize, layers } from '@atlaskit/theme/constants';
11
11
  const themedBackground = themed({
12
- light: `var(--ds-background-overlay, ${N0})`,
13
- dark: `var(--ds-background-overlay, ${DN50})`
12
+ light: `var(--ds-surface-overlay, ${N0})`,
13
+ dark: `var(--ds-surface-overlay, ${DN50})`
14
14
  });
15
15
  const themedColor = themed({
16
- light: `var(--ds-text-highEmphasis, ${N900})`,
17
- dark: `var(--ds-text-highEmphasis, ${DN600})`
16
+ light: `var(--ds-text, ${N900})`,
17
+ dark: `var(--ds-text, ${DN600})`
18
18
  });
19
19
  const themedBoxShadow = themed({
20
- light: `var(--ds-overlay, ${`0 4px 8px -2px ${N50A}, 0 0 1px ${N60A}`})`,
21
- dark: `var(--ds-overlay, ${`0 4px 8px -2px ${DN50A}, 0 0 1px ${DN60A}`})`
20
+ light: `var(--ds-shadow-overlay, ${`0 4px 8px -2px ${N50A}, 0 0 1px ${N60A}`})`,
21
+ dark: `var(--ds-shadow-overlay, ${`0 4px 8px -2px ${DN50A}, 0 0 1px ${DN60A}`})`
22
22
  });
23
23
  const borderRadius = getBorderRadius();
24
24
  const gridSize = getGridSize();
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-dialog",
3
- "version": "13.1.9",
3
+ "version": "13.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -8,7 +8,7 @@ import noop from '@atlaskit/ds-lib/noop';
8
8
  import { Manager, Popper, Reference } from '@atlaskit/popper';
9
9
  import { Container } from './styled/container';
10
10
  var packageName = "@atlaskit/inline-dialog";
11
- var packageVersion = "13.1.9";
11
+ var packageVersion = "13.3.0";
12
12
 
13
13
  var checkIsChildOfPortal = function checkIsChildOfPortal(node) {
14
14
  if (!node) {
@@ -31,16 +31,19 @@ var InlineDialog = /*#__PURE__*/memo(function InlineDialog(_ref) {
31
31
  onClose = _ref$onClose === void 0 ? noop : _ref$onClose,
32
32
  _ref$placement = _ref.placement,
33
33
  placement = _ref$placement === void 0 ? 'bottom-start' : _ref$placement,
34
+ _ref$strategy = _ref.strategy,
35
+ strategy = _ref$strategy === void 0 ? 'fixed' : _ref$strategy,
34
36
  testId = _ref.testId,
35
37
  content = _ref.content,
36
38
  children = _ref.children;
37
39
  var containerRef = useRef(null);
38
- var triggerRef = useRef(null);
39
- var handleClickOutside = useCallback(function (event) {
40
- if (event.defaultPrevented) {
41
- return;
42
- }
40
+ var triggerRef = useRef(null); // we put this into a ref to avoid handleClickOutside having this as a dependency
43
41
 
42
+ var onCloseRef = useRef(onClose);
43
+ useEffect(function () {
44
+ onCloseRef.current = onClose;
45
+ });
46
+ var handleClickOutside = useCallback(function (event) {
44
47
  var target = event.target; // checks for when target is not HTMLElement
45
48
 
46
49
  if (!(target instanceof HTMLElement)) {
@@ -66,45 +69,34 @@ var InlineDialog = /*#__PURE__*/memo(function InlineDialog(_ref) {
66
69
 
67
70
 
68
71
  if (containerRef.current && !containerRef.current.contains(target)) {
69
- onClose && onClose({
72
+ var _onCloseRef$current;
73
+
74
+ (_onCloseRef$current = onCloseRef.current) === null || _onCloseRef$current === void 0 ? void 0 : _onCloseRef$current.call(onCloseRef, {
70
75
  isOpen: false,
71
76
  event: event
72
77
  });
73
78
  }
74
- }, [onClose]);
79
+ }, []);
75
80
  useEffect(function () {
76
81
  if (!isOpen) {
77
82
  return;
78
83
  }
79
84
 
80
- var unbind; // Under most circumstances, `useEffect` should run after an event has ended
81
- // In this particular case, the popperjs library has a setState inside of a ref,
82
- // which cases `useEffect` to run synchronously instead. To avoid this, we use a
83
- // `setTimeout` so `useEffect` after the event. We only want to start listening
84
- // for clicks after the original click event that triggered the dialog
85
- // has finished. You can see more in the Codesandbox here:
86
- // https://codesandbox.io/s/useeffect-and-event-timing-refs-in-state-5tys3?file=/src/App.tsx
87
-
88
- var timeoutId = setTimeout(function () {
89
- unbind = bind(window, {
90
- type: 'click',
91
- listener: function listener(event) {
92
- return handleClickOutside(event);
93
- },
94
- options: {
95
- capture: false
96
- }
97
- });
85
+ var unbind;
86
+ unbind = bind(window, {
87
+ type: 'click',
88
+ listener: function listener(e) {
89
+ return handleClickOutside(e);
90
+ },
91
+ options: {
92
+ capture: true
93
+ }
98
94
  });
99
- return function () {
100
- var _unbind;
101
-
102
- window.clearTimeout(timeoutId);
103
- (_unbind = unbind) === null || _unbind === void 0 ? void 0 : _unbind();
104
- };
105
- }, [handleClickOutside, isOpen]);
95
+ return unbind;
96
+ }, [isOpen, handleClickOutside]);
106
97
  var popper = isOpen ? jsx(Popper, {
107
- placement: placement
98
+ placement: placement,
99
+ strategy: strategy
108
100
  }, function (_ref2) {
109
101
  var _ref3 = _ref2.ref,
110
102
  style = _ref2.style;
@@ -141,8 +133,7 @@ var InlineDialog = /*#__PURE__*/memo(function InlineDialog(_ref) {
141
133
  }
142
134
  }, children);
143
135
  }), popper);
144
- }); // enzyme relies on components having a display name
145
-
136
+ });
146
137
  InlineDialog.displayName = 'InlineDialog';
147
138
  export { InlineDialog as InlineDialogWithoutAnalytics };
148
139
  var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
@@ -1,8 +1,8 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
 
3
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
4
 
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
 
7
7
  /* eslint-disable jsx-a11y/no-static-element-interactions */
8
8
 
@@ -15,16 +15,16 @@ import { DN50, DN50A, DN600, DN60A, N0, N50A, N60A, N900 } from '@atlaskit/theme
15
15
  import { themed, useGlobalTheme } from '@atlaskit/theme/components';
16
16
  import { borderRadius as getBorderRadius, gridSize as getGridSize, layers } from '@atlaskit/theme/constants';
17
17
  var themedBackground = themed({
18
- light: "var(--ds-background-overlay, ".concat(N0, ")"),
19
- dark: "var(--ds-background-overlay, ".concat(DN50, ")")
18
+ light: "var(--ds-surface-overlay, ".concat(N0, ")"),
19
+ dark: "var(--ds-surface-overlay, ".concat(DN50, ")")
20
20
  });
21
21
  var themedColor = themed({
22
- light: "var(--ds-text-highEmphasis, ".concat(N900, ")"),
23
- dark: "var(--ds-text-highEmphasis, ".concat(DN600, ")")
22
+ light: "var(--ds-text, ".concat(N900, ")"),
23
+ dark: "var(--ds-text, ".concat(DN600, ")")
24
24
  });
25
25
  var themedBoxShadow = themed({
26
- light: "var(--ds-overlay, ".concat("0 4px 8px -2px ".concat(N50A, ", 0 0 1px ").concat(N60A), ")"),
27
- dark: "var(--ds-overlay, ".concat("0 4px 8px -2px ".concat(DN50A, ", 0 0 1px ").concat(DN60A), ")")
26
+ light: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N50A, ", 0 0 1px ").concat(N60A), ")"),
27
+ dark: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(DN50A, ", 0 0 1px ").concat(DN60A), ")")
28
28
  });
29
29
  var borderRadius = getBorderRadius();
30
30
  var gridSize = getGridSize();
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-dialog",
3
- "version": "13.1.9",
3
+ "version": "13.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -3,5 +3,5 @@ import React, { FC } from 'react';
3
3
  import type { InlineDialogProps } from '../types';
4
4
  declare const InlineDialog: FC<InlineDialogProps>;
5
5
  export { InlineDialog as InlineDialogWithoutAnalytics };
6
- declare const _default: React.ForwardRefExoticComponent<Pick<Pick<React.PropsWithChildren<InlineDialogProps>, "content" | "children" | "testId" | "isOpen" | "onContentBlur" | "onContentClick" | "onContentFocus" | "onClose" | "placement"> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "content" | "children" | "testId" | "isOpen" | "onContentBlur" | "onContentClick" | "onContentFocus" | "onClose" | "placement" | "key" | "analyticsContext"> & React.RefAttributes<any>>;
6
+ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<React.PropsWithChildren<InlineDialogProps>, "content" | "children" | "testId" | "isOpen" | "onContentBlur" | "onContentClick" | "onContentFocus" | "onClose" | "placement" | "strategy"> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "content" | "children" | "testId" | "isOpen" | "onContentBlur" | "onContentClick" | "onContentFocus" | "onClose" | "placement" | "strategy" | "key" | "analyticsContext"> & React.RefAttributes<any>>;
7
7
  export default _default;
@@ -38,6 +38,10 @@ export interface InlineDialogProps extends WithAnalyticsEventsProps {
38
38
  * Where the dialog should appear, relative to the contents of the children.
39
39
  */
40
40
  placement?: Placement;
41
+ /**
42
+ * Placement strategy used. Can be 'fixed' or 'absolute'. Defaults to 'fixed'.
43
+ */
44
+ strategy?: 'fixed' | 'absolute';
41
45
  /**
42
46
  * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
43
47
  */
@@ -0,0 +1,5 @@
1
+ import { InlineDialogProps } from '../src/types';
2
+
3
+ export default function InlineDialogProp(props: InlineDialogProps) {
4
+ return null;
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-dialog",
3
- "version": "13.1.9",
3
+ "version": "13.3.0",
4
4
  "description": "An inline dialog is a pop-up container for small amounts of information. It can also contain controls.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -17,7 +17,6 @@
17
17
  "atlassian": {
18
18
  "team": "Design System Team",
19
19
  "deprecatedAutoEntryPoints": true,
20
- "inPublicMirror": true,
21
20
  "releaseModel": "scheduled",
22
21
  "website": {
23
22
  "name": "Inline dialog"
@@ -25,10 +24,10 @@
25
24
  },
26
25
  "dependencies": {
27
26
  "@atlaskit/analytics-next": "^8.2.0",
28
- "@atlaskit/ds-lib": "^1.3.0",
27
+ "@atlaskit/ds-lib": "^1.4.0",
29
28
  "@atlaskit/popper": "^5.0.0",
30
- "@atlaskit/theme": "^12.0.0",
31
- "@atlaskit/tokens": "^0.4.0",
29
+ "@atlaskit/theme": "^12.1.0",
30
+ "@atlaskit/tokens": "^0.6.0",
32
31
  "@babel/runtime": "^7.0.0",
33
32
  "@emotion/core": "^10.0.9",
34
33
  "bind-event-listener": "^1.0.2",
@@ -38,11 +37,10 @@
38
37
  "react": "^16.8.0"
39
38
  },
40
39
  "devDependencies": {
41
- "@atlaskit/build-utils": "*",
42
40
  "@atlaskit/button": "^16.1.0",
43
41
  "@atlaskit/datetime-picker": "^11.1.0",
44
42
  "@atlaskit/docs": "*",
45
- "@atlaskit/icon": "^21.9.0",
43
+ "@atlaskit/icon": "^21.10.0",
46
44
  "@atlaskit/modal-dialog": "^12.2.0",
47
45
  "@atlaskit/section-message": "^6.1.0",
48
46
  "@atlaskit/select": "^15.0.0",
@@ -51,7 +49,6 @@
51
49
  "@atlaskit/webdriver-runner": "*",
52
50
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
53
51
  "@testing-library/react": "^8.0.1",
54
- "enzyme": "^3.10.0",
55
52
  "react-dom": "^16.8.0",
56
53
  "react-lorem-component": "^0.13.0",
57
54
  "typescript": "3.9.6",