@atlaskit/tooltip 18.9.4 → 19.0.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,27 @@
1
1
  # @atlaskit/tooltip
2
2
 
3
+ ## 19.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 19.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - [#174355](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/174355)
14
+ [`d0d1aae2aa428`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d0d1aae2aa428) -
15
+ Migrated from `@emotion/react` to `@compiled/react` in order to improve performance, align with
16
+ the rest of the Atlaskit techstack, and support React 18 Streaming SSR. Please note, in order to
17
+ use this version of `@atlaskit/tooltip`, you will need to ensure that your bundler is configured
18
+ to handle `.css` imports correctly.
19
+
20
+ Most bundlers come with built-in support for `.css` imports, so you may not need to do anything.
21
+ If you are using a different bundler, please refer to the documentation for that bundler to
22
+ understand how to handle `.css` imports. For more information on the migration, please refer to
23
+ [RFC-73 Migrating our components to Compiled CSS-in-JS](https://community.developer.atlassian.com/t/rfc-73-migrating-our-components-to-compiled-css-in-js/85953).
24
+
3
25
  ## 18.9.4
4
26
 
5
27
  ### Patch Changes
@@ -0,0 +1,16 @@
1
+ ._11c8qk37{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
2
+ ._1yt4nmcz{padding:var(--_a5vo3x)}
3
+ ._2rko1sit{border-radius:var(--ds-border-radius,3px)}
4
+ ._152tze3t{inset-block-start:var(--ds-space-0,0)}
5
+ ._18m915vq{overflow-y:hidden}
6
+ ._1bto1l2s{text-overflow:ellipsis}
7
+ ._1e02ze3t{inset-inline-start:var(--ds-space-0,0)}
8
+ ._1i4q1hna{overflow-wrap:break-word}
9
+ ._1reo15vq{overflow-x:hidden}
10
+ ._bfhkpioe{background-color:var(--_yr7xfv)}
11
+ ._o5721q9c{white-space:nowrap}
12
+ ._p12f1pna{max-width:420px}
13
+ ._p12fp3fh{max-width:15pc}
14
+ ._slp31hna{word-wrap:break-word}
15
+ ._syaz1i9p{color:var(--_ywovvi)}
16
+ ._vchhusvi{box-sizing:border-box}
@@ -1,40 +1,25 @@
1
+ /* tooltip-container.tsx generated by @compiled/babel-plugin v0.35.0 */
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;
8
- var _react = require("react");
9
- var _react2 = require("@emotion/react");
10
+ require("./tooltip-container.compiled.css");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var React = _react;
13
+ var _runtime = require("@compiled/react/runtime");
14
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
15
  var _colors = require("@atlaskit/theme/colors");
11
16
  var _tooltipPrimitive = _interopRequireDefault(require("./tooltip-primitive"));
12
- /**
13
- * @jsxRuntime classic
14
- * @jsx jsx
15
- */
16
-
17
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
18
-
19
- var baseStyles = (0, _react2.css)({
20
- boxSizing: 'border-box',
21
- maxWidth: '240px',
22
- padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-075, 6px)"),
23
- backgroundColor: "var(--ds-background-neutral-bold, ".concat(_colors.N800, ")"),
24
- borderRadius: "var(--ds-border-radius, 3px)",
25
- color: "var(--ds-text-inverse, ".concat(_colors.N0, ")"),
26
- font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
27
- insetBlockStart: "var(--ds-space-0, 0px)",
28
- insetInlineStart: "var(--ds-space-0, 0px)",
29
- overflowWrap: 'break-word',
30
- wordWrap: 'break-word'
31
- });
32
- var truncateStyles = (0, _react2.css)({
33
- maxWidth: '420px',
34
- overflow: 'hidden',
35
- textOverflow: 'ellipsis',
36
- whiteSpace: 'nowrap'
37
- });
17
+ 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); }
18
+ 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; }
19
+ 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; }
20
+ 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; }
21
+ var baseStyles = null;
22
+ var truncateStyles = null;
38
23
 
39
24
  /**
40
25
  * Used as the default tooltip container component for the exported `Tooltip` component.
@@ -50,20 +35,23 @@ var TooltipContainer = /*#__PURE__*/(0, _react.forwardRef)(function TooltipConta
50
35
  onMouseOut = _ref.onMouseOut,
51
36
  onMouseOver = _ref.onMouseOver,
52
37
  id = _ref.id;
53
- return (0, _react2.jsx)(_tooltipPrimitive.default, {
38
+ return /*#__PURE__*/React.createElement(_tooltipPrimitive.default, {
54
39
  ref: ref
55
40
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
56
41
  ,
57
- style: style
42
+
58
43
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
59
- ,
60
- className: className,
44
+ className: (0, _runtime.ax)(["_1yt4nmcz _2rko1sit _11c8qk37 _vchhusvi _p12fp3fh _bfhkpioe _syaz1i9p _152tze3t _1e02ze3t _1i4q1hna _slp31hna", truncate && "_1reo15vq _18m915vq _p12f1pna _1bto1l2s _o5721q9c", className]),
61
45
  placement: placement,
62
46
  testId: testId,
63
47
  id: id,
64
48
  onMouseOut: onMouseOut,
65
49
  onMouseOver: onMouseOver,
66
- css: [baseStyles, truncate ? truncateStyles : null]
50
+ style: _objectSpread(_objectSpread({}, style), {}, {
51
+ "--_a5vo3x": (0, _runtime.ix)("var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-075, 6px)")),
52
+ "--_yr7xfv": (0, _runtime.ix)("var(--ds-background-neutral-bold, ".concat(_colors.N800, ")")),
53
+ "--_ywovvi": (0, _runtime.ix)("var(--ds-text-inverse, ".concat(_colors.N0, ")"))
54
+ })
67
55
  }, children);
68
56
  });
69
57
  TooltipContainer.displayName = 'TooltipContainer';
@@ -34,7 +34,7 @@ var tooltipZIndex = _constants.layers.tooltip();
34
34
  var analyticsAttributes = {
35
35
  componentName: 'tooltip',
36
36
  packageName: "@atlaskit/tooltip",
37
- packageVersion: "18.9.4"
37
+ packageVersion: "19.0.1"
38
38
  };
39
39
 
40
40
  // Inverts motion direction
@@ -0,0 +1,16 @@
1
+ ._11c8qk37{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
2
+ ._1yt41ppf{padding:var(--ds-space-025,2px) var(--ds-space-075,6px)}
3
+ ._2rko1sit{border-radius:var(--ds-border-radius,3px)}
4
+ ._152tze3t{inset-block-start:var(--ds-space-0,0)}
5
+ ._18m915vq{overflow-y:hidden}
6
+ ._1bto1l2s{text-overflow:ellipsis}
7
+ ._1e02ze3t{inset-inline-start:var(--ds-space-0,0)}
8
+ ._1i4q1hna{overflow-wrap:break-word}
9
+ ._1reo15vq{overflow-x:hidden}
10
+ ._bfhkgkf6{background-color:var(--ds-background-neutral-bold,#172b4d)}
11
+ ._o5721q9c{white-space:nowrap}
12
+ ._p12f1pna{max-width:420px}
13
+ ._p12fp3fh{max-width:15pc}
14
+ ._slp31hna{word-wrap:break-word}
15
+ ._syaz15cr{color:var(--ds-text-inverse,#fff)}
16
+ ._vchhusvi{box-sizing:border-box}
@@ -1,32 +1,12 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
1
+ /* tooltip-container.tsx generated by @compiled/babel-plugin v0.35.0 */
2
+ import "./tooltip-container.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 { N0, N800 } from '@atlaskit/theme/colors';
10
7
  import TooltipPrimitive from './tooltip-primitive';
11
- const baseStyles = css({
12
- boxSizing: 'border-box',
13
- maxWidth: '240px',
14
- padding: `${"var(--ds-space-025, 2px)"} ${"var(--ds-space-075, 6px)"}`,
15
- backgroundColor: `var(--ds-background-neutral-bold, ${N800})`,
16
- borderRadius: "var(--ds-border-radius, 3px)",
17
- color: `var(--ds-text-inverse, ${N0})`,
18
- font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
19
- insetBlockStart: "var(--ds-space-0, 0px)",
20
- insetInlineStart: "var(--ds-space-0, 0px)",
21
- overflowWrap: 'break-word',
22
- wordWrap: 'break-word'
23
- });
24
- const truncateStyles = css({
25
- maxWidth: '420px',
26
- overflow: 'hidden',
27
- textOverflow: 'ellipsis',
28
- whiteSpace: 'nowrap'
29
- });
8
+ const baseStyles = null;
9
+ const truncateStyles = null;
30
10
 
31
11
  /**
32
12
  * Used as the default tooltip container component for the exported `Tooltip` component.
@@ -43,20 +23,19 @@ const TooltipContainer = /*#__PURE__*/forwardRef(function TooltipContainer({
43
23
  onMouseOver,
44
24
  id
45
25
  }, ref) {
46
- return jsx(TooltipPrimitive, {
26
+ return /*#__PURE__*/React.createElement(TooltipPrimitive, {
47
27
  ref: ref
48
28
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
49
29
  ,
50
30
  style: style
51
31
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
52
32
  ,
53
- className: className,
33
+ className: ax(["_1yt41ppf _2rko1sit _11c8qk37 _vchhusvi _p12fp3fh _bfhkgkf6 _syaz15cr _152tze3t _1e02ze3t _1i4q1hna _slp31hna", truncate && "_1reo15vq _18m915vq _p12f1pna _1bto1l2s _o5721q9c", className]),
54
34
  placement: placement,
55
35
  testId: testId,
56
36
  id: id,
57
37
  onMouseOut: onMouseOut,
58
- onMouseOver: onMouseOver,
59
- css: [baseStyles, truncate ? truncateStyles : null]
38
+ onMouseOver: onMouseOver
60
39
  }, children);
61
40
  });
62
41
  TooltipContainer.displayName = 'TooltipContainer';
@@ -20,7 +20,7 @@ const tooltipZIndex = layers.tooltip();
20
20
  const analyticsAttributes = {
21
21
  componentName: 'tooltip',
22
22
  packageName: "@atlaskit/tooltip",
23
- packageVersion: "18.9.4"
23
+ packageVersion: "19.0.1"
24
24
  };
25
25
 
26
26
  // Inverts motion direction
@@ -0,0 +1,16 @@
1
+ ._11c8qk37{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
2
+ ._1yt4nmcz{padding:var(--_a5vo3x)}
3
+ ._2rko1sit{border-radius:var(--ds-border-radius,3px)}
4
+ ._152tze3t{inset-block-start:var(--ds-space-0,0)}
5
+ ._18m915vq{overflow-y:hidden}
6
+ ._1bto1l2s{text-overflow:ellipsis}
7
+ ._1e02ze3t{inset-inline-start:var(--ds-space-0,0)}
8
+ ._1i4q1hna{overflow-wrap:break-word}
9
+ ._1reo15vq{overflow-x:hidden}
10
+ ._bfhkpioe{background-color:var(--_yr7xfv)}
11
+ ._o5721q9c{white-space:nowrap}
12
+ ._p12f1pna{max-width:420px}
13
+ ._p12fp3fh{max-width:15pc}
14
+ ._slp31hna{word-wrap:break-word}
15
+ ._syaz1i9p{color:var(--_ywovvi)}
16
+ ._vchhusvi{box-sizing:border-box}
@@ -1,32 +1,15 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
1
+ /* tooltip-container.tsx generated by @compiled/babel-plugin v0.35.0 */
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ import "./tooltip-container.compiled.css";
4
+ import * as React from 'react';
5
+ import { ax, ix } from "@compiled/react/runtime";
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; }
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; }
5
8
  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
9
  import { N0, N800 } from '@atlaskit/theme/colors';
10
10
  import TooltipPrimitive from './tooltip-primitive';
11
- var baseStyles = css({
12
- boxSizing: 'border-box',
13
- maxWidth: '240px',
14
- padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-075, 6px)"),
15
- backgroundColor: "var(--ds-background-neutral-bold, ".concat(N800, ")"),
16
- borderRadius: "var(--ds-border-radius, 3px)",
17
- color: "var(--ds-text-inverse, ".concat(N0, ")"),
18
- font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
19
- insetBlockStart: "var(--ds-space-0, 0px)",
20
- insetInlineStart: "var(--ds-space-0, 0px)",
21
- overflowWrap: 'break-word',
22
- wordWrap: 'break-word'
23
- });
24
- var truncateStyles = css({
25
- maxWidth: '420px',
26
- overflow: 'hidden',
27
- textOverflow: 'ellipsis',
28
- whiteSpace: 'nowrap'
29
- });
11
+ var baseStyles = null;
12
+ var truncateStyles = null;
30
13
 
31
14
  /**
32
15
  * Used as the default tooltip container component for the exported `Tooltip` component.
@@ -42,20 +25,23 @@ var TooltipContainer = /*#__PURE__*/forwardRef(function TooltipContainer(_ref, r
42
25
  onMouseOut = _ref.onMouseOut,
43
26
  onMouseOver = _ref.onMouseOver,
44
27
  id = _ref.id;
45
- return jsx(TooltipPrimitive, {
28
+ return /*#__PURE__*/React.createElement(TooltipPrimitive, {
46
29
  ref: ref
47
30
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
48
31
  ,
49
- style: style
32
+
50
33
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
51
- ,
52
- className: className,
34
+ className: ax(["_1yt4nmcz _2rko1sit _11c8qk37 _vchhusvi _p12fp3fh _bfhkpioe _syaz1i9p _152tze3t _1e02ze3t _1i4q1hna _slp31hna", truncate && "_1reo15vq _18m915vq _p12f1pna _1bto1l2s _o5721q9c", className]),
53
35
  placement: placement,
54
36
  testId: testId,
55
37
  id: id,
56
38
  onMouseOut: onMouseOut,
57
39
  onMouseOver: onMouseOver,
58
- css: [baseStyles, truncate ? truncateStyles : null]
40
+ style: _objectSpread(_objectSpread({}, style), {}, {
41
+ "--_a5vo3x": ix("var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-075, 6px)")),
42
+ "--_yr7xfv": ix("var(--ds-background-neutral-bold, ".concat(N800, ")")),
43
+ "--_ywovvi": ix("var(--ds-text-inverse, ".concat(N0, ")"))
44
+ })
59
45
  }, children);
60
46
  });
61
47
  TooltipContainer.displayName = 'TooltipContainer';
@@ -24,7 +24,7 @@ var tooltipZIndex = layers.tooltip();
24
24
  var analyticsAttributes = {
25
25
  componentName: 'tooltip',
26
26
  packageName: "@atlaskit/tooltip",
27
- packageVersion: "18.9.4"
27
+ packageVersion: "19.0.1"
28
28
  };
29
29
 
30
30
  // Inverts motion direction
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tooltip",
3
- "version": "18.9.4",
3
+ "version": "19.0.1",
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/"
@@ -46,10 +46,11 @@
46
46
  "@atlaskit/layering": "^1.0.0",
47
47
  "@atlaskit/motion": "^1.9.0",
48
48
  "@atlaskit/popper": "^6.3.0",
49
- "@atlaskit/portal": "^4.9.0",
49
+ "@atlaskit/portal": "^4.10.0",
50
50
  "@atlaskit/theme": "^14.0.0",
51
- "@atlaskit/tokens": "^2.4.0",
51
+ "@atlaskit/tokens": "^3.0.0",
52
52
  "@babel/runtime": "^7.0.0",
53
+ "@compiled/react": "^0.18.1",
53
54
  "@emotion/react": "^11.7.1",
54
55
  "bind-event-listener": "^3.0.0"
55
56
  },
@@ -61,9 +62,9 @@
61
62
  "@af/accessibility-testing": "*",
62
63
  "@af/integration-testing": "*",
63
64
  "@atlaskit/button": "^20.3.0",
65
+ "@atlaskit/css": "^0.7.0",
64
66
  "@atlaskit/ssr": "*",
65
67
  "@atlaskit/visual-regression": "*",
66
- "@emotion/styled": "^11.0.0",
67
68
  "@testing-library/dom": "^10.1.0",
68
69
  "@testing-library/react": "^12.1.5",
69
70
  "@types/react-redux": "^5.0.0",