@zendeskgarden/react-tooltips 9.7.0 → 9.7.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.
|
@@ -55,7 +55,8 @@ const TooltipComponent = _ref => {
|
|
|
55
55
|
} = useTooltip({
|
|
56
56
|
id,
|
|
57
57
|
delayMilliseconds: delayMS,
|
|
58
|
-
isVisible: isInitialVisible
|
|
58
|
+
isVisible: isInitialVisible,
|
|
59
|
+
triggerRef
|
|
59
60
|
});
|
|
60
61
|
const controlledIsVisible = getControlledValue(externalIsVisible, isVisible);
|
|
61
62
|
const [floatingPlacement, fallbackPlacements] = getFloatingPlacements(theme, _placement === 'auto' ? PLACEMENT_DEFAULT : _placement, _fallbackPlacements);
|
|
@@ -97,16 +98,17 @@ const TooltipComponent = _ref => {
|
|
|
97
98
|
},
|
|
98
99
|
$zIndex: zIndex,
|
|
99
100
|
"aria-hidden": !controlledIsVisible
|
|
100
|
-
}, React.createElement(StyledTooltip,
|
|
101
|
-
'aria-hidden': !controlledIsVisible,
|
|
101
|
+
}, React.createElement(StyledTooltip, Object.assign({
|
|
102
102
|
$hasArrow: hasArrow,
|
|
103
103
|
$placement: placement,
|
|
104
104
|
$size: toSize(size, type),
|
|
105
|
-
$type: type
|
|
105
|
+
$type: type
|
|
106
|
+
}, getTooltipProps({
|
|
107
|
+
'aria-hidden': !controlledIsVisible,
|
|
106
108
|
onBlur: composeEventHandlers(onBlur, () => closeTooltip(0)),
|
|
107
109
|
onFocus: composeEventHandlers(onFocus, openTooltip),
|
|
108
110
|
...props
|
|
109
|
-
}), content));
|
|
111
|
+
})), content));
|
|
110
112
|
return React.createElement(React.Fragment, null, cloneElement(Child, getTriggerProps({
|
|
111
113
|
...Child.props,
|
|
112
114
|
[refKey]: mergeRefs([triggerRef, Child.ref ? Child.ref : null])
|
|
@@ -10,7 +10,7 @@ import { componentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID = 'tooltip.paragraph';
|
|
11
11
|
const StyledParagraph = styled.p.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.7.
|
|
13
|
+
'data-garden-version': '9.7.1'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledParagraph",
|
|
16
16
|
componentId: "sc-wuqkfc-0"
|
|
@@ -10,7 +10,7 @@ import { componentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID = 'tooltip.title';
|
|
11
11
|
const StyledTitle = styled.strong.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.7.
|
|
13
|
+
'data-garden-version': '9.7.1'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledTitle",
|
|
16
16
|
componentId: "sc-vnjcvz-0"
|
|
@@ -134,7 +134,7 @@ const colorStyles = _ref2 => {
|
|
|
134
134
|
};
|
|
135
135
|
const StyledTooltip = styled.div.attrs({
|
|
136
136
|
'data-garden-id': COMPONENT_ID,
|
|
137
|
-
'data-garden-version': '9.7.
|
|
137
|
+
'data-garden-version': '9.7.1'
|
|
138
138
|
}).withConfig({
|
|
139
139
|
displayName: "StyledTooltip",
|
|
140
140
|
componentId: "sc-gzzjq4-0"
|
package/dist/index.cjs.js
CHANGED
|
@@ -25,7 +25,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
|
25
25
|
const COMPONENT_ID$2 = 'tooltip.paragraph';
|
|
26
26
|
const StyledParagraph = styled__default.default.p.attrs({
|
|
27
27
|
'data-garden-id': COMPONENT_ID$2,
|
|
28
|
-
'data-garden-version': '9.7.
|
|
28
|
+
'data-garden-version': '9.7.1'
|
|
29
29
|
}).withConfig({
|
|
30
30
|
displayName: "StyledParagraph",
|
|
31
31
|
componentId: "sc-wuqkfc-0"
|
|
@@ -34,7 +34,7 @@ const StyledParagraph = styled__default.default.p.attrs({
|
|
|
34
34
|
const COMPONENT_ID$1 = 'tooltip.title';
|
|
35
35
|
const StyledTitle = styled__default.default.strong.attrs({
|
|
36
36
|
'data-garden-id': COMPONENT_ID$1,
|
|
37
|
-
'data-garden-version': '9.7.
|
|
37
|
+
'data-garden-version': '9.7.1'
|
|
38
38
|
}).withConfig({
|
|
39
39
|
displayName: "StyledTitle",
|
|
40
40
|
componentId: "sc-vnjcvz-0"
|
|
@@ -165,7 +165,7 @@ const colorStyles = _ref2 => {
|
|
|
165
165
|
};
|
|
166
166
|
const StyledTooltip = styled__default.default.div.attrs({
|
|
167
167
|
'data-garden-id': COMPONENT_ID,
|
|
168
|
-
'data-garden-version': '9.7.
|
|
168
|
+
'data-garden-version': '9.7.1'
|
|
169
169
|
}).withConfig({
|
|
170
170
|
displayName: "StyledTooltip",
|
|
171
171
|
componentId: "sc-gzzjq4-0"
|
|
@@ -231,7 +231,8 @@ const TooltipComponent = _ref => {
|
|
|
231
231
|
} = containerTooltip.useTooltip({
|
|
232
232
|
id,
|
|
233
233
|
delayMilliseconds: delayMS,
|
|
234
|
-
isVisible: isInitialVisible
|
|
234
|
+
isVisible: isInitialVisible,
|
|
235
|
+
triggerRef
|
|
235
236
|
});
|
|
236
237
|
const controlledIsVisible = containerUtilities.getControlledValue(externalIsVisible, isVisible);
|
|
237
238
|
const [floatingPlacement, fallbackPlacements] = reactTheming.getFloatingPlacements(theme, _placement === 'auto' ? PLACEMENT_DEFAULT : _placement, _fallbackPlacements);
|
|
@@ -273,16 +274,17 @@ const TooltipComponent = _ref => {
|
|
|
273
274
|
},
|
|
274
275
|
$zIndex: zIndex,
|
|
275
276
|
"aria-hidden": !controlledIsVisible
|
|
276
|
-
}, React__default.default.createElement(StyledTooltip,
|
|
277
|
-
'aria-hidden': !controlledIsVisible,
|
|
277
|
+
}, React__default.default.createElement(StyledTooltip, Object.assign({
|
|
278
278
|
$hasArrow: hasArrow,
|
|
279
279
|
$placement: placement,
|
|
280
280
|
$size: toSize(size, type),
|
|
281
|
-
$type: type
|
|
281
|
+
$type: type
|
|
282
|
+
}, getTooltipProps({
|
|
283
|
+
'aria-hidden': !controlledIsVisible,
|
|
282
284
|
onBlur: containerUtilities.composeEventHandlers(onBlur, () => closeTooltip(0)),
|
|
283
285
|
onFocus: containerUtilities.composeEventHandlers(onFocus, openTooltip),
|
|
284
286
|
...props
|
|
285
|
-
}), content));
|
|
287
|
+
})), content));
|
|
286
288
|
return React__default.default.createElement(React__default.default.Fragment, null, React.cloneElement(Child, getTriggerProps({
|
|
287
289
|
...Child.props,
|
|
288
290
|
[refKey]: reactMergeRefs.mergeRefs([triggerRef, Child.ref ? Child.ref : null])
|
|
@@ -10,7 +10,7 @@ interface IStyledTooltipProps {
|
|
|
10
10
|
$hasArrow: ITooltipProps['hasArrow'];
|
|
11
11
|
$placement: Placement;
|
|
12
12
|
$size: NonNullable<ITooltipProps['size']>;
|
|
13
|
-
$type:
|
|
13
|
+
$type: ITooltipProps['type'];
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Accepts all `<div>` props
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-tooltips",
|
|
3
|
-
"version": "9.7.
|
|
3
|
+
"version": "9.7.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
|
"@floating-ui/react-dom": "^2.0.0",
|
|
25
|
-
"@zendeskgarden/container-tooltip": "^
|
|
25
|
+
"@zendeskgarden/container-tooltip": "^2.0.0",
|
|
26
26
|
"@zendeskgarden/container-utilities": "^2.0.0",
|
|
27
27
|
"polished": "^4.3.1",
|
|
28
28
|
"prop-types": "^15.5.7",
|
|
@@ -35,7 +35,10 @@
|
|
|
35
35
|
"styled-components": "^5.3.1 || ^6.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@zendeskgarden/react-
|
|
38
|
+
"@zendeskgarden/react-buttons": "^9.7.1",
|
|
39
|
+
"@zendeskgarden/react-dropdowns": "^9.7.1",
|
|
40
|
+
"@zendeskgarden/react-grid": "^9.7.1",
|
|
41
|
+
"@zendeskgarden/react-theming": "^9.7.1"
|
|
39
42
|
},
|
|
40
43
|
"keywords": [
|
|
41
44
|
"components",
|
|
@@ -47,5 +50,5 @@
|
|
|
47
50
|
"access": "public"
|
|
48
51
|
},
|
|
49
52
|
"zendeskgarden:src": "src/index.ts",
|
|
50
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "df6d9dc7ac384673ecbf8fd5adb954fab8681974"
|
|
51
54
|
}
|