@atlaskit/tooltip 20.1.0 → 20.2.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 +9 -0
- package/dist/cjs/tooltip-primitive.compiled.css +2 -0
- package/dist/cjs/tooltip-primitive.js +17 -15
- package/dist/cjs/tooltip.js +1 -1
- package/dist/es2019/tooltip-primitive.compiled.css +2 -0
- package/dist/es2019/tooltip-primitive.js +8 -15
- package/dist/es2019/tooltip.js +1 -1
- package/dist/esm/tooltip-primitive.compiled.css +2 -0
- package/dist/esm/tooltip-primitive.js +12 -16
- package/dist/esm/tooltip.js +1 -1
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/tooltip
|
|
2
2
|
|
|
3
|
+
## 20.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#161767](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/161767)
|
|
8
|
+
[`de4f10b4e30ab`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/de4f10b4e30ab) -
|
|
9
|
+
Replaces usage of `@emotion/react` with `@compiled/react` in `TooltipPrimitive`, removing the last
|
|
10
|
+
usage of `@emotion/react` in this package.
|
|
11
|
+
|
|
3
12
|
## 20.1.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
+
/* tooltip-primitive.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
6
|
Object.defineProperty(exports, "__esModule", {
|
|
5
7
|
value: true
|
|
6
8
|
});
|
|
7
9
|
exports.default = void 0;
|
|
10
|
+
require("./tooltip-primitive.compiled.css");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var React = _react;
|
|
13
|
+
var _runtime = require("@compiled/react/runtime");
|
|
8
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _react = require("react");
|
|
10
|
-
var _react2 = require("@emotion/react");
|
|
11
15
|
var _constants = require("@atlaskit/theme/constants");
|
|
16
|
+
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); }
|
|
17
|
+
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; }
|
|
12
18
|
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; }
|
|
13
|
-
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) { (0, _defineProperty2.default)(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; }
|
|
14
|
-
* @jsxRuntime classic
|
|
15
|
-
* @jsx jsx
|
|
16
|
-
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
17
20
|
var VAR_PRIMITIVE_ZINDEX = 'tooltipPrimitiveZindex';
|
|
18
|
-
var primitiveStyles =
|
|
19
|
-
zindex: "var(".concat(VAR_PRIMITIVE_ZINDEX, ")"),
|
|
20
|
-
cursor: "default"
|
|
21
|
-
});
|
|
21
|
+
var primitiveStyles = null;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* The lower level component for rendering a tooltip.
|
|
@@ -33,26 +33,28 @@ var TooltipPrimitive = /*#__PURE__*/(0, _react.forwardRef)(function TooltipPrimi
|
|
|
33
33
|
onMouseOver = _ref.onMouseOver,
|
|
34
34
|
id = _ref.id;
|
|
35
35
|
var styleWithZIndex = _objectSpread(_objectSpread({}, style), {}, (0, _defineProperty2.default)({}, VAR_PRIMITIVE_ZINDEX, _constants.layers.tooltip()));
|
|
36
|
-
return
|
|
36
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
37
37
|
ref: ref
|
|
38
38
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
39
39
|
,
|
|
40
40
|
style: styleWithZIndex,
|
|
41
41
|
"data-testid": testId ? "".concat(testId, "--wrapper") : undefined
|
|
42
|
-
},
|
|
42
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
43
43
|
role: "tooltip"
|
|
44
44
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
45
45
|
,
|
|
46
|
-
className: className
|
|
46
|
+
className: (0, _runtime.ax)(["_11jnf8tm _80om73ad", className])
|
|
47
47
|
// Because the tooltip should not be focusable, there is no reason to have key events.
|
|
48
48
|
/* eslint-disable-next-line jsx-a11y/mouse-events-have-key-events */,
|
|
49
49
|
onMouseOut: onMouseOut
|
|
50
50
|
/* eslint-disable-next-line jsx-a11y/mouse-events-have-key-events */,
|
|
51
51
|
onMouseOver: onMouseOver,
|
|
52
|
-
css: primitiveStyles,
|
|
53
52
|
"data-placement": placement,
|
|
54
53
|
"data-testid": testId,
|
|
55
|
-
id: id
|
|
54
|
+
id: id,
|
|
55
|
+
style: {
|
|
56
|
+
"--_7y8q8x": (0, _runtime.ix)("var(".concat(VAR_PRIMITIVE_ZINDEX, ")"))
|
|
57
|
+
}
|
|
56
58
|
}, children));
|
|
57
59
|
});
|
|
58
60
|
TooltipPrimitive.displayName = 'TooltipPrimitive';
|
package/dist/cjs/tooltip.js
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
1
|
+
/* tooltip-primitive.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./tooltip-primitive.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { css, jsx } from '@emotion/react';
|
|
9
6
|
import { layers } from '@atlaskit/theme/constants';
|
|
10
7
|
const VAR_PRIMITIVE_ZINDEX = 'tooltipPrimitiveZindex';
|
|
11
|
-
const primitiveStyles =
|
|
12
|
-
zindex: `var(${VAR_PRIMITIVE_ZINDEX})`,
|
|
13
|
-
cursor: `default`
|
|
14
|
-
});
|
|
8
|
+
const primitiveStyles = null;
|
|
15
9
|
|
|
16
10
|
/**
|
|
17
11
|
* The lower level component for rendering a tooltip.
|
|
@@ -30,23 +24,22 @@ const TooltipPrimitive = /*#__PURE__*/forwardRef(function TooltipPrimitive({
|
|
|
30
24
|
...style,
|
|
31
25
|
[VAR_PRIMITIVE_ZINDEX]: layers.tooltip()
|
|
32
26
|
};
|
|
33
|
-
return
|
|
27
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
34
28
|
ref: ref
|
|
35
29
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
36
30
|
,
|
|
37
31
|
style: styleWithZIndex,
|
|
38
32
|
"data-testid": testId ? `${testId}--wrapper` : undefined
|
|
39
|
-
},
|
|
33
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
40
34
|
role: "tooltip"
|
|
41
35
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
42
36
|
,
|
|
43
|
-
className: className
|
|
37
|
+
className: ax(["_11jnani6 _80om73ad", className])
|
|
44
38
|
// Because the tooltip should not be focusable, there is no reason to have key events.
|
|
45
39
|
/* eslint-disable-next-line jsx-a11y/mouse-events-have-key-events */,
|
|
46
40
|
onMouseOut: onMouseOut
|
|
47
41
|
/* eslint-disable-next-line jsx-a11y/mouse-events-have-key-events */,
|
|
48
42
|
onMouseOver: onMouseOver,
|
|
49
|
-
css: primitiveStyles,
|
|
50
43
|
"data-placement": placement,
|
|
51
44
|
"data-testid": testId,
|
|
52
45
|
id: id
|
package/dist/es2019/tooltip.js
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
|
+
/* tooltip-primitive.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import "./tooltip-primitive.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
2
6
|
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; }
|
|
3
7
|
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; }
|
|
4
|
-
/**
|
|
5
|
-
* @jsxRuntime classic
|
|
6
|
-
* @jsx jsx
|
|
7
|
-
*/
|
|
8
8
|
import { forwardRef } from 'react';
|
|
9
|
-
|
|
10
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
|
-
import { css, jsx } from '@emotion/react';
|
|
12
9
|
import { layers } from '@atlaskit/theme/constants';
|
|
13
10
|
var VAR_PRIMITIVE_ZINDEX = 'tooltipPrimitiveZindex';
|
|
14
|
-
var primitiveStyles =
|
|
15
|
-
zindex: "var(".concat(VAR_PRIMITIVE_ZINDEX, ")"),
|
|
16
|
-
cursor: "default"
|
|
17
|
-
});
|
|
11
|
+
var primitiveStyles = null;
|
|
18
12
|
|
|
19
13
|
/**
|
|
20
14
|
* The lower level component for rendering a tooltip.
|
|
@@ -29,26 +23,28 @@ var TooltipPrimitive = /*#__PURE__*/forwardRef(function TooltipPrimitive(_ref, r
|
|
|
29
23
|
onMouseOver = _ref.onMouseOver,
|
|
30
24
|
id = _ref.id;
|
|
31
25
|
var styleWithZIndex = _objectSpread(_objectSpread({}, style), {}, _defineProperty({}, VAR_PRIMITIVE_ZINDEX, layers.tooltip()));
|
|
32
|
-
return
|
|
26
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
33
27
|
ref: ref
|
|
34
28
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
35
29
|
,
|
|
36
30
|
style: styleWithZIndex,
|
|
37
31
|
"data-testid": testId ? "".concat(testId, "--wrapper") : undefined
|
|
38
|
-
},
|
|
32
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
39
33
|
role: "tooltip"
|
|
40
34
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
41
35
|
,
|
|
42
|
-
className: className
|
|
36
|
+
className: ax(["_11jnf8tm _80om73ad", className])
|
|
43
37
|
// Because the tooltip should not be focusable, there is no reason to have key events.
|
|
44
38
|
/* eslint-disable-next-line jsx-a11y/mouse-events-have-key-events */,
|
|
45
39
|
onMouseOut: onMouseOut
|
|
46
40
|
/* eslint-disable-next-line jsx-a11y/mouse-events-have-key-events */,
|
|
47
41
|
onMouseOver: onMouseOver,
|
|
48
|
-
css: primitiveStyles,
|
|
49
42
|
"data-placement": placement,
|
|
50
43
|
"data-testid": testId,
|
|
51
|
-
id: id
|
|
44
|
+
id: id,
|
|
45
|
+
style: {
|
|
46
|
+
"--_7y8q8x": ix("var(".concat(VAR_PRIMITIVE_ZINDEX, ")"))
|
|
47
|
+
}
|
|
52
48
|
}, children));
|
|
53
49
|
});
|
|
54
50
|
TooltipPrimitive.displayName = 'TooltipPrimitive';
|
package/dist/esm/tooltip.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/tooltip",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.2.0",
|
|
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/"
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
"@atlaskit/tokens": "^4.9.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"@compiled/react": "^0.18.3",
|
|
55
|
-
"@emotion/react": "^11.7.1",
|
|
56
55
|
"bind-event-listener": "^3.0.0"
|
|
57
56
|
},
|
|
58
57
|
"peerDependencies": {
|
|
@@ -66,7 +65,7 @@
|
|
|
66
65
|
"@atlaskit/button": "^23.2.0",
|
|
67
66
|
"@atlaskit/css": "^0.10.0",
|
|
68
67
|
"@atlaskit/docs": "^10.0.0",
|
|
69
|
-
"@atlaskit/icon": "^26.
|
|
68
|
+
"@atlaskit/icon": "^26.4.0",
|
|
70
69
|
"@atlaskit/link": "^3.2.0",
|
|
71
70
|
"@atlaskit/primitives": "^14.8.0",
|
|
72
71
|
"@atlaskit/section-message": "^8.2.0",
|