@atlaskit/tooltip 17.6.2 → 17.6.3
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 +6 -0
- package/dist/cjs/Tooltip.js +10 -5
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/Tooltip.js +10 -5
- package/dist/es2019/version.json +1 -1
- package/dist/esm/Tooltip.js +10 -5
- package/dist/esm/version.json +1 -1
- package/dist/types/types.d.ts +2 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/tooltip
|
|
2
2
|
|
|
3
|
+
## 17.6.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4fd77eaf22b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4fd77eaf22b) - Align TriggerProps with the actual output, and make data-testid explicit
|
|
8
|
+
|
|
3
9
|
## 17.6.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/Tooltip.js
CHANGED
|
@@ -58,7 +58,7 @@ var tooltipZIndex = _constants.layers.tooltip();
|
|
|
58
58
|
var analyticsAttributes = {
|
|
59
59
|
componentName: 'tooltip',
|
|
60
60
|
packageName: "@atlaskit/tooltip",
|
|
61
|
-
packageVersion: "17.6.
|
|
61
|
+
packageVersion: "17.6.3"
|
|
62
62
|
}; // Inverts motion direction
|
|
63
63
|
|
|
64
64
|
var invertedDirection = {
|
|
@@ -399,14 +399,19 @@ function Tooltip(_ref) {
|
|
|
399
399
|
onMouseOver: onMouseOver,
|
|
400
400
|
onMouseOut: onMouseOut,
|
|
401
401
|
onMouseMove: onMouseMove,
|
|
402
|
-
onClick: onClick,
|
|
403
402
|
onMouseDown: onMouseDown,
|
|
403
|
+
onClick: onClick,
|
|
404
404
|
onFocus: onFocus,
|
|
405
405
|
onBlur: onBlur,
|
|
406
406
|
ref: setRef,
|
|
407
|
-
'aria-describedby': tooltipId
|
|
408
|
-
|
|
409
|
-
|
|
407
|
+
'aria-describedby': tooltipId
|
|
408
|
+
}; // Don't set `data-testid` unless it's defined, as it's not in the interface.
|
|
409
|
+
|
|
410
|
+
if (testId) {
|
|
411
|
+
// @ts-expect-error - Adding `data-testid` to the TriggerProps interface breaks Buttons.
|
|
412
|
+
tooltipTriggerProps['data-testid'] = "".concat(testId, "--container");
|
|
413
|
+
}
|
|
414
|
+
|
|
410
415
|
return (0, _react2.jsx)(_react.default.Fragment, null, typeof children === 'function' ? children(tooltipTriggerProps) : (0, _react2.jsx)(CastTargetContainer, (0, _extends2.default)({}, tooltipTriggerProps, {
|
|
411
416
|
role: "presentation"
|
|
412
417
|
}), children), shouldRenderTooltipContainer ? (0, _react2.jsx)(_portal.default, {
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/Tooltip.js
CHANGED
|
@@ -20,7 +20,7 @@ const tooltipZIndex = layers.tooltip();
|
|
|
20
20
|
const analyticsAttributes = {
|
|
21
21
|
componentName: 'tooltip',
|
|
22
22
|
packageName: "@atlaskit/tooltip",
|
|
23
|
-
packageVersion: "17.6.
|
|
23
|
+
packageVersion: "17.6.3"
|
|
24
24
|
}; // Inverts motion direction
|
|
25
25
|
|
|
26
26
|
const invertedDirection = {
|
|
@@ -346,14 +346,19 @@ function Tooltip({
|
|
|
346
346
|
onMouseOver,
|
|
347
347
|
onMouseOut,
|
|
348
348
|
onMouseMove,
|
|
349
|
-
onClick,
|
|
350
349
|
onMouseDown,
|
|
350
|
+
onClick,
|
|
351
351
|
onFocus,
|
|
352
352
|
onBlur,
|
|
353
353
|
ref: setRef,
|
|
354
|
-
'aria-describedby': tooltipId
|
|
355
|
-
|
|
356
|
-
|
|
354
|
+
'aria-describedby': tooltipId
|
|
355
|
+
}; // Don't set `data-testid` unless it's defined, as it's not in the interface.
|
|
356
|
+
|
|
357
|
+
if (testId) {
|
|
358
|
+
// @ts-expect-error - Adding `data-testid` to the TriggerProps interface breaks Buttons.
|
|
359
|
+
tooltipTriggerProps['data-testid'] = `${testId}--container`;
|
|
360
|
+
}
|
|
361
|
+
|
|
357
362
|
return jsx(React.Fragment, null, typeof children === 'function' ? children(tooltipTriggerProps) : jsx(CastTargetContainer, _extends({}, tooltipTriggerProps, {
|
|
358
363
|
role: "presentation"
|
|
359
364
|
}), children), shouldRenderTooltipContainer ? jsx(Portal, {
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/Tooltip.js
CHANGED
|
@@ -26,7 +26,7 @@ var tooltipZIndex = layers.tooltip();
|
|
|
26
26
|
var analyticsAttributes = {
|
|
27
27
|
componentName: 'tooltip',
|
|
28
28
|
packageName: "@atlaskit/tooltip",
|
|
29
|
-
packageVersion: "17.6.
|
|
29
|
+
packageVersion: "17.6.3"
|
|
30
30
|
}; // Inverts motion direction
|
|
31
31
|
|
|
32
32
|
var invertedDirection = {
|
|
@@ -367,14 +367,19 @@ function Tooltip(_ref) {
|
|
|
367
367
|
onMouseOver: onMouseOver,
|
|
368
368
|
onMouseOut: onMouseOut,
|
|
369
369
|
onMouseMove: onMouseMove,
|
|
370
|
-
onClick: onClick,
|
|
371
370
|
onMouseDown: onMouseDown,
|
|
371
|
+
onClick: onClick,
|
|
372
372
|
onFocus: onFocus,
|
|
373
373
|
onBlur: onBlur,
|
|
374
374
|
ref: setRef,
|
|
375
|
-
'aria-describedby': tooltipId
|
|
376
|
-
|
|
377
|
-
|
|
375
|
+
'aria-describedby': tooltipId
|
|
376
|
+
}; // Don't set `data-testid` unless it's defined, as it's not in the interface.
|
|
377
|
+
|
|
378
|
+
if (testId) {
|
|
379
|
+
// @ts-expect-error - Adding `data-testid` to the TriggerProps interface breaks Buttons.
|
|
380
|
+
tooltipTriggerProps['data-testid'] = "".concat(testId, "--container");
|
|
381
|
+
}
|
|
382
|
+
|
|
378
383
|
return jsx(React.Fragment, null, typeof children === 'function' ? children(tooltipTriggerProps) : jsx(CastTargetContainer, _extends({}, tooltipTriggerProps, {
|
|
379
384
|
role: "presentation"
|
|
380
385
|
}), children), shouldRenderTooltipContainer ? jsx(Portal, {
|
package/dist/esm/version.json
CHANGED
package/dist/types/types.d.ts
CHANGED
|
@@ -7,11 +7,13 @@ export declare type PositionType = PositionTypeBase | 'mouse';
|
|
|
7
7
|
export interface TriggerProps {
|
|
8
8
|
onMouseOver: (event: React.MouseEvent<HTMLElement>) => void;
|
|
9
9
|
onMouseOut: (event: React.MouseEvent<HTMLElement>) => void;
|
|
10
|
+
onMouseMove: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
10
11
|
onMouseDown: (event: React.MouseEvent<HTMLElement>) => void;
|
|
11
12
|
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
12
13
|
onFocus: (event: React.FocusEvent<HTMLElement>) => void;
|
|
13
14
|
onBlur: (event: React.FocusEvent<HTMLElement>) => void;
|
|
14
15
|
ref: (node: HTMLElement | null) => void;
|
|
16
|
+
'aria-describedby': string | undefined;
|
|
15
17
|
}
|
|
16
18
|
export interface TooltipProps {
|
|
17
19
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/tooltip",
|
|
3
|
-
"version": "17.6.
|
|
3
|
+
"version": "17.6.3",
|
|
4
4
|
"description": "A tooltip is a floating, non-actionable label used to explain a user interface element or feature.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
36
36
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
37
37
|
"@atlaskit/motion": "^1.3.0",
|
|
38
|
-
"@atlaskit/popper": "^5.
|
|
38
|
+
"@atlaskit/popper": "^5.3.0",
|
|
39
39
|
"@atlaskit/portal": "^4.1.0",
|
|
40
40
|
"@atlaskit/theme": "^12.2.0",
|
|
41
41
|
"@atlaskit/tokens": "^0.11.0",
|