@atlaskit/tooltip 20.7.1 → 20.8.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 +12 -0
- package/dist/cjs/tooltip-container.compiled.css +0 -2
- package/dist/cjs/tooltip-container.js +2 -4
- package/dist/cjs/tooltip-primitive.js +1 -2
- package/dist/cjs/tooltip.js +1 -1
- package/dist/es2019/tooltip-container.compiled.css +0 -2
- package/dist/es2019/tooltip-container.js +2 -4
- package/dist/es2019/tooltip-primitive.js +1 -2
- package/dist/es2019/tooltip.js +1 -1
- package/dist/esm/tooltip-container.compiled.css +0 -2
- package/dist/esm/tooltip-container.js +2 -4
- package/dist/esm/tooltip-primitive.js +1 -2
- package/dist/esm/tooltip.js +1 -1
- package/dist/types/types.d.ts +0 -2
- package/dist/types-ts4.5/types.d.ts +0 -2
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/tooltip
|
|
2
2
|
|
|
3
|
+
## 20.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`8f79c1a030071`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8f79c1a030071) -
|
|
8
|
+
The built-in support for displaying keyboard shortcuts via the `shortcut` prop is now available
|
|
9
|
+
for use. It was previously behind the `platform-dst-tooltip-shortcuts` feature flag, which has now
|
|
10
|
+
been cleaned up.
|
|
11
|
+
|
|
12
|
+
The top and bottom padding of the tooltip container has also been increased from `2px` to `4px` -
|
|
13
|
+
this change previously also behind the same feature flag.
|
|
14
|
+
|
|
3
15
|
## 20.7.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -6,10 +6,8 @@
|
|
|
6
6
|
._1e02ze3t{inset-inline-start:var(--ds-space-0,0)}
|
|
7
7
|
._1i4q1hna{overflow-wrap:break-word}
|
|
8
8
|
._1q511b66{padding-block-start:var(--ds-space-050,4px)}
|
|
9
|
-
._1q51v77o{padding-block-start:var(--ds-space-025,2px)}
|
|
10
9
|
._1reo15vq{overflow-x:hidden}
|
|
11
10
|
._85i51b66{padding-block-end:var(--ds-space-050,4px)}
|
|
12
|
-
._85i5v77o{padding-block-end:var(--ds-space-025,2px)}
|
|
13
11
|
._bfhkgkf6{background-color:var(--ds-background-neutral-bold,#172b4d)}
|
|
14
12
|
._bozg12x7{padding-inline-start:var(--ds-space-075,6px)}
|
|
15
13
|
._o5721q9c{white-space:nowrap}
|
|
@@ -11,12 +11,10 @@ require("./tooltip-container.compiled.css");
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var React = _react;
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _tooltipPrimitive = _interopRequireDefault(require("./tooltip-primitive"));
|
|
16
15
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
17
16
|
var styles = {
|
|
18
|
-
base: "_2rkofajl _11c8dcr7 _vchhusvi _p12fp3fh _bfhkgkf6 _syaz15cr _152tze3t _1e02ze3t _1i4q1hna
|
|
19
|
-
baseRefreshedPadding: "_1q511b66 _85i51b66",
|
|
17
|
+
base: "_2rkofajl _11c8dcr7 _vchhusvi _p12fp3fh _bfhkgkf6 _syaz15cr _152tze3t _1e02ze3t _1i4q1hna _1q511b66 _85i51b66 _y4ti12x7 _bozg12x7 _slp31hna",
|
|
20
18
|
truncate: "_1reo15vq _18m915vq _p12f1pna _1bto1l2s _o5721q9c"
|
|
21
19
|
};
|
|
22
20
|
|
|
@@ -42,7 +40,7 @@ var TooltipContainer = /*#__PURE__*/(0, _react.forwardRef)(function TooltipConta
|
|
|
42
40
|
style: style
|
|
43
41
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
44
42
|
,
|
|
45
|
-
className: (0, _runtime.ax)([styles.base,
|
|
43
|
+
className: (0, _runtime.ax)([styles.base, truncate && styles.truncate, className]),
|
|
46
44
|
placement: placement,
|
|
47
45
|
testId: testId,
|
|
48
46
|
id: id,
|
|
@@ -10,7 +10,6 @@ require("./tooltip-primitive.compiled.css");
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var React = _react;
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _tooltipShortcut = require("./tooltip-shortcut");
|
|
15
14
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
15
|
var primitiveStyles = null;
|
|
@@ -47,7 +46,7 @@ var TooltipPrimitive = /*#__PURE__*/(0, _react.forwardRef)(function TooltipPrimi
|
|
|
47
46
|
"data-placement": placement,
|
|
48
47
|
"data-testid": testId,
|
|
49
48
|
id: id
|
|
50
|
-
}, children, shortcut &&
|
|
49
|
+
}, children, shortcut && /*#__PURE__*/React.createElement(_tooltipShortcut.TooltipShortcut, {
|
|
51
50
|
shortcut: shortcut
|
|
52
51
|
})));
|
|
53
52
|
});
|
package/dist/cjs/tooltip.js
CHANGED
|
@@ -6,10 +6,8 @@
|
|
|
6
6
|
._1e02ze3t{inset-inline-start:var(--ds-space-0,0)}
|
|
7
7
|
._1i4q1hna{overflow-wrap:break-word}
|
|
8
8
|
._1q511b66{padding-block-start:var(--ds-space-050,4px)}
|
|
9
|
-
._1q51v77o{padding-block-start:var(--ds-space-025,2px)}
|
|
10
9
|
._1reo15vq{overflow-x:hidden}
|
|
11
10
|
._85i51b66{padding-block-end:var(--ds-space-050,4px)}
|
|
12
|
-
._85i5v77o{padding-block-end:var(--ds-space-025,2px)}
|
|
13
11
|
._bfhkgkf6{background-color:var(--ds-background-neutral-bold,#172b4d)}
|
|
14
12
|
._bozg12x7{padding-inline-start:var(--ds-space-075,6px)}
|
|
15
13
|
._o5721q9c{white-space:nowrap}
|
|
@@ -3,11 +3,9 @@ import "./tooltip-container.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import TooltipPrimitive from './tooltip-primitive';
|
|
8
7
|
const styles = {
|
|
9
|
-
base: "_2rkofajl _11c8dcr7 _vchhusvi _p12fp3fh _bfhkgkf6 _syaz15cr _152tze3t _1e02ze3t _1i4q1hna
|
|
10
|
-
baseRefreshedPadding: "_1q511b66 _85i51b66",
|
|
8
|
+
base: "_2rkofajl _11c8dcr7 _vchhusvi _p12fp3fh _bfhkgkf6 _syaz15cr _152tze3t _1e02ze3t _1i4q1hna _1q511b66 _85i51b66 _y4ti12x7 _bozg12x7 _slp31hna",
|
|
11
9
|
truncate: "_1reo15vq _18m915vq _p12f1pna _1bto1l2s _o5721q9c"
|
|
12
10
|
};
|
|
13
11
|
|
|
@@ -34,7 +32,7 @@ const TooltipContainer = /*#__PURE__*/forwardRef(function TooltipContainer({
|
|
|
34
32
|
style: style
|
|
35
33
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
36
34
|
,
|
|
37
|
-
className: ax([styles.base,
|
|
35
|
+
className: ax([styles.base, truncate && styles.truncate, className]),
|
|
38
36
|
placement: placement,
|
|
39
37
|
testId: testId,
|
|
40
38
|
id: id,
|
|
@@ -3,7 +3,6 @@ import "./tooltip-primitive.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { TooltipShortcut } from './tooltip-shortcut';
|
|
8
7
|
const primitiveStyles = null;
|
|
9
8
|
|
|
@@ -40,7 +39,7 @@ const TooltipPrimitive = /*#__PURE__*/forwardRef(function TooltipPrimitive({
|
|
|
40
39
|
"data-placement": placement,
|
|
41
40
|
"data-testid": testId,
|
|
42
41
|
id: id
|
|
43
|
-
}, children, shortcut &&
|
|
42
|
+
}, children, shortcut && /*#__PURE__*/React.createElement(TooltipShortcut, {
|
|
44
43
|
shortcut: shortcut
|
|
45
44
|
})));
|
|
46
45
|
});
|
package/dist/es2019/tooltip.js
CHANGED
|
@@ -6,10 +6,8 @@
|
|
|
6
6
|
._1e02ze3t{inset-inline-start:var(--ds-space-0,0)}
|
|
7
7
|
._1i4q1hna{overflow-wrap:break-word}
|
|
8
8
|
._1q511b66{padding-block-start:var(--ds-space-050,4px)}
|
|
9
|
-
._1q51v77o{padding-block-start:var(--ds-space-025,2px)}
|
|
10
9
|
._1reo15vq{overflow-x:hidden}
|
|
11
10
|
._85i51b66{padding-block-end:var(--ds-space-050,4px)}
|
|
12
|
-
._85i5v77o{padding-block-end:var(--ds-space-025,2px)}
|
|
13
11
|
._bfhkgkf6{background-color:var(--ds-background-neutral-bold,#172b4d)}
|
|
14
12
|
._bozg12x7{padding-inline-start:var(--ds-space-075,6px)}
|
|
15
13
|
._o5721q9c{white-space:nowrap}
|
|
@@ -3,11 +3,9 @@ import "./tooltip-container.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import TooltipPrimitive from './tooltip-primitive';
|
|
8
7
|
var styles = {
|
|
9
|
-
base: "_2rkofajl _11c8dcr7 _vchhusvi _p12fp3fh _bfhkgkf6 _syaz15cr _152tze3t _1e02ze3t _1i4q1hna
|
|
10
|
-
baseRefreshedPadding: "_1q511b66 _85i51b66",
|
|
8
|
+
base: "_2rkofajl _11c8dcr7 _vchhusvi _p12fp3fh _bfhkgkf6 _syaz15cr _152tze3t _1e02ze3t _1i4q1hna _1q511b66 _85i51b66 _y4ti12x7 _bozg12x7 _slp31hna",
|
|
11
9
|
truncate: "_1reo15vq _18m915vq _p12f1pna _1bto1l2s _o5721q9c"
|
|
12
10
|
};
|
|
13
11
|
|
|
@@ -33,7 +31,7 @@ var TooltipContainer = /*#__PURE__*/forwardRef(function TooltipContainer(_ref, r
|
|
|
33
31
|
style: style
|
|
34
32
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
35
33
|
,
|
|
36
|
-
className: ax([styles.base,
|
|
34
|
+
className: ax([styles.base, truncate && styles.truncate, className]),
|
|
37
35
|
placement: placement,
|
|
38
36
|
testId: testId,
|
|
39
37
|
id: id,
|
|
@@ -3,7 +3,6 @@ import "./tooltip-primitive.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { TooltipShortcut } from './tooltip-shortcut';
|
|
8
7
|
var primitiveStyles = null;
|
|
9
8
|
|
|
@@ -39,7 +38,7 @@ var TooltipPrimitive = /*#__PURE__*/forwardRef(function TooltipPrimitive(_ref, r
|
|
|
39
38
|
"data-placement": placement,
|
|
40
39
|
"data-testid": testId,
|
|
41
40
|
id: id
|
|
42
|
-
}, children, shortcut &&
|
|
41
|
+
}, children, shortcut && /*#__PURE__*/React.createElement(TooltipShortcut, {
|
|
43
42
|
shortcut: shortcut
|
|
44
43
|
})));
|
|
45
44
|
});
|
package/dist/esm/tooltip.js
CHANGED
package/dist/types/types.d.ts
CHANGED
|
@@ -136,8 +136,6 @@ export interface TooltipProps {
|
|
|
136
136
|
* Display a keyboard shortcut in the tooltip.
|
|
137
137
|
*
|
|
138
138
|
* Keys will be displayed as individual keyboard key segments after the tooltip content.
|
|
139
|
-
*
|
|
140
|
-
* This prop requires the `platform-dst-tooltip-shortcuts` feature flag to be enabled.
|
|
141
139
|
*/
|
|
142
140
|
shortcut?: string[];
|
|
143
141
|
}
|
|
@@ -136,8 +136,6 @@ export interface TooltipProps {
|
|
|
136
136
|
* Display a keyboard shortcut in the tooltip.
|
|
137
137
|
*
|
|
138
138
|
* Keys will be displayed as individual keyboard key segments after the tooltip content.
|
|
139
|
-
*
|
|
140
|
-
* This prop requires the `platform-dst-tooltip-shortcuts` feature flag to be enabled.
|
|
141
139
|
*/
|
|
142
140
|
shortcut?: string[];
|
|
143
141
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/tooltip",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.8.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/"
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
36
|
-
"@atlaskit/ds-lib": "^5.
|
|
36
|
+
"@atlaskit/ds-lib": "^5.2.0",
|
|
37
37
|
"@atlaskit/layering": "^3.2.0",
|
|
38
38
|
"@atlaskit/motion": "^5.3.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
40
|
"@atlaskit/popper": "^7.1.0",
|
|
41
41
|
"@atlaskit/portal": "^5.1.0",
|
|
42
42
|
"@atlaskit/theme": "^21.0.0",
|
|
43
|
-
"@atlaskit/tokens": "^7.
|
|
43
|
+
"@atlaskit/tokens": "^7.1.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"@compiled/react": "^0.18.6",
|
|
46
46
|
"bind-event-listener": "^3.0.0"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@atlaskit/primitives": "^16.1.0",
|
|
62
62
|
"@atlaskit/section-message": "^8.9.0",
|
|
63
63
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
64
|
-
"@atlassian/ssr-tests": "
|
|
64
|
+
"@atlassian/ssr-tests": "workspace:^",
|
|
65
65
|
"@atlassian/testing-library": "^0.4.0",
|
|
66
66
|
"@testing-library/react": "^13.4.0",
|
|
67
67
|
"react-dom": "^18.2.0",
|
|
@@ -100,9 +100,6 @@
|
|
|
100
100
|
"type": "boolean",
|
|
101
101
|
"referenceOnly": true
|
|
102
102
|
},
|
|
103
|
-
"platform-dst-tooltip-shortcuts": {
|
|
104
|
-
"type": "boolean"
|
|
105
|
-
},
|
|
106
103
|
"should-render-to-parent-should-be-true-design-syst": {
|
|
107
104
|
"type": "boolean"
|
|
108
105
|
}
|