@atlaskit/tooltip 17.8.4 → 17.8.5

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,11 @@
1
1
  # @atlaskit/tooltip
2
2
 
3
+ ## 17.8.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`56b444b56a8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56b444b56a8) - Fix a bug where text descenders were cut off at high zoom levels on Windows
8
+
3
9
  ## 17.8.4
4
10
 
5
11
  ### Patch Changes
@@ -32,7 +32,7 @@ var tooltipZIndex = _constants.layers.tooltip();
32
32
  var analyticsAttributes = {
33
33
  componentName: 'tooltip',
34
34
  packageName: "@atlaskit/tooltip",
35
- packageVersion: "17.8.4"
35
+ packageVersion: "17.8.5"
36
36
  };
37
37
 
38
38
  // Inverts motion direction
@@ -26,9 +26,15 @@ var baseStyles = (0, _react2.css)({
26
26
  });
27
27
  var truncateStyles = (0, _react2.css)({
28
28
  maxWidth: '420px',
29
- overflow: 'hidden',
30
29
  textOverflow: 'ellipsis',
31
- whiteSpace: 'nowrap'
30
+ whiteSpace: 'nowrap',
31
+ // Use "clip" overflow to allow ellipses on x-axis without clipping descenders
32
+ '@supports not (overflow-x: clip)': {
33
+ overflow: 'hidden'
34
+ },
35
+ '@supports (overflow-x: clip)': {
36
+ overflowX: 'clip'
37
+ }
32
38
  });
33
39
  var lightStyles = (0, _react2.css)({
34
40
  backgroundColor: "var(--ds-background-neutral-bold, ".concat(_colors.N800, ")"),
@@ -20,7 +20,7 @@ const tooltipZIndex = layers.tooltip();
20
20
  const analyticsAttributes = {
21
21
  componentName: 'tooltip',
22
22
  packageName: "@atlaskit/tooltip",
23
- packageVersion: "17.8.4"
23
+ packageVersion: "17.8.5"
24
24
  };
25
25
 
26
26
  // Inverts motion direction
@@ -18,9 +18,15 @@ const baseStyles = css({
18
18
  });
19
19
  const truncateStyles = css({
20
20
  maxWidth: '420px',
21
- overflow: 'hidden',
22
21
  textOverflow: 'ellipsis',
23
- whiteSpace: 'nowrap'
22
+ whiteSpace: 'nowrap',
23
+ // Use "clip" overflow to allow ellipses on x-axis without clipping descenders
24
+ '@supports not (overflow-x: clip)': {
25
+ overflow: 'hidden'
26
+ },
27
+ '@supports (overflow-x: clip)': {
28
+ overflowX: 'clip'
29
+ }
24
30
  });
25
31
  const lightStyles = css({
26
32
  backgroundColor: `var(--ds-background-neutral-bold, ${N800})`,
@@ -24,7 +24,7 @@ var tooltipZIndex = layers.tooltip();
24
24
  var analyticsAttributes = {
25
25
  componentName: 'tooltip',
26
26
  packageName: "@atlaskit/tooltip",
27
- packageVersion: "17.8.4"
27
+ packageVersion: "17.8.5"
28
28
  };
29
29
 
30
30
  // Inverts motion direction
@@ -18,9 +18,15 @@ var baseStyles = css({
18
18
  });
19
19
  var truncateStyles = css({
20
20
  maxWidth: '420px',
21
- overflow: 'hidden',
22
21
  textOverflow: 'ellipsis',
23
- whiteSpace: 'nowrap'
22
+ whiteSpace: 'nowrap',
23
+ // Use "clip" overflow to allow ellipses on x-axis without clipping descenders
24
+ '@supports not (overflow-x: clip)': {
25
+ overflow: 'hidden'
26
+ },
27
+ '@supports (overflow-x: clip)': {
28
+ overflowX: 'clip'
29
+ }
24
30
  });
25
31
  var lightStyles = css({
26
32
  backgroundColor: "var(--ds-background-neutral-bold, ".concat(N800, ")"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tooltip",
3
- "version": "17.8.4",
3
+ "version": "17.8.5",
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/"
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/popper": "^5.5.0",
46
46
  "@atlaskit/portal": "^4.3.0",
47
47
  "@atlaskit/theme": "^12.5.0",
48
- "@atlaskit/tokens": "^1.11.0",
48
+ "@atlaskit/tokens": "^1.14.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "@emotion/react": "^11.7.1",
51
51
  "bind-event-listener": "^2.1.1",
@@ -57,7 +57,7 @@
57
57
  },
58
58
  "devDependencies": {
59
59
  "@af/accessibility-testing": "*",
60
- "@atlaskit/button": "^16.8.0",
60
+ "@atlaskit/button": "^16.9.0",
61
61
  "@atlaskit/ssr": "*",
62
62
  "@atlaskit/visual-regression": "*",
63
63
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
@@ -0,0 +1,106 @@
1
+ ## API Report File for "@atlaskit/tooltip"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import { ComponentType } from 'react';
8
+ import { CSSProperties } from 'react';
9
+ import { ForwardRefExoticComponent } from 'react';
10
+ import { jsx } from '@emotion/react';
11
+ import { Placement } from '@atlaskit/popper';
12
+ import { ReactNode } from 'react';
13
+ import { RefAttributes } from 'react';
14
+ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
15
+
16
+ // @public (undocumented)
17
+ export type PositionType = 'mouse' | PositionTypeBase;
18
+
19
+ // @public (undocumented)
20
+ type PositionTypeBase = Placement;
21
+
22
+ // @public (undocumented)
23
+ function Tooltip({ children, position, mousePosition, content, truncate, component: Container, tag: TargetContainer, testId, delay, onShow, onHide, hideTooltipOnClick, hideTooltipOnMouseDown, analyticsContext, strategy, }: TooltipProps): jsx.JSX.Element;
24
+
25
+ // @public (undocumented)
26
+ namespace Tooltip {
27
+ var // (undocumented)
28
+ displayName: string;
29
+ }
30
+ export default Tooltip;
31
+
32
+ // @public (undocumented)
33
+ export const TooltipPrimitive: ForwardRefExoticComponent<Pick<TooltipPrimitiveProps, "children" | "className" | "id" | "onMouseOut" | "onMouseOver" | "placement" | "style" | "testId" | "truncate"> & RefAttributes<HTMLDivElement>>;
34
+
35
+ // @public (undocumented)
36
+ export interface TooltipPrimitiveProps {
37
+ // (undocumented)
38
+ children: ReactNode;
39
+ // (undocumented)
40
+ className?: string;
41
+ // (undocumented)
42
+ id?: string;
43
+ // (undocumented)
44
+ onMouseOut?: (e: React.MouseEvent<HTMLElement>) => void;
45
+ // (undocumented)
46
+ onMouseOver?: (e: React.MouseEvent<HTMLElement>) => void;
47
+ // (undocumented)
48
+ placement: PositionType;
49
+ // (undocumented)
50
+ ref: React.Ref<any>;
51
+ // (undocumented)
52
+ style?: CSSProperties;
53
+ // (undocumented)
54
+ testId?: string;
55
+ // (undocumented)
56
+ truncate?: boolean;
57
+ }
58
+
59
+ // @public (undocumented)
60
+ export interface TooltipProps {
61
+ analyticsContext?: Record<string, any>;
62
+ children: ((props: TriggerProps) => ReactNode) | ReactNode;
63
+ component?: ComponentType<TooltipPrimitiveProps>;
64
+ content: (({ update }: {
65
+ update: () => void;
66
+ }) => ReactNode) | ReactNode;
67
+ delay?: number;
68
+ hideTooltipOnClick?: boolean;
69
+ hideTooltipOnMouseDown?: boolean;
70
+ mousePosition?: PositionTypeBase;
71
+ onHide?: (analyticsEvent: UIAnalyticsEvent) => void;
72
+ onShow?: (analyticsEvent: UIAnalyticsEvent) => void;
73
+ position?: PositionType;
74
+ strategy?: 'absolute' | 'fixed' | undefined;
75
+ tag?: React.ComponentType<React.AllHTMLAttributes<HTMLElement> & {
76
+ ref: React.Ref<HTMLElement>;
77
+ }> | keyof JSX.IntrinsicElements;
78
+ testId?: string;
79
+ truncate?: boolean;
80
+ }
81
+
82
+ // @public (undocumented)
83
+ interface TriggerProps {
84
+ // (undocumented)
85
+ 'aria-describedby'?: string | undefined;
86
+ // (undocumented)
87
+ onBlur: (event: React.FocusEvent<HTMLElement>) => void;
88
+ // (undocumented)
89
+ onClick: (event: React.MouseEvent<HTMLElement>) => void;
90
+ // (undocumented)
91
+ onFocus: (event: React.FocusEvent<HTMLElement>) => void;
92
+ // (undocumented)
93
+ onMouseDown: (event: React.MouseEvent<HTMLElement>) => void;
94
+ // (undocumented)
95
+ onMouseMove: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
96
+ // (undocumented)
97
+ onMouseOut: (event: React.MouseEvent<HTMLElement>) => void;
98
+ // (undocumented)
99
+ onMouseOver: (event: React.MouseEvent<HTMLElement>) => void;
100
+ // (undocumented)
101
+ ref: (node: HTMLElement | null) => void;
102
+ }
103
+
104
+ // (No @packageDocumentation comment for this package)
105
+
106
+ ```
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/tooltip",
3
- "version": "17.8.4",
4
- "sideEffects": false
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/tooltip",
3
- "version": "17.8.4",
4
- "sideEffects": false
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/tooltip",
3
- "version": "17.8.4",
4
- "sideEffects": false
5
- }