@atlaskit/tooltip 20.12.0 → 20.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 CHANGED
@@ -1,5 +1,28 @@
1
1
  # @atlaskit/tooltip
2
2
 
3
+ ## 20.14.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`9cb76d1d2b1a0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9cb76d1d2b1a0) -
8
+ Adds `UNSAFE_shouldRenderToParent` prop behind the
9
+ `platform_dst_nav4_side_nav_resize_tooltip_feedback` feature gate. When enabled the tooltip will
10
+ be rendered as a sibling instead of in a portal.
11
+
12
+ ## 20.13.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [`05a04a1bfd2f9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/05a04a1bfd2f9) -
17
+ Adds the experimental `UNSAFE_shouldAlwaysFadeIn` prop behind the
18
+ `platform_dst_nav4_side_nav_resize_tooltip_feedback` feature gate. When used, the tooltip will
19
+ always use the fade in animation, and never use the show immediate behaviour, even when another
20
+ tooltip is already visible.
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+
3
26
  ## 20.12.0
4
27
 
5
28
  ### Minor Changes
@@ -100,7 +100,8 @@ function show(entry) {
100
100
  return null;
101
101
  }
102
102
  function start() {
103
- var showImmediately = Boolean(active && active.isVisible());
103
+ var shouldAlwaysFadeIn = (0, _platformFeatureFlags.fg)('platform_dst_nav4_side_nav_resize_tooltip_feedback') ? entry.shouldAlwaysFadeIn : false;
104
+ var showImmediately = Boolean(active && active.isVisible()) && !shouldAlwaysFadeIn;
104
105
 
105
106
  // If there was an active tooltip; we tell it to remove itself at once!
106
107
  if (active) {
@@ -33,7 +33,7 @@ var tooltipZIndex = _constants.layers.tooltip();
33
33
  var analyticsAttributes = {
34
34
  componentName: 'tooltip',
35
35
  packageName: "@atlaskit/tooltip",
36
- packageVersion: "0.0.0-development"
36
+ packageVersion: "20.13.0"
37
37
  };
38
38
 
39
39
  // Inverts motion direction
@@ -90,7 +90,11 @@ function Tooltip(_ref) {
90
90
  ignoreTooltipPointerEvents = _ref$ignoreTooltipPoi === void 0 ? false : _ref$ignoreTooltipPoi,
91
91
  _ref$isScreenReaderAn = _ref.isScreenReaderAnnouncementDisabled,
92
92
  isScreenReaderAnnouncementDisabled = _ref$isScreenReaderAn === void 0 ? false : _ref$isScreenReaderAn,
93
- shortcut = _ref.shortcut;
93
+ shortcut = _ref.shortcut,
94
+ _ref$UNSAFE_shouldAlw = _ref.UNSAFE_shouldAlwaysFadeIn,
95
+ shouldAlwaysFadeIn = _ref$UNSAFE_shouldAlw === void 0 ? false : _ref$UNSAFE_shouldAlw,
96
+ _ref$UNSAFE_shouldRen = _ref.UNSAFE_shouldRenderToParent,
97
+ UNSAFE_shouldRenderToParent = _ref$UNSAFE_shouldRen === void 0 ? false : _ref$UNSAFE_shouldRen;
94
98
  // Not using a gate for this check. When the gate is disabled `mouse-y` and `mouse-x` are treated as `mouse`.
95
99
  var isMousePosition = position === 'mouse' || position === 'mouse-y' || position === 'mouse-x';
96
100
  var tooltipPosition = isMousePosition ? mousePosition : position;
@@ -134,6 +138,7 @@ function Tooltip(_ref) {
134
138
  var delayStable = (0, _useStableRef.default)(delay);
135
139
  var canAppearStable = (0, _useStableRef.default)(canAppear);
136
140
  var hasCalledShowHandler = (0, _react.useRef)(false);
141
+ var shouldAlwaysFadeInStable = (0, _useStableRef.default)(shouldAlwaysFadeIn);
137
142
  var start = (0, _react.useCallback)(function (api) {
138
143
  // @ts-ignore
139
144
  apiRef.current = api;
@@ -246,7 +251,7 @@ function Tooltip(_ref) {
246
251
  hasCalledShowHandler.current = true;
247
252
  onShowHandlerStable.current();
248
253
  }
249
- setState(isImmediate ? 'show-immediate' : 'fade-in');
254
+ setState(!isImmediate ? 'fade-in' : 'show-immediate');
250
255
  },
251
256
  hide: function hide(_ref4) {
252
257
  var isImmediate = _ref4.isImmediate;
@@ -256,11 +261,12 @@ function Tooltip(_ref) {
256
261
  setState('before-fade-out');
257
262
  }
258
263
  },
259
- done: done
264
+ done: done,
265
+ shouldAlwaysFadeIn: (0, _platformFeatureFlags.fg)('platform_dst_nav4_side_nav_resize_tooltip_feedback') ? shouldAlwaysFadeInStable.current : false
260
266
  };
261
267
  var api = (0, _tooltipManager.show)(entry);
262
268
  start(api);
263
- }, [canAppearStable, delayStable, done, start, abort, onShowHandlerStable]);
269
+ }, [canAppearStable, delayStable, done, start, abort, onShowHandlerStable, shouldAlwaysFadeInStable]);
264
270
  var hideTooltipOnEsc = (0, _react.useCallback)(function () {
265
271
  var _apiRef$current2;
266
272
  (_apiRef$current2 = apiRef.current) === null || _apiRef$current2 === void 0 || _apiRef$current2.requestHide({
@@ -499,6 +505,7 @@ function Tooltip(_ref) {
499
505
  hidden: true,
500
506
  id: tooltipIdForHiddenContent
501
507
  }, typeof content === 'function' ? content({}) : content) : null;
508
+ var PopperWrapper = UNSAFE_shouldRenderToParent && (0, _platformFeatureFlags.fg)('platform_dst_nav4_side_nav_resize_tooltip_feedback') ? _react.Fragment : TooltipPortal;
502
509
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, typeof children === 'function' ?
503
510
  /*#__PURE__*/
504
511
  // once we deprecate the wrapped approach, we can put the aria
@@ -519,9 +526,7 @@ function Tooltip(_ref) {
519
526
  * - Should `role="presentation"` only be used if `shouldRenderHiddenContent == false`?
520
527
  */,
521
528
  role: "presentation"
522
- }), children, hiddenContent), shouldRenderTooltipPopup ? /*#__PURE__*/_react.default.createElement(_portal.default, {
523
- zIndex: tooltipZIndex
524
- }, /*#__PURE__*/_react.default.createElement(_popper.Popper, {
529
+ }), children, hiddenContent), shouldRenderTooltipPopup ? /*#__PURE__*/_react.default.createElement(PopperWrapper, null, /*#__PURE__*/_react.default.createElement(_popper.Popper, {
525
530
  placement: tooltipPosition,
526
531
  referenceElement: getReferenceElement(),
527
532
  strategy: strategy
@@ -568,4 +573,10 @@ function Tooltip(_ref) {
568
573
  }));
569
574
  })) : null);
570
575
  }
571
- var _default = exports.default = Tooltip;
576
+ var _default = exports.default = Tooltip;
577
+ var TooltipPortal = function TooltipPortal(_ref7) {
578
+ var children = _ref7.children;
579
+ return /*#__PURE__*/_react.default.createElement(_portal.default, {
580
+ zIndex: tooltipZIndex
581
+ }, children);
582
+ };
@@ -96,7 +96,8 @@ export function show(entry) {
96
96
  return null;
97
97
  }
98
98
  function start() {
99
- const showImmediately = Boolean(active && active.isVisible());
99
+ const shouldAlwaysFadeIn = fg('platform_dst_nav4_side_nav_resize_tooltip_feedback') ? entry.shouldAlwaysFadeIn : false;
100
+ const showImmediately = Boolean(active && active.isVisible()) && !shouldAlwaysFadeIn;
100
101
 
101
102
  // If there was an active tooltip; we tell it to remove itself at once!
102
103
  if (active) {
@@ -1,5 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React, { useCallback, useEffect, useRef, useState } from 'react';
2
+ import React, { Fragment, useCallback, useEffect, useRef, useState } from 'react';
3
3
  import { bind } from 'bind-event-listener';
4
4
  import { usePlatformLeafSyntheticEventHandler } from '@atlaskit/analytics-next';
5
5
  import noop from '@atlaskit/ds-lib/noop';
@@ -20,7 +20,7 @@ const tooltipZIndex = layers.tooltip();
20
20
  const analyticsAttributes = {
21
21
  componentName: 'tooltip',
22
22
  packageName: "@atlaskit/tooltip",
23
- packageVersion: "0.0.0-development"
23
+ packageVersion: "20.13.0"
24
24
  };
25
25
 
26
26
  // Inverts motion direction
@@ -63,7 +63,9 @@ function Tooltip({
63
63
  strategy = 'fixed',
64
64
  ignoreTooltipPointerEvents = false,
65
65
  isScreenReaderAnnouncementDisabled = false,
66
- shortcut
66
+ shortcut,
67
+ UNSAFE_shouldAlwaysFadeIn: shouldAlwaysFadeIn = false,
68
+ UNSAFE_shouldRenderToParent = false
67
69
  }) {
68
70
  // Not using a gate for this check. When the gate is disabled `mouse-y` and `mouse-x` are treated as `mouse`.
69
71
  const isMousePosition = position === 'mouse' || position === 'mouse-y' || position === 'mouse-x';
@@ -107,6 +109,7 @@ function Tooltip({
107
109
  const delayStable = useStableRef(delay);
108
110
  const canAppearStable = useStableRef(canAppear);
109
111
  const hasCalledShowHandler = useRef(false);
112
+ const shouldAlwaysFadeInStable = useStableRef(shouldAlwaysFadeIn);
110
113
  const start = useCallback(api => {
111
114
  // @ts-ignore
112
115
  apiRef.current = api;
@@ -221,7 +224,7 @@ function Tooltip({
221
224
  hasCalledShowHandler.current = true;
222
225
  onShowHandlerStable.current();
223
226
  }
224
- setState(isImmediate ? 'show-immediate' : 'fade-in');
227
+ setState(!isImmediate ? 'fade-in' : 'show-immediate');
225
228
  },
226
229
  hide: ({
227
230
  isImmediate
@@ -232,11 +235,12 @@ function Tooltip({
232
235
  setState('before-fade-out');
233
236
  }
234
237
  },
235
- done
238
+ done,
239
+ shouldAlwaysFadeIn: fg('platform_dst_nav4_side_nav_resize_tooltip_feedback') ? shouldAlwaysFadeInStable.current : false
236
240
  };
237
241
  const api = show(entry);
238
242
  start(api);
239
- }, [canAppearStable, delayStable, done, start, abort, onShowHandlerStable]);
243
+ }, [canAppearStable, delayStable, done, start, abort, onShowHandlerStable, shouldAlwaysFadeInStable]);
240
244
  const hideTooltipOnEsc = useCallback(() => {
241
245
  var _apiRef$current2;
242
246
  (_apiRef$current2 = apiRef.current) === null || _apiRef$current2 === void 0 ? void 0 : _apiRef$current2.requestHide({
@@ -473,6 +477,7 @@ function Tooltip({
473
477
  hidden: true,
474
478
  id: tooltipIdForHiddenContent
475
479
  }, typeof content === 'function' ? content({}) : content) : null;
480
+ const PopperWrapper = UNSAFE_shouldRenderToParent && fg('platform_dst_nav4_side_nav_resize_tooltip_feedback') ? Fragment : TooltipPortal;
476
481
  return /*#__PURE__*/React.createElement(React.Fragment, null, typeof children === 'function' ?
477
482
  /*#__PURE__*/
478
483
  // once we deprecate the wrapped approach, we can put the aria
@@ -494,9 +499,7 @@ function Tooltip({
494
499
  * - Should `role="presentation"` only be used if `shouldRenderHiddenContent == false`?
495
500
  */,
496
501
  role: "presentation"
497
- }), children, hiddenContent), shouldRenderTooltipPopup ? /*#__PURE__*/React.createElement(Portal, {
498
- zIndex: tooltipZIndex
499
- }, /*#__PURE__*/React.createElement(Popper, {
502
+ }), children, hiddenContent), shouldRenderTooltipPopup ? /*#__PURE__*/React.createElement(PopperWrapper, null, /*#__PURE__*/React.createElement(Popper, {
500
503
  placement: tooltipPosition,
501
504
  referenceElement: getReferenceElement(),
502
505
  strategy: strategy
@@ -548,4 +551,11 @@ function Tooltip({
548
551
  }) : content)));
549
552
  })) : null);
550
553
  }
551
- export default Tooltip;
554
+ export default Tooltip;
555
+ const TooltipPortal = ({
556
+ children
557
+ }) => {
558
+ return /*#__PURE__*/React.createElement(Portal, {
559
+ zIndex: tooltipZIndex
560
+ }, children);
561
+ };
@@ -95,7 +95,8 @@ export function show(entry) {
95
95
  return null;
96
96
  }
97
97
  function start() {
98
- var showImmediately = Boolean(active && active.isVisible());
98
+ var shouldAlwaysFadeIn = fg('platform_dst_nav4_side_nav_resize_tooltip_feedback') ? entry.shouldAlwaysFadeIn : false;
99
+ var showImmediately = Boolean(active && active.isVisible()) && !shouldAlwaysFadeIn;
99
100
 
100
101
  // If there was an active tooltip; we tell it to remove itself at once!
101
102
  if (active) {
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
- import React, { useCallback, useEffect, useRef, useState } from 'react';
6
+ import React, { Fragment, useCallback, useEffect, useRef, useState } from 'react';
7
7
  import { bind } from 'bind-event-listener';
8
8
  import { usePlatformLeafSyntheticEventHandler } from '@atlaskit/analytics-next';
9
9
  import noop from '@atlaskit/ds-lib/noop';
@@ -24,7 +24,7 @@ var tooltipZIndex = layers.tooltip();
24
24
  var analyticsAttributes = {
25
25
  componentName: 'tooltip',
26
26
  packageName: "@atlaskit/tooltip",
27
- packageVersion: "0.0.0-development"
27
+ packageVersion: "20.13.0"
28
28
  };
29
29
 
30
30
  // Inverts motion direction
@@ -81,7 +81,11 @@ function Tooltip(_ref) {
81
81
  ignoreTooltipPointerEvents = _ref$ignoreTooltipPoi === void 0 ? false : _ref$ignoreTooltipPoi,
82
82
  _ref$isScreenReaderAn = _ref.isScreenReaderAnnouncementDisabled,
83
83
  isScreenReaderAnnouncementDisabled = _ref$isScreenReaderAn === void 0 ? false : _ref$isScreenReaderAn,
84
- shortcut = _ref.shortcut;
84
+ shortcut = _ref.shortcut,
85
+ _ref$UNSAFE_shouldAlw = _ref.UNSAFE_shouldAlwaysFadeIn,
86
+ shouldAlwaysFadeIn = _ref$UNSAFE_shouldAlw === void 0 ? false : _ref$UNSAFE_shouldAlw,
87
+ _ref$UNSAFE_shouldRen = _ref.UNSAFE_shouldRenderToParent,
88
+ UNSAFE_shouldRenderToParent = _ref$UNSAFE_shouldRen === void 0 ? false : _ref$UNSAFE_shouldRen;
85
89
  // Not using a gate for this check. When the gate is disabled `mouse-y` and `mouse-x` are treated as `mouse`.
86
90
  var isMousePosition = position === 'mouse' || position === 'mouse-y' || position === 'mouse-x';
87
91
  var tooltipPosition = isMousePosition ? mousePosition : position;
@@ -125,6 +129,7 @@ function Tooltip(_ref) {
125
129
  var delayStable = useStableRef(delay);
126
130
  var canAppearStable = useStableRef(canAppear);
127
131
  var hasCalledShowHandler = useRef(false);
132
+ var shouldAlwaysFadeInStable = useStableRef(shouldAlwaysFadeIn);
128
133
  var start = useCallback(function (api) {
129
134
  // @ts-ignore
130
135
  apiRef.current = api;
@@ -237,7 +242,7 @@ function Tooltip(_ref) {
237
242
  hasCalledShowHandler.current = true;
238
243
  onShowHandlerStable.current();
239
244
  }
240
- setState(isImmediate ? 'show-immediate' : 'fade-in');
245
+ setState(!isImmediate ? 'fade-in' : 'show-immediate');
241
246
  },
242
247
  hide: function hide(_ref4) {
243
248
  var isImmediate = _ref4.isImmediate;
@@ -247,11 +252,12 @@ function Tooltip(_ref) {
247
252
  setState('before-fade-out');
248
253
  }
249
254
  },
250
- done: done
255
+ done: done,
256
+ shouldAlwaysFadeIn: fg('platform_dst_nav4_side_nav_resize_tooltip_feedback') ? shouldAlwaysFadeInStable.current : false
251
257
  };
252
258
  var api = show(entry);
253
259
  start(api);
254
- }, [canAppearStable, delayStable, done, start, abort, onShowHandlerStable]);
260
+ }, [canAppearStable, delayStable, done, start, abort, onShowHandlerStable, shouldAlwaysFadeInStable]);
255
261
  var hideTooltipOnEsc = useCallback(function () {
256
262
  var _apiRef$current2;
257
263
  (_apiRef$current2 = apiRef.current) === null || _apiRef$current2 === void 0 || _apiRef$current2.requestHide({
@@ -490,6 +496,7 @@ function Tooltip(_ref) {
490
496
  hidden: true,
491
497
  id: tooltipIdForHiddenContent
492
498
  }, typeof content === 'function' ? content({}) : content) : null;
499
+ var PopperWrapper = UNSAFE_shouldRenderToParent && fg('platform_dst_nav4_side_nav_resize_tooltip_feedback') ? Fragment : TooltipPortal;
493
500
  return /*#__PURE__*/React.createElement(React.Fragment, null, typeof children === 'function' ?
494
501
  /*#__PURE__*/
495
502
  // once we deprecate the wrapped approach, we can put the aria
@@ -510,9 +517,7 @@ function Tooltip(_ref) {
510
517
  * - Should `role="presentation"` only be used if `shouldRenderHiddenContent == false`?
511
518
  */,
512
519
  role: "presentation"
513
- }), children, hiddenContent), shouldRenderTooltipPopup ? /*#__PURE__*/React.createElement(Portal, {
514
- zIndex: tooltipZIndex
515
- }, /*#__PURE__*/React.createElement(Popper, {
520
+ }), children, hiddenContent), shouldRenderTooltipPopup ? /*#__PURE__*/React.createElement(PopperWrapper, null, /*#__PURE__*/React.createElement(Popper, {
516
521
  placement: tooltipPosition,
517
522
  referenceElement: getReferenceElement(),
518
523
  strategy: strategy
@@ -559,4 +564,10 @@ function Tooltip(_ref) {
559
564
  }));
560
565
  })) : null);
561
566
  }
562
- export default Tooltip;
567
+ export default Tooltip;
568
+ var TooltipPortal = function TooltipPortal(_ref7) {
569
+ var children = _ref7.children;
570
+ return /*#__PURE__*/React.createElement(Portal, {
571
+ zIndex: tooltipZIndex
572
+ }, children);
573
+ };
@@ -18,6 +18,7 @@ export type Entry = {
18
18
  }) => void;
19
19
  delay: number;
20
20
  done: () => void;
21
+ shouldAlwaysFadeIn: boolean;
21
22
  };
22
23
  export type API = {
23
24
  isActive: () => boolean;
@@ -5,5 +5,5 @@ import { type TooltipProps } from './types';
5
5
  *
6
6
  * A tooltip is a floating, non-actionable label used to explain a user interface element or feature.
7
7
  */
8
- declare function Tooltip({ children, position, mousePosition, content, truncate, component: Container, tag: TargetContainer, testId, delay, onShow, onHide, canAppear, hideTooltipOnClick, hideTooltipOnMouseDown, analyticsContext, strategy, ignoreTooltipPointerEvents, isScreenReaderAnnouncementDisabled, shortcut, }: TooltipProps): React.JSX.Element;
8
+ declare function Tooltip({ children, position, mousePosition, content, truncate, component: Container, tag: TargetContainer, testId, delay, onShow, onHide, canAppear, hideTooltipOnClick, hideTooltipOnMouseDown, analyticsContext, strategy, ignoreTooltipPointerEvents, isScreenReaderAnnouncementDisabled, shortcut, UNSAFE_shouldAlwaysFadeIn: shouldAlwaysFadeIn, UNSAFE_shouldRenderToParent, }: TooltipProps): React.JSX.Element;
9
9
  export default Tooltip;
@@ -140,4 +140,16 @@ export interface TooltipProps {
140
140
  * Keys will be displayed as individual keyboard key segments after the tooltip content.
141
141
  */
142
142
  shortcut?: string[];
143
+ /**
144
+ * When set to true, the tooltip will always use the fade-in animation
145
+ * and never use the show-immediate behavior, even when another tooltip
146
+ * is already visible.
147
+ */
148
+ UNSAFE_shouldAlwaysFadeIn?: boolean;
149
+ /**
150
+ * When enabled, the tooltip will be rendered as a sibling to the trigger element instead of being portaled to the document body.
151
+ *
152
+ * This is an experimental prop and may be removed at any time. It is not yet intended for public use.
153
+ */
154
+ UNSAFE_shouldRenderToParent?: boolean;
143
155
  }
@@ -18,6 +18,7 @@ export type Entry = {
18
18
  }) => void;
19
19
  delay: number;
20
20
  done: () => void;
21
+ shouldAlwaysFadeIn: boolean;
21
22
  };
22
23
  export type API = {
23
24
  isActive: () => boolean;
@@ -5,5 +5,5 @@ import { type TooltipProps } from './types';
5
5
  *
6
6
  * A tooltip is a floating, non-actionable label used to explain a user interface element or feature.
7
7
  */
8
- declare function Tooltip({ children, position, mousePosition, content, truncate, component: Container, tag: TargetContainer, testId, delay, onShow, onHide, canAppear, hideTooltipOnClick, hideTooltipOnMouseDown, analyticsContext, strategy, ignoreTooltipPointerEvents, isScreenReaderAnnouncementDisabled, shortcut, }: TooltipProps): React.JSX.Element;
8
+ declare function Tooltip({ children, position, mousePosition, content, truncate, component: Container, tag: TargetContainer, testId, delay, onShow, onHide, canAppear, hideTooltipOnClick, hideTooltipOnMouseDown, analyticsContext, strategy, ignoreTooltipPointerEvents, isScreenReaderAnnouncementDisabled, shortcut, UNSAFE_shouldAlwaysFadeIn: shouldAlwaysFadeIn, UNSAFE_shouldRenderToParent, }: TooltipProps): React.JSX.Element;
9
9
  export default Tooltip;
@@ -140,4 +140,16 @@ export interface TooltipProps {
140
140
  * Keys will be displayed as individual keyboard key segments after the tooltip content.
141
141
  */
142
142
  shortcut?: string[];
143
+ /**
144
+ * When set to true, the tooltip will always use the fade-in animation
145
+ * and never use the show-immediate behavior, even when another tooltip
146
+ * is already visible.
147
+ */
148
+ UNSAFE_shouldAlwaysFadeIn?: boolean;
149
+ /**
150
+ * When enabled, the tooltip will be rendered as a sibling to the trigger element instead of being portaled to the document body.
151
+ *
152
+ * This is an experimental prop and may be removed at any time. It is not yet intended for public use.
153
+ */
154
+ UNSAFE_shouldRenderToParent?: boolean;
143
155
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tooltip",
3
- "version": "20.12.0",
3
+ "version": "20.14.0",
4
4
  "description": "A tooltip describes an interactive element on mouse hover or keyboard focus.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -38,7 +38,7 @@
38
38
  "@atlaskit/motion": "^5.3.0",
39
39
  "@atlaskit/platform-feature-flags": "^1.1.0",
40
40
  "@atlaskit/popper": "^7.1.0",
41
- "@atlaskit/portal": "^5.1.0",
41
+ "@atlaskit/portal": "^5.2.0",
42
42
  "@atlaskit/theme": "^21.0.0",
43
43
  "@atlaskit/tokens": "^9.1.0",
44
44
  "@babel/runtime": "^7.0.0",
@@ -57,13 +57,14 @@
57
57
  "@atlaskit/button": "^23.9.0",
58
58
  "@atlaskit/css": "^0.19.0",
59
59
  "@atlaskit/docs": "^11.2.0",
60
- "@atlaskit/icon": "^29.3.0",
60
+ "@atlaskit/icon": "^29.4.0",
61
61
  "@atlaskit/link": "^3.3.0",
62
62
  "@atlaskit/primitives": "^17.0.0",
63
- "@atlaskit/section-message": "^8.11.0",
63
+ "@atlaskit/section-message": "^8.12.0",
64
+ "@atlassian/feature-flags-test-utils": "^1.0.0",
64
65
  "@atlassian/ssr-tests": "workspace:^",
65
66
  "@atlassian/testing-library": "^0.4.0",
66
- "@testing-library/react": "^13.4.0",
67
+ "@testing-library/react": "^16.3.0",
67
68
  "react-dom": "^18.2.0",
68
69
  "tiny-invariant": "^1.2.0"
69
70
  },