@zendeskgarden/react-tooltips 8.62.2 → 8.63.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/dist/index.cjs.js
CHANGED
|
@@ -79,7 +79,7 @@ function getArrowPosition(popperPlacement) {
|
|
|
79
79
|
const COMPONENT_ID$2 = 'tooltip.paragraph';
|
|
80
80
|
const StyledParagraph = styled__default.default.p.attrs({
|
|
81
81
|
'data-garden-id': COMPONENT_ID$2,
|
|
82
|
-
'data-garden-version': '8.
|
|
82
|
+
'data-garden-version': '8.63.1'
|
|
83
83
|
}).withConfig({
|
|
84
84
|
displayName: "StyledParagraph",
|
|
85
85
|
componentId: "sc-wuqkfc-0"
|
|
@@ -91,7 +91,7 @@ StyledParagraph.defaultProps = {
|
|
|
91
91
|
const COMPONENT_ID$1 = 'tooltip.title';
|
|
92
92
|
const StyledTitle = styled__default.default.strong.attrs({
|
|
93
93
|
'data-garden-id': COMPONENT_ID$1,
|
|
94
|
-
'data-garden-version': '8.
|
|
94
|
+
'data-garden-version': '8.63.1'
|
|
95
95
|
}).withConfig({
|
|
96
96
|
displayName: "StyledTitle",
|
|
97
97
|
componentId: "sc-vnjcvz-0"
|
|
@@ -188,7 +188,7 @@ const colorStyles = _ref2 => {
|
|
|
188
188
|
};
|
|
189
189
|
const StyledTooltip = styled__default.default.div.attrs({
|
|
190
190
|
'data-garden-id': COMPONENT_ID,
|
|
191
|
-
'data-garden-version': '8.
|
|
191
|
+
'data-garden-version': '8.63.1'
|
|
192
192
|
}).withConfig({
|
|
193
193
|
displayName: "StyledTooltip",
|
|
194
194
|
componentId: "sc-gzzjq4-0"
|
|
@@ -229,7 +229,9 @@ const Tooltip = _ref => {
|
|
|
229
229
|
isVisible: externalIsVisible,
|
|
230
230
|
...otherProps
|
|
231
231
|
} = _ref;
|
|
232
|
-
const
|
|
232
|
+
const {
|
|
233
|
+
rtl
|
|
234
|
+
} = React.useContext(styled.ThemeContext);
|
|
233
235
|
const scheduleUpdateRef = React.useRef();
|
|
234
236
|
const {
|
|
235
237
|
isVisible,
|
|
@@ -248,7 +250,7 @@ const Tooltip = _ref => {
|
|
|
248
250
|
scheduleUpdateRef.current();
|
|
249
251
|
}
|
|
250
252
|
}, [controlledIsVisible, content]);
|
|
251
|
-
const popperPlacement =
|
|
253
|
+
const popperPlacement = rtl ? getRtlPopperPlacement(placement) : getPopperPlacement(placement);
|
|
252
254
|
const singleChild = React__default.default.Children.only(children);
|
|
253
255
|
const modifiers = {
|
|
254
256
|
preventOverflow: {
|
package/dist/index.esm.js
CHANGED
|
@@ -70,7 +70,7 @@ function getArrowPosition(popperPlacement) {
|
|
|
70
70
|
const COMPONENT_ID$2 = 'tooltip.paragraph';
|
|
71
71
|
const StyledParagraph = styled.p.attrs({
|
|
72
72
|
'data-garden-id': COMPONENT_ID$2,
|
|
73
|
-
'data-garden-version': '8.
|
|
73
|
+
'data-garden-version': '8.63.1'
|
|
74
74
|
}).withConfig({
|
|
75
75
|
displayName: "StyledParagraph",
|
|
76
76
|
componentId: "sc-wuqkfc-0"
|
|
@@ -82,7 +82,7 @@ StyledParagraph.defaultProps = {
|
|
|
82
82
|
const COMPONENT_ID$1 = 'tooltip.title';
|
|
83
83
|
const StyledTitle = styled.strong.attrs({
|
|
84
84
|
'data-garden-id': COMPONENT_ID$1,
|
|
85
|
-
'data-garden-version': '8.
|
|
85
|
+
'data-garden-version': '8.63.1'
|
|
86
86
|
}).withConfig({
|
|
87
87
|
displayName: "StyledTitle",
|
|
88
88
|
componentId: "sc-vnjcvz-0"
|
|
@@ -179,7 +179,7 @@ const colorStyles = _ref2 => {
|
|
|
179
179
|
};
|
|
180
180
|
const StyledTooltip = styled.div.attrs({
|
|
181
181
|
'data-garden-id': COMPONENT_ID,
|
|
182
|
-
'data-garden-version': '8.
|
|
182
|
+
'data-garden-version': '8.63.1'
|
|
183
183
|
}).withConfig({
|
|
184
184
|
displayName: "StyledTooltip",
|
|
185
185
|
componentId: "sc-gzzjq4-0"
|
|
@@ -220,7 +220,9 @@ const Tooltip = _ref => {
|
|
|
220
220
|
isVisible: externalIsVisible,
|
|
221
221
|
...otherProps
|
|
222
222
|
} = _ref;
|
|
223
|
-
const
|
|
223
|
+
const {
|
|
224
|
+
rtl
|
|
225
|
+
} = useContext(ThemeContext);
|
|
224
226
|
const scheduleUpdateRef = useRef();
|
|
225
227
|
const {
|
|
226
228
|
isVisible,
|
|
@@ -239,7 +241,7 @@ const Tooltip = _ref => {
|
|
|
239
241
|
scheduleUpdateRef.current();
|
|
240
242
|
}
|
|
241
243
|
}, [controlledIsVisible, content]);
|
|
242
|
-
const popperPlacement =
|
|
244
|
+
const popperPlacement = rtl ? getRtlPopperPlacement(placement) : getPopperPlacement(placement);
|
|
243
245
|
const singleChild = React.Children.only(children);
|
|
244
246
|
const modifiers = {
|
|
245
247
|
preventOverflow: {
|
|
@@ -8,7 +8,7 @@ import { DefaultTheme } from 'styled-components';
|
|
|
8
8
|
import { ITooltipProps, POPPER_PLACEMENT } from '../types';
|
|
9
9
|
interface IStyledTooltipProps extends Pick<ITooltipProps, 'hasArrow' | 'size' | 'zIndex'> {
|
|
10
10
|
/** All valid [Popper.JS Placements](https://popper.js.org/popper-documentation.html#Popper.placements) */
|
|
11
|
-
placement: typeof POPPER_PLACEMENT[number];
|
|
11
|
+
placement: (typeof POPPER_PLACEMENT)[number];
|
|
12
12
|
type: NonNullable<ITooltipProps['type']>;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
@@ -10,8 +10,8 @@ export declare const PLACEMENT: readonly ["auto", "top", "top-start", "top-end",
|
|
|
10
10
|
export declare const POPPER_PLACEMENT: readonly ["auto", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "right", "right-start", "right-end", "left", "left-start", "left-end"];
|
|
11
11
|
export declare const SIZE: readonly ["small", "medium", "large", "extra-large"];
|
|
12
12
|
export declare const TYPE: readonly ["light", "dark"];
|
|
13
|
-
export
|
|
14
|
-
export
|
|
13
|
+
export type GardenPlacement = (typeof PLACEMENT)[number];
|
|
14
|
+
export type PopperPlacement = (typeof POPPER_PLACEMENT)[number];
|
|
15
15
|
export interface ITooltipProps extends HTMLAttributes<HTMLDivElement> {
|
|
16
16
|
/** Appends the tooltip to the element provided */
|
|
17
17
|
appendToNode?: Element;
|
|
@@ -30,9 +30,9 @@ export interface ITooltipProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
30
30
|
/** Passes configurations to the [Popper instance](https://popper.js.org/docs/v2/modifiers/) */
|
|
31
31
|
popperModifiers?: Modifiers;
|
|
32
32
|
/** Adjusts the padding and font size */
|
|
33
|
-
size?: typeof SIZE[number];
|
|
33
|
+
size?: (typeof SIZE)[number];
|
|
34
34
|
/** Specifies the tooltip type */
|
|
35
|
-
type?: typeof TYPE[number];
|
|
35
|
+
type?: (typeof TYPE)[number];
|
|
36
36
|
/** Sets the `z-index` of the tooltip */
|
|
37
37
|
zIndex?: number | string;
|
|
38
38
|
/** Displays the tooltip on initial render */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-tooltips",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.63.1",
|
|
4
4
|
"description": "Collection of components and render prop containers relating to Tooltips in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"types": "dist/typings/index.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@zendeskgarden/container-tooltip": "^1.0.0",
|
|
25
|
-
"@zendeskgarden/container-utilities": "^0.
|
|
25
|
+
"@zendeskgarden/container-utilities": "^1.0.0",
|
|
26
26
|
"polished": "^4.0.0",
|
|
27
27
|
"prop-types": "^15.5.7",
|
|
28
28
|
"react-merge-refs": "^1.1.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"styled-components": "^4.2.0 || ^5.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@zendeskgarden/react-theming": "^8.
|
|
38
|
+
"@zendeskgarden/react-theming": "^8.63.1"
|
|
39
39
|
},
|
|
40
40
|
"keywords": [
|
|
41
41
|
"components",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"zendeskgarden:src": "src/index.ts",
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "1c1d67d2b98ee0539975cee53f457081e5ae479a"
|
|
51
51
|
}
|