@atlaskit/tooltip 20.8.2 → 20.10.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,23 @@
1
1
  # @atlaskit/tooltip
2
2
 
3
+ ## 20.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`e273fa0610764`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e273fa0610764) -
8
+ The keyboard shortcut `font` has been updated to use regular fonts instead of monospace fonts, for
9
+ improved readability and distinction between characters such as the letter O and number 0. It will
10
+ now use the `font.body.small` font token.
11
+
12
+ This change is behind the feature gate `platform-tooltip-shortcuts-regular-font`.
13
+
14
+ ## 20.9.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [`f4cdda6ef6ca0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f4cdda6ef6ca0) -
19
+ Removed FG that improves tooltip visibility behavior on focus
20
+
3
21
  ## 20.8.2
4
22
 
5
23
  ### Patch Changes
@@ -1,3 +1,4 @@
1
+ ._11c81o8v{font:var(--ds-font-body-small,normal 400 11px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
1
2
  ._11c81u0j{font:var(--ds-font-code,normal 400 .875em/1 ui-monospace,Menlo,"Segoe UI Mono","Ubuntu Mono",monospace)}
2
3
  ._2rkolb4i{border-radius:var(--ds-radius-xsmall,2px)}
3
4
  ._zulpv77o{gap:var(--ds-space-025,2px)}
@@ -9,10 +9,12 @@ exports.TooltipShortcut = void 0;
9
9
  require("./tooltip-shortcut.compiled.css");
10
10
  var React = _interopRequireWildcard(require("react"));
11
11
  var _runtime = require("@compiled/react/runtime");
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
13
  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); }
13
14
  var styles = {
14
15
  shortcutSegmentsContainer: "_zulpv77o _1e0c1txw _1q511b66 _85i5v77o",
15
- shortcutSegment: "_11c81u0j _2rkolb4i _1dqonqa1 _189ee4h9 _1h6d1ihb _1e0c1txw _4cvr1h6o _4t3i1k92 _vchhusvi _1q51v77o _85i5v77o _bozg12x7 _y4ti12x7 _16qsn7od _1254n7od _cgnln7od _syazn7od _ahbqn7od _12l2n7od _1pfhn7od _6rthn7od _1ul9n7od _w19jn7od _bfhk261p"
16
+ shortcutSegment: "_11c81u0j _2rkolb4i _1dqonqa1 _189ee4h9 _1h6d1ihb _1e0c1txw _4cvr1h6o _4t3i1k92 _vchhusvi _1q51v77o _85i5v77o _bozg12x7 _y4ti12x7 _16qsn7od _1254n7od _cgnln7od _syazn7od _ahbqn7od _12l2n7od _1pfhn7od _6rthn7od _1ul9n7od _w19jn7od _bfhk261p",
17
+ regularFont: "_11c81o8v"
16
18
  };
17
19
  /**
18
20
  * __Tooltip shortcut__
@@ -27,7 +29,7 @@ var TooltipShortcut = exports.TooltipShortcut = function TooltipShortcut(_ref) {
27
29
  }, shortcut.map(function (segment, index) {
28
30
  return /*#__PURE__*/React.createElement("kbd", {
29
31
  key: "".concat(segment, "-").concat(index),
30
- className: (0, _runtime.ax)([styles.shortcutSegment])
32
+ className: (0, _runtime.ax)([styles.shortcutSegment, (0, _platformFeatureFlags.fg)('platform-tooltip-shortcuts-regular-font') && styles.regularFont])
31
33
  }, segment);
32
34
  }));
33
35
  };
@@ -17,7 +17,6 @@ var _useCloseOnEscapePress = _interopRequireDefault(require("@atlaskit/ds-lib/us
17
17
  var _useStableRef = _interopRequireDefault(require("@atlaskit/ds-lib/use-stable-ref"));
18
18
  var _openLayerObserver = require("@atlaskit/layering/experimental/open-layer-observer");
19
19
  var _motion = require("@atlaskit/motion");
20
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
21
20
  var _popper = require("@atlaskit/popper");
22
21
  var _portal = _interopRequireDefault(require("@atlaskit/portal"));
23
22
  var _constants = require("@atlaskit/theme/constants");
@@ -33,7 +32,7 @@ var tooltipZIndex = _constants.layers.tooltip();
33
32
  var analyticsAttributes = {
34
33
  componentName: 'tooltip',
35
34
  packageName: "@atlaskit/tooltip",
36
- packageVersion: "0.0.0-development"
35
+ packageVersion: "20.9.0"
37
36
  };
38
37
 
39
38
  // Inverts motion direction
@@ -379,7 +378,7 @@ function Tooltip(_ref) {
379
378
  // Prevents tooltips from showing when focus is not visible,
380
379
  // i.e., when focus is moved onto tooltip trigger inside a popup on open
381
380
  try {
382
- if (!e.target.matches(':focus-visible') && (0, _platformFeatureFlags.fg)('platform-tooltip-focus-visible-new')) {
381
+ if (!e.target.matches(':focus-visible')) {
383
382
  return;
384
383
  }
385
384
  } catch (_) {
@@ -1,3 +1,4 @@
1
+ ._11c81o8v{font:var(--ds-font-body-small,normal 400 11px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
1
2
  ._11c81u0j{font:var(--ds-font-code,normal 400 .875em/1 ui-monospace,Menlo,"Segoe UI Mono","Ubuntu Mono",monospace)}
2
3
  ._2rkolb4i{border-radius:var(--ds-radius-xsmall,2px)}
3
4
  ._zulpv77o{gap:var(--ds-space-025,2px)}
@@ -2,9 +2,11 @@
2
2
  import "./tooltip-shortcut.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
+ import { fg } from '@atlaskit/platform-feature-flags';
5
6
  const styles = {
6
7
  shortcutSegmentsContainer: "_zulpv77o _1e0c1txw _1q511b66 _85i5v77o",
7
- shortcutSegment: "_11c81u0j _2rkolb4i _1dqonqa1 _189ee4h9 _1h6d1ihb _1e0c1txw _4cvr1h6o _4t3i1k92 _vchhusvi _1q51v77o _85i5v77o _bozg12x7 _y4ti12x7 _16qsn7od _1254n7od _cgnln7od _syazn7od _ahbqn7od _12l2n7od _1pfhn7od _6rthn7od _1ul9n7od _w19jn7od _bfhk261p"
8
+ shortcutSegment: "_11c81u0j _2rkolb4i _1dqonqa1 _189ee4h9 _1h6d1ihb _1e0c1txw _4cvr1h6o _4t3i1k92 _vchhusvi _1q51v77o _85i5v77o _bozg12x7 _y4ti12x7 _16qsn7od _1254n7od _cgnln7od _syazn7od _ahbqn7od _12l2n7od _1pfhn7od _6rthn7od _1ul9n7od _w19jn7od _bfhk261p",
9
+ regularFont: "_11c81o8v"
8
10
  };
9
11
  /**
10
12
  * __Tooltip shortcut__
@@ -19,6 +21,6 @@ export const TooltipShortcut = ({
19
21
  className: ax([styles.shortcutSegmentsContainer])
20
22
  }, shortcut.map((segment, index) => /*#__PURE__*/React.createElement("kbd", {
21
23
  key: `${segment}-${index}`,
22
- className: ax([styles.shortcutSegment])
24
+ className: ax([styles.shortcutSegment, fg('platform-tooltip-shortcuts-regular-font') && styles.regularFont])
23
25
  }, segment)));
24
26
  };
@@ -7,7 +7,6 @@ import useCloseOnEscapePress from '@atlaskit/ds-lib/use-close-on-escape-press';
7
7
  import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
8
8
  import { useNotifyOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
9
9
  import { ExitingPersistence, FadeIn } from '@atlaskit/motion';
10
- import { fg } from '@atlaskit/platform-feature-flags';
11
10
  import { Popper } from '@atlaskit/popper';
12
11
  import Portal from '@atlaskit/portal';
13
12
  import { layers } from '@atlaskit/theme/constants';
@@ -20,7 +19,7 @@ const tooltipZIndex = layers.tooltip();
20
19
  const analyticsAttributes = {
21
20
  componentName: 'tooltip',
22
21
  packageName: "@atlaskit/tooltip",
23
- packageVersion: "0.0.0-development"
22
+ packageVersion: "20.9.0"
24
23
  };
25
24
 
26
25
  // Inverts motion direction
@@ -355,7 +354,7 @@ function Tooltip({
355
354
  // Prevents tooltips from showing when focus is not visible,
356
355
  // i.e., when focus is moved onto tooltip trigger inside a popup on open
357
356
  try {
358
- if (!e.target.matches(':focus-visible') && fg('platform-tooltip-focus-visible-new')) {
357
+ if (!e.target.matches(':focus-visible')) {
359
358
  return;
360
359
  }
361
360
  } catch (_) {
@@ -1,3 +1,4 @@
1
+ ._11c81o8v{font:var(--ds-font-body-small,normal 400 11px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
1
2
  ._11c81u0j{font:var(--ds-font-code,normal 400 .875em/1 ui-monospace,Menlo,"Segoe UI Mono","Ubuntu Mono",monospace)}
2
3
  ._2rkolb4i{border-radius:var(--ds-radius-xsmall,2px)}
3
4
  ._zulpv77o{gap:var(--ds-space-025,2px)}
@@ -2,9 +2,11 @@
2
2
  import "./tooltip-shortcut.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
+ import { fg } from '@atlaskit/platform-feature-flags';
5
6
  var styles = {
6
7
  shortcutSegmentsContainer: "_zulpv77o _1e0c1txw _1q511b66 _85i5v77o",
7
- shortcutSegment: "_11c81u0j _2rkolb4i _1dqonqa1 _189ee4h9 _1h6d1ihb _1e0c1txw _4cvr1h6o _4t3i1k92 _vchhusvi _1q51v77o _85i5v77o _bozg12x7 _y4ti12x7 _16qsn7od _1254n7od _cgnln7od _syazn7od _ahbqn7od _12l2n7od _1pfhn7od _6rthn7od _1ul9n7od _w19jn7od _bfhk261p"
8
+ shortcutSegment: "_11c81u0j _2rkolb4i _1dqonqa1 _189ee4h9 _1h6d1ihb _1e0c1txw _4cvr1h6o _4t3i1k92 _vchhusvi _1q51v77o _85i5v77o _bozg12x7 _y4ti12x7 _16qsn7od _1254n7od _cgnln7od _syazn7od _ahbqn7od _12l2n7od _1pfhn7od _6rthn7od _1ul9n7od _w19jn7od _bfhk261p",
9
+ regularFont: "_11c81o8v"
8
10
  };
9
11
  /**
10
12
  * __Tooltip shortcut__
@@ -19,7 +21,7 @@ export var TooltipShortcut = function TooltipShortcut(_ref) {
19
21
  }, shortcut.map(function (segment, index) {
20
22
  return /*#__PURE__*/React.createElement("kbd", {
21
23
  key: "".concat(segment, "-").concat(index),
22
- className: ax([styles.shortcutSegment])
24
+ className: ax([styles.shortcutSegment, fg('platform-tooltip-shortcuts-regular-font') && styles.regularFont])
23
25
  }, segment);
24
26
  }));
25
27
  };
@@ -11,7 +11,6 @@ import useCloseOnEscapePress from '@atlaskit/ds-lib/use-close-on-escape-press';
11
11
  import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
12
12
  import { useNotifyOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
13
13
  import { ExitingPersistence, FadeIn } from '@atlaskit/motion';
14
- import { fg } from '@atlaskit/platform-feature-flags';
15
14
  import { Popper } from '@atlaskit/popper';
16
15
  import Portal from '@atlaskit/portal';
17
16
  import { layers } from '@atlaskit/theme/constants';
@@ -24,7 +23,7 @@ var tooltipZIndex = layers.tooltip();
24
23
  var analyticsAttributes = {
25
24
  componentName: 'tooltip',
26
25
  packageName: "@atlaskit/tooltip",
27
- packageVersion: "0.0.0-development"
26
+ packageVersion: "20.9.0"
28
27
  };
29
28
 
30
29
  // Inverts motion direction
@@ -370,7 +369,7 @@ function Tooltip(_ref) {
370
369
  // Prevents tooltips from showing when focus is not visible,
371
370
  // i.e., when focus is moved onto tooltip trigger inside a popup on open
372
371
  try {
373
- if (!e.target.matches(':focus-visible') && fg('platform-tooltip-focus-visible-new')) {
372
+ if (!e.target.matches(':focus-visible')) {
374
373
  return;
375
374
  }
376
375
  } catch (_) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tooltip",
3
- "version": "20.8.2",
3
+ "version": "20.10.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/"
@@ -34,7 +34,7 @@
34
34
  "dependencies": {
35
35
  "@atlaskit/analytics-next": "^11.1.0",
36
36
  "@atlaskit/ds-lib": "^5.2.0",
37
- "@atlaskit/layering": "^3.3.0",
37
+ "@atlaskit/layering": "^3.4.0",
38
38
  "@atlaskit/motion": "^5.3.0",
39
39
  "@atlaskit/platform-feature-flags": "^1.1.0",
40
40
  "@atlaskit/popper": "^7.1.0",
@@ -93,15 +93,15 @@
93
93
  },
94
94
  "homepage": "https://atlassian.design/components/tooltip/",
95
95
  "platform-feature-flags": {
96
- "platform-tooltip-focus-visible-new": {
97
- "type": "boolean"
98
- },
99
96
  "platform-component-visual-refresh": {
100
97
  "type": "boolean",
101
98
  "referenceOnly": true
102
99
  },
103
100
  "should-render-to-parent-should-be-true-design-syst": {
104
101
  "type": "boolean"
102
+ },
103
+ "platform-tooltip-shortcuts-regular-font": {
104
+ "type": "boolean"
105
105
  }
106
106
  }
107
107
  }