@fluentui/react-tooltip 0.0.0-nightlye0b8e1fa6920220128.1 → 0.0.0-nightlye1926bfeca20220204.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +34 -16
- package/CHANGELOG.md +14 -11
- package/dist/react-tooltip.d.ts +2 -1
- package/lib/components/Tooltip/Tooltip.d.ts +2 -1
- package/lib/components/Tooltip/Tooltip.js +1 -0
- package/lib/components/Tooltip/Tooltip.js.map +1 -1
- package/lib/components/Tooltip/useTooltip.js +22 -27
- package/lib/components/Tooltip/useTooltip.js.map +1 -1
- package/lib-commonjs/components/Tooltip/Tooltip.d.ts +2 -1
- package/lib-commonjs/components/Tooltip/Tooltip.js +1 -0
- package/lib-commonjs/components/Tooltip/Tooltip.js.map +1 -1
- package/lib-commonjs/components/Tooltip/useTooltip.js +21 -26
- package/lib-commonjs/components/Tooltip/useTooltip.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.json
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
"name": "@fluentui/react-tooltip",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "Fri,
|
6
|
-
"tag": "@fluentui/react-tooltip_v0.0.0-
|
7
|
-
"version": "0.0.0-
|
5
|
+
"date": "Fri, 04 Feb 2022 04:13:21 GMT",
|
6
|
+
"tag": "@fluentui/react-tooltip_v0.0.0-nightlye1926bfeca20220204.1",
|
7
|
+
"version": "0.0.0-nightlye1926bfeca20220204.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
11
11
|
"author": "email not defined",
|
12
12
|
"package": "@fluentui/react-tooltip",
|
13
|
-
"commit": "
|
13
|
+
"commit": "448766390ca759acf60ffccef08e4c3ffe41f4f6",
|
14
14
|
"comment": "Release nightly v9"
|
15
15
|
},
|
16
16
|
{
|
@@ -19,6 +19,12 @@
|
|
19
19
|
"commit": "caaf3307f864b04369c13fe69d7dc8fe7ab84735",
|
20
20
|
"comment": "Move arrowHeight and tooltipBorderRadius into a shared constants.ts file"
|
21
21
|
},
|
22
|
+
{
|
23
|
+
"author": "behowell@microsoft.com",
|
24
|
+
"package": "@fluentui/react-tooltip",
|
25
|
+
"commit": "2aacc839785a2f96d84a959aea207dfdb99116f8",
|
26
|
+
"comment": "Prevent Tooltip from overriding any aria-label, etc. props on its child"
|
27
|
+
},
|
22
28
|
{
|
23
29
|
"author": "Humberto.Morimoto@microsoft.com",
|
24
30
|
"package": "@fluentui/react-tooltip",
|
@@ -49,6 +55,12 @@
|
|
49
55
|
"commit": "e0b8e1fa6980077e7b311fd1c72c28d3e4305db0",
|
50
56
|
"comment": "Updating based on changes to composition types."
|
51
57
|
},
|
58
|
+
{
|
59
|
+
"author": "behowell@microsoft.com",
|
60
|
+
"package": "@fluentui/react-tooltip",
|
61
|
+
"commit": "97c3818f7faf8733a0cfc9c91f5e94ddb8652d3a",
|
62
|
+
"comment": "Update documentation stories"
|
63
|
+
},
|
52
64
|
{
|
53
65
|
"author": "behowell@microsoft.com",
|
54
66
|
"package": "@fluentui/react-tooltip",
|
@@ -79,41 +91,47 @@
|
|
79
91
|
"commit": "58ae40d6817b1fa4e095a94707dfef5050aa4c11",
|
80
92
|
"comment": "Replace `triggerAriaAttribute` prop with `relationship` and make it required with no default"
|
81
93
|
},
|
94
|
+
{
|
95
|
+
"author": "behowell@microsoft.com",
|
96
|
+
"package": "@fluentui/react-tooltip",
|
97
|
+
"commit": "f30e7585a8d2abd9db06c4076f39a779008b0eca",
|
98
|
+
"comment": "Update MenuTrigger and Tooltip to work together"
|
99
|
+
},
|
82
100
|
{
|
83
101
|
"author": "beachball",
|
84
102
|
"package": "@fluentui/react-tooltip",
|
85
|
-
"comment": "Bump @fluentui/react-portal to v0.0.0-
|
86
|
-
"commit": "
|
103
|
+
"comment": "Bump @fluentui/react-portal to v0.0.0-nightlye1926bfeca20220204.1",
|
104
|
+
"commit": "448766390ca759acf60ffccef08e4c3ffe41f4f6"
|
87
105
|
},
|
88
106
|
{
|
89
107
|
"author": "beachball",
|
90
108
|
"package": "@fluentui/react-tooltip",
|
91
|
-
"comment": "Bump @fluentui/react-positioning to v0.0.0-
|
92
|
-
"commit": "
|
109
|
+
"comment": "Bump @fluentui/react-positioning to v0.0.0-nightlye1926bfeca20220204.1",
|
110
|
+
"commit": "448766390ca759acf60ffccef08e4c3ffe41f4f6"
|
93
111
|
},
|
94
112
|
{
|
95
113
|
"author": "beachball",
|
96
114
|
"package": "@fluentui/react-tooltip",
|
97
|
-
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-
|
98
|
-
"commit": "
|
115
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightlye1926bfeca20220204.1",
|
116
|
+
"commit": "448766390ca759acf60ffccef08e4c3ffe41f4f6"
|
99
117
|
},
|
100
118
|
{
|
101
119
|
"author": "beachball",
|
102
120
|
"package": "@fluentui/react-tooltip",
|
103
|
-
"comment": "Bump @fluentui/react-theme to v0.0.0-
|
104
|
-
"commit": "
|
121
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightlye1926bfeca20220204.1",
|
122
|
+
"commit": "448766390ca759acf60ffccef08e4c3ffe41f4f6"
|
105
123
|
},
|
106
124
|
{
|
107
125
|
"author": "beachball",
|
108
126
|
"package": "@fluentui/react-tooltip",
|
109
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-
|
110
|
-
"commit": "
|
127
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightlye1926bfeca20220204.1",
|
128
|
+
"commit": "448766390ca759acf60ffccef08e4c3ffe41f4f6"
|
111
129
|
},
|
112
130
|
{
|
113
131
|
"author": "beachball",
|
114
132
|
"package": "@fluentui/react-tooltip",
|
115
|
-
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-
|
116
|
-
"commit": "
|
133
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightlye1926bfeca20220204.1",
|
134
|
+
"commit": "448766390ca759acf60ffccef08e4c3ffe41f4f6"
|
117
135
|
}
|
118
136
|
],
|
119
137
|
"none": [
|
package/CHANGELOG.md
CHANGED
@@ -1,34 +1,37 @@
|
|
1
1
|
# Change Log - @fluentui/react-tooltip
|
2
2
|
|
3
|
-
This log was last generated on Fri,
|
3
|
+
This log was last generated on Fri, 04 Feb 2022 04:13:21 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-
|
7
|
+
## [0.0.0-nightlye1926bfeca20220204.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v0.0.0-nightlye1926bfeca20220204.1)
|
8
8
|
|
9
|
-
Fri,
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.0.0-beta.5..@fluentui/react-tooltip_v0.0.0-
|
9
|
+
Fri, 04 Feb 2022 04:13:21 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.0.0-beta.5..@fluentui/react-tooltip_v0.0.0-nightlye1926bfeca20220204.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
|
-
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/
|
14
|
+
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/448766390ca759acf60ffccef08e4c3ffe41f4f6) by email not defined)
|
15
15
|
- Move arrowHeight and tooltipBorderRadius into a shared constants.ts file ([PR #21204](https://github.com/microsoft/fluentui/pull/21204) by behowell@microsoft.com)
|
16
|
+
- Prevent Tooltip from overriding any aria-label, etc. props on its child ([PR #21532](https://github.com/microsoft/fluentui/pull/21532) by behowell@microsoft.com)
|
16
17
|
- Replacing use of functions in makeStyles with direct use of tokens. ([PR #21058](https://github.com/microsoft/fluentui/pull/21058) by Humberto.Morimoto@microsoft.com)
|
17
18
|
- update styles to not use CSS shorthands ([PR #20795](https://github.com/microsoft/fluentui/pull/20795) by olfedias@microsoft.com)
|
18
19
|
- BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet ([PR #21365](https://github.com/microsoft/fluentui/pull/21365) by behowell@microsoft.com)
|
19
20
|
- Remove component's shorthandProps array ([PR #21134](https://github.com/microsoft/fluentui/pull/21134) by behowell@microsoft.com)
|
20
21
|
- Updating based on changes to composition types. ([PR #20891](https://github.com/microsoft/fluentui/pull/20891) by Humberto.Morimoto@microsoft.com)
|
22
|
+
- Update documentation stories ([PR #21298](https://github.com/microsoft/fluentui/pull/21298) by behowell@microsoft.com)
|
21
23
|
- Fix tooltip arrow rendering, and add high contrast border around Tooltip ([PR #21086](https://github.com/microsoft/fluentui/pull/21086) by behowell@microsoft.com)
|
22
24
|
- Remove Tooltip's inverted prop in favor of the appearance prop ([PR #21327](https://github.com/microsoft/fluentui/pull/21327) by behowell@microsoft.com)
|
23
25
|
- BREAKING: implement `content` slot ([PR #21470](https://github.com/microsoft/fluentui/pull/21470) by olfedias@microsoft.com)
|
24
26
|
- Replace make-styles packages with griffel equivalents. ([PR #21422](https://github.com/microsoft/fluentui/pull/21422) by olfedias@microsoft.com)
|
25
27
|
- Replace `triggerAriaAttribute` prop with `relationship` and make it required with no default ([PR #21331](https://github.com/microsoft/fluentui/pull/21331) by behowell@microsoft.com)
|
26
|
-
-
|
27
|
-
- Bump @fluentui/react-
|
28
|
-
- Bump @fluentui/react-
|
29
|
-
- Bump @fluentui/react-
|
30
|
-
- Bump @fluentui/react-
|
31
|
-
- Bump @fluentui/react-
|
28
|
+
- Update MenuTrigger and Tooltip to work together ([PR #21495](https://github.com/microsoft/fluentui/pull/21495) by behowell@microsoft.com)
|
29
|
+
- Bump @fluentui/react-portal to v0.0.0-nightlye1926bfeca20220204.1 ([commit](https://github.com/microsoft/fluentui/commit/448766390ca759acf60ffccef08e4c3ffe41f4f6) by beachball)
|
30
|
+
- Bump @fluentui/react-positioning to v0.0.0-nightlye1926bfeca20220204.1 ([commit](https://github.com/microsoft/fluentui/commit/448766390ca759acf60ffccef08e4c3ffe41f4f6) by beachball)
|
31
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightlye1926bfeca20220204.1 ([commit](https://github.com/microsoft/fluentui/commit/448766390ca759acf60ffccef08e4c3ffe41f4f6) by beachball)
|
32
|
+
- Bump @fluentui/react-theme to v0.0.0-nightlye1926bfeca20220204.1 ([commit](https://github.com/microsoft/fluentui/commit/448766390ca759acf60ffccef08e4c3ffe41f4f6) by beachball)
|
33
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightlye1926bfeca20220204.1 ([commit](https://github.com/microsoft/fluentui/commit/448766390ca759acf60ffccef08e4c3ffe41f4f6) by beachball)
|
34
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightlye1926bfeca20220204.1 ([commit](https://github.com/microsoft/fluentui/commit/448766390ca759acf60ffccef08e4c3ffe41f4f6) by beachball)
|
32
35
|
|
33
36
|
## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v9.0.0-beta.5)
|
34
37
|
|
package/dist/react-tooltip.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { ComponentProps } from '@fluentui/react-utilities';
|
2
2
|
import type { ComponentState } from '@fluentui/react-utilities';
|
3
|
+
import type { FluentTriggerComponent } from '@fluentui/react-utilities';
|
3
4
|
import type { IntrinsicSlotProps } from '@fluentui/react-utilities';
|
4
5
|
import type { PositioningShorthand } from '@fluentui/react-positioning';
|
5
6
|
import * as React_2 from 'react';
|
@@ -19,7 +20,7 @@ export declare const renderTooltip_unstable: (state: TooltipState) => JSX.Elemen
|
|
19
20
|
/**
|
20
21
|
* A tooltip provides light weight contextual information on top of its target element.
|
21
22
|
*/
|
22
|
-
export declare const Tooltip: React_2.FC<TooltipProps
|
23
|
+
export declare const Tooltip: React_2.FC<TooltipProps> & FluentTriggerComponent;
|
23
24
|
|
24
25
|
export declare const tooltipClassName = "fui-Tooltip";
|
25
26
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import type { TooltipProps } from './Tooltip.types';
|
3
|
+
import type { FluentTriggerComponent } from '@fluentui/react-utilities';
|
3
4
|
/**
|
4
5
|
* A tooltip provides light weight contextual information on top of its target element.
|
5
6
|
*/
|
6
|
-
export declare const Tooltip: React.FC<TooltipProps
|
7
|
+
export declare const Tooltip: React.FC<TooltipProps> & FluentTriggerComponent;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,SAAS,mBAAT,QAAoC,cAApC;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AACA,SAAS,yBAAT,QAA0C,oBAA1C;
|
1
|
+
{"version":3,"sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,SAAS,mBAAT,QAAoC,cAApC;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AACA,SAAS,yBAAT,QAA0C,oBAA1C;AAIA;;AAEG;;AACH,OAAO,MAAM,OAAO,GAAoD,KAAK,IAAG;AAC9E,QAAM,KAAK,GAAG,mBAAmB,CAAC,KAAD,CAAjC;AAEA,EAAA,yBAAyB,CAAC,KAAD,CAAzB;AACA,SAAO,sBAAsB,CAAC,KAAD,CAA7B;AACD,CALM;AAOP,OAAO,CAAC,WAAR,GAAsB,SAAtB;AACA,OAAO,CAAC,wBAAR,GAAmC,IAAnC","sourceRoot":""}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { mergeArrowOffset, resolvePositioningShorthand, usePopper } from '@fluentui/react-positioning';
|
3
3
|
import { TooltipContext, useFluent } from '@fluentui/react-shared-contexts';
|
4
|
-
import { applyTriggerPropsToChildren, resolveShorthand, useControllableState, useId, useIsomorphicLayoutEffect, useIsSSR, useMergedRefs, useTimeout } from '@fluentui/react-utilities';
|
4
|
+
import { applyTriggerPropsToChildren, resolveShorthand, useControllableState, useMergedEventCallbacks, useId, useIsomorphicLayoutEffect, useIsSSR, useMergedRefs, useTimeout, getTriggerChild } from '@fluentui/react-utilities';
|
5
5
|
import { arrowHeight, tooltipBorderRadius } from './private/constants';
|
6
6
|
/**
|
7
7
|
* Create the state required to render Tooltip.
|
@@ -155,35 +155,40 @@ export const useTooltip_unstable = props => {
|
|
155
155
|
}, [setDelayTimeout, setVisible, state.hideDelay, targetDocument]); // Cancel the hide timer when the pointer enters the tooltip, and restart it when the mouse leaves.
|
156
156
|
// This keeps the tooltip visible when the pointer is moved over it.
|
157
157
|
|
158
|
-
state.content.onPointerEnter =
|
159
|
-
state.content.onPointerLeave =
|
160
|
-
const child = /*#__PURE__*/React.isValidElement(children) ? children : undefined; // The props to add to the trigger element (child)
|
158
|
+
state.content.onPointerEnter = useMergedEventCallbacks(state.content.onPointerEnter, clearDelayTimeout);
|
159
|
+
state.content.onPointerLeave = useMergedEventCallbacks(state.content.onPointerLeave, onLeaveTrigger);
|
160
|
+
const child = /*#__PURE__*/React.isValidElement(children) ? getTriggerChild(children) : undefined; // The props to add to the trigger element (child)
|
161
161
|
|
162
162
|
const triggerProps = {
|
163
|
-
onPointerEnter:
|
164
|
-
onPointerLeave:
|
165
|
-
onFocus:
|
166
|
-
onBlur:
|
163
|
+
onPointerEnter: useMergedEventCallbacks((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onPointerEnter, onEnterTrigger),
|
164
|
+
onPointerLeave: useMergedEventCallbacks((_b = child === null || child === void 0 ? void 0 : child.props) === null || _b === void 0 ? void 0 : _b.onPointerLeave, onLeaveTrigger),
|
165
|
+
onFocus: useMergedEventCallbacks((_c = child === null || child === void 0 ? void 0 : child.props) === null || _c === void 0 ? void 0 : _c.onFocus, onEnterTrigger),
|
166
|
+
onBlur: useMergedEventCallbacks((_d = child === null || child === void 0 ? void 0 : child.props) === null || _d === void 0 ? void 0 : _d.onBlur, onLeaveTrigger)
|
167
167
|
}; // If the target prop is not provided, attach targetRef to the trigger element's ref prop
|
168
168
|
|
169
|
-
const
|
170
|
-
const childTargetRef = useMergedRefs(childWithRef === null || childWithRef === void 0 ? void 0 : childWithRef.ref, targetRef);
|
169
|
+
const childTargetRef = useMergedRefs(child === null || child === void 0 ? void 0 : child.ref, targetRef);
|
171
170
|
|
172
171
|
if (popperOptions.target === undefined) {
|
173
172
|
triggerProps.ref = childTargetRef;
|
174
173
|
}
|
175
174
|
|
176
175
|
if (relationship === 'label') {
|
177
|
-
|
178
|
-
if (typeof state.content.children === 'string') {
|
179
|
-
triggerProps['aria-label'] = state.content.children;
|
180
|
-
} else if (!isServerSideRender) {
|
181
|
-
triggerProps['aria-labelledby'] = state.content.id; // Always render the tooltip even if hidden, so that aria-labelledby refers to a valid element
|
176
|
+
const hasLabel = (child === null || child === void 0 ? void 0 : child.props) && ('aria-label' in child.props || 'aria-labelledby' in child.props);
|
182
177
|
|
183
|
-
|
178
|
+
if (!hasLabel) {
|
179
|
+
// aria-label only works if the content is a string. Otherwise, need to use aria-labelledby.
|
180
|
+
if (typeof state.content.children === 'string') {
|
181
|
+
triggerProps['aria-label'] = state.content.children;
|
182
|
+
} else if (!isServerSideRender) {
|
183
|
+
triggerProps['aria-labelledby'] = state.content.id; // Always render the tooltip even if hidden, so that aria-labelledby refers to a valid element
|
184
|
+
|
185
|
+
state.shouldRenderTooltip = true;
|
186
|
+
}
|
184
187
|
}
|
185
188
|
} else if (relationship === 'description') {
|
186
|
-
|
189
|
+
const hasDescription = (child === null || child === void 0 ? void 0 : child.props) && ('aria-description' in child.props || 'aria-describedby' in child.props);
|
190
|
+
|
191
|
+
if (!hasDescription && !isServerSideRender) {
|
187
192
|
triggerProps['aria-describedby'] = state.content.id; // Always render the tooltip even if hidden, so that aria-describedby refers to a valid element
|
188
193
|
|
189
194
|
state.shouldRenderTooltip = true;
|
@@ -194,14 +199,4 @@ export const useTooltip_unstable = props => {
|
|
194
199
|
state.children = applyTriggerPropsToChildren(children, triggerProps);
|
195
200
|
return state;
|
196
201
|
};
|
197
|
-
/**
|
198
|
-
* Combine up to two event callbacks into a single function that calls them in order
|
199
|
-
*/
|
200
|
-
|
201
|
-
const useMergedCallbacks = (callback1, callback2) => {
|
202
|
-
return React.useCallback(ev => {
|
203
|
-
callback1 === null || callback1 === void 0 ? void 0 : callback1(ev);
|
204
|
-
callback2 === null || callback2 === void 0 ? void 0 : callback2(ev);
|
205
|
-
}, [callback1, callback2]);
|
206
|
-
};
|
207
202
|
//# sourceMappingURL=useTooltip.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Tooltip/useTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,EAA2B,2BAA3B,EAAwD,SAAxD,QAAyE,6BAAzE;AACA,SAAS,cAAT,EAAyB,SAAzB,QAA0C,iCAA1C;AACA,SACE,2BADF,EAEE,gBAFF,EAGE,oBAHF,EAIE,
|
1
|
+
{"version":3,"sources":["../../../src/components/Tooltip/useTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,EAA2B,2BAA3B,EAAwD,SAAxD,QAAyE,6BAAzE;AACA,SAAS,cAAT,EAAyB,SAAzB,QAA0C,iCAA1C;AACA,SACE,2BADF,EAEE,gBAFF,EAGE,oBAHF,EAIE,uBAJF,EAKE,KALF,EAME,yBANF,EAOE,QAPF,EAQE,aARF,EASE,UATF,EAUE,eAVF,QAWO,2BAXP;AAaA,SAAS,WAAT,EAAsB,mBAAtB,QAAiD,qBAAjD;AAEA;;;;;;;AAOG;;AACH,OAAO,MAAM,mBAAmB,GAAI,KAAD,IAAsC;;;AACvE,QAAM,OAAO,GAAG,KAAK,CAAC,UAAN,CAAiB,cAAjB,CAAhB;AACA,QAAM,kBAAkB,GAAG,QAAQ,EAAnC;AACA,QAAM;AAAE,IAAA;AAAF,MAAqB,SAAS,EAApC;AACA,QAAM,CAAC,eAAD,EAAkB,iBAAlB,IAAuC,UAAU,EAAvD;AAEA,QAAM;AACJ,IAAA,UADI;AAEJ,IAAA,QAFI;AAG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E,KAAP,MAAiB,gBAAgB,KAAK,CAAC,KAAtB,IAA+B,qBAAqB,KAAK,CAAC,KAA3E,CAAjB;;AACA,QAAI,CAAC,QAAL,EAAe;AACb;AACA,UAAI,OAAO,KAAK,CAAC,OAAN,CAAc,QAArB,KAAkC,QAAtC,EAAgD;AAC9C,QAAA,YAAY,CAAC,YAAD,CAAZ,GAA6B,KAAK,CAAC,OAAN,CAAc,QAA3C;AACD,OAFD,MAEO,IAAI,CAAC,kBAAL,EAAyB;AAC9B,QAAA,YAAY,CAAC,iBAAD,CAAZ,GAAkC,KAAK,CAAC,OAAN,CAAc,EAAhD,CAD8B,CAE9B;;AACA,QAAA,KAAK,CAAC,mBAAN,GAA4B,IAA5B;AACD;AACF;AACF,GAZD,MAYO,IAAI,YAAY,KAAK,aAArB,EAAoC;AACzC,UAAM,cAAc,GAAG,CAAA,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAA,KAAK,CAAE,KAAP,MAAiB,sBAAsB,KAAK,CAAC,KAA5B,IAAqC,sBAAsB,KAAK,CAAC,KAAlF,CAAvB;;AACA,QAAI,CAAC,cAAD,IAAmB,CAAC,kBAAxB,EAA4C;AAC1C,MAAA,YAAY,CAAC,kBAAD,CAAZ,GAAmC,KAAK,CAAC,OAAN,CAAc,EAAjD,CAD0C,CAE1C;;AACA,MAAA,KAAK,CAAC,mBAAN,GAA4B,IAA5B;AACD;AACF,GAtMsE,CAwMvE;;;AACA,EAAA,KAAK,CAAC,QAAN,GAAiB,2BAA2B,CAAC,QAAD,EAAW,YAAX,CAA5C;AACA,SAAO,KAAP;AACD,CA3MM","sourceRoot":""}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import type { TooltipProps } from './Tooltip.types';
|
3
|
+
import type { FluentTriggerComponent } from '@fluentui/react-utilities';
|
3
4
|
/**
|
4
5
|
* A tooltip provides light weight contextual information on top of its target element.
|
5
6
|
*/
|
6
|
-
export declare const Tooltip: React.FC<TooltipProps
|
7
|
+
export declare const Tooltip: React.FC<TooltipProps> & FluentTriggerComponent;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;
|
1
|
+
{"version":3,"sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;AAIA;;AAEG;;;AACI,MAAM,OAAO,GAAoD,KAAK,IAAG;AAC9E,QAAM,KAAK,GAAG,YAAA,CAAA,mBAAA,CAAoB,KAApB,CAAd;AAEA,EAAA,kBAAA,CAAA,yBAAA,CAA0B,KAA1B;AACA,SAAO,eAAA,CAAA,sBAAA,CAAuB,KAAvB,CAAP;AACD,CALM;;AAAM,OAAA,CAAA,OAAA,GAAO,OAAP;AAOb,OAAA,CAAA,OAAA,CAAQ,WAAR,GAAsB,SAAtB;AACA,OAAA,CAAA,OAAA,CAAQ,wBAAR,GAAmC,IAAnC","sourceRoot":""}
|
@@ -167,35 +167,40 @@ const useTooltip_unstable = props => {
|
|
167
167
|
}, [setDelayTimeout, setVisible, state.hideDelay, targetDocument]); // Cancel the hide timer when the pointer enters the tooltip, and restart it when the mouse leaves.
|
168
168
|
// This keeps the tooltip visible when the pointer is moved over it.
|
169
169
|
|
170
|
-
state.content.onPointerEnter =
|
171
|
-
state.content.onPointerLeave =
|
172
|
-
const child = React.isValidElement(children) ? children : undefined; // The props to add to the trigger element (child)
|
170
|
+
state.content.onPointerEnter = react_utilities_1.useMergedEventCallbacks(state.content.onPointerEnter, clearDelayTimeout);
|
171
|
+
state.content.onPointerLeave = react_utilities_1.useMergedEventCallbacks(state.content.onPointerLeave, onLeaveTrigger);
|
172
|
+
const child = React.isValidElement(children) ? react_utilities_1.getTriggerChild(children) : undefined; // The props to add to the trigger element (child)
|
173
173
|
|
174
174
|
const triggerProps = {
|
175
|
-
onPointerEnter:
|
176
|
-
onPointerLeave:
|
177
|
-
onFocus:
|
178
|
-
onBlur:
|
175
|
+
onPointerEnter: react_utilities_1.useMergedEventCallbacks((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onPointerEnter, onEnterTrigger),
|
176
|
+
onPointerLeave: react_utilities_1.useMergedEventCallbacks((_b = child === null || child === void 0 ? void 0 : child.props) === null || _b === void 0 ? void 0 : _b.onPointerLeave, onLeaveTrigger),
|
177
|
+
onFocus: react_utilities_1.useMergedEventCallbacks((_c = child === null || child === void 0 ? void 0 : child.props) === null || _c === void 0 ? void 0 : _c.onFocus, onEnterTrigger),
|
178
|
+
onBlur: react_utilities_1.useMergedEventCallbacks((_d = child === null || child === void 0 ? void 0 : child.props) === null || _d === void 0 ? void 0 : _d.onBlur, onLeaveTrigger)
|
179
179
|
}; // If the target prop is not provided, attach targetRef to the trigger element's ref prop
|
180
180
|
|
181
|
-
const
|
182
|
-
const childTargetRef = react_utilities_1.useMergedRefs(childWithRef === null || childWithRef === void 0 ? void 0 : childWithRef.ref, targetRef);
|
181
|
+
const childTargetRef = react_utilities_1.useMergedRefs(child === null || child === void 0 ? void 0 : child.ref, targetRef);
|
183
182
|
|
184
183
|
if (popperOptions.target === undefined) {
|
185
184
|
triggerProps.ref = childTargetRef;
|
186
185
|
}
|
187
186
|
|
188
187
|
if (relationship === 'label') {
|
189
|
-
|
190
|
-
if (typeof state.content.children === 'string') {
|
191
|
-
triggerProps['aria-label'] = state.content.children;
|
192
|
-
} else if (!isServerSideRender) {
|
193
|
-
triggerProps['aria-labelledby'] = state.content.id; // Always render the tooltip even if hidden, so that aria-labelledby refers to a valid element
|
188
|
+
const hasLabel = (child === null || child === void 0 ? void 0 : child.props) && ('aria-label' in child.props || 'aria-labelledby' in child.props);
|
194
189
|
|
195
|
-
|
190
|
+
if (!hasLabel) {
|
191
|
+
// aria-label only works if the content is a string. Otherwise, need to use aria-labelledby.
|
192
|
+
if (typeof state.content.children === 'string') {
|
193
|
+
triggerProps['aria-label'] = state.content.children;
|
194
|
+
} else if (!isServerSideRender) {
|
195
|
+
triggerProps['aria-labelledby'] = state.content.id; // Always render the tooltip even if hidden, so that aria-labelledby refers to a valid element
|
196
|
+
|
197
|
+
state.shouldRenderTooltip = true;
|
198
|
+
}
|
196
199
|
}
|
197
200
|
} else if (relationship === 'description') {
|
198
|
-
|
201
|
+
const hasDescription = (child === null || child === void 0 ? void 0 : child.props) && ('aria-description' in child.props || 'aria-describedby' in child.props);
|
202
|
+
|
203
|
+
if (!hasDescription && !isServerSideRender) {
|
199
204
|
triggerProps['aria-describedby'] = state.content.id; // Always render the tooltip even if hidden, so that aria-describedby refers to a valid element
|
200
205
|
|
201
206
|
state.shouldRenderTooltip = true;
|
@@ -208,14 +213,4 @@ const useTooltip_unstable = props => {
|
|
208
213
|
};
|
209
214
|
|
210
215
|
exports.useTooltip_unstable = useTooltip_unstable;
|
211
|
-
/**
|
212
|
-
* Combine up to two event callbacks into a single function that calls them in order
|
213
|
-
*/
|
214
|
-
|
215
|
-
const useMergedCallbacks = (callback1, callback2) => {
|
216
|
-
return React.useCallback(ev => {
|
217
|
-
callback1 === null || callback1 === void 0 ? void 0 : callback1(ev);
|
218
|
-
callback2 === null || callback2 === void 0 ? void 0 : callback2(ev);
|
219
|
-
}, [callback1, callback2]);
|
220
|
-
};
|
221
216
|
//# sourceMappingURL=useTooltip.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Tooltip/useTooltip.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAA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AACA,QAAI,CAAC,QAAL,EAAe;AACb;AACA,UAAI,OAAO,KAAK,CAAC,OAAN,CAAc,QAArB,KAAkC,QAAtC,EAAgD;AAC9C,QAAA,YAAY,CAAC,YAAD,CAAZ,GAA6B,KAAK,CAAC,OAAN,CAAc,QAA3C;AACD,OAFD,MAEO,IAAI,CAAC,kBAAL,EAAyB;AAC9B,QAAA,YAAY,CAAC,iBAAD,CAAZ,GAAkC,KAAK,CAAC,OAAN,CAAc,EAAhD,CAD8B,CAE9B;;AACA,QAAA,KAAK,CAAC,mBAAN,GAA4B,IAA5B;AACD;AACF;AACF,GAZD,MAYO,IAAI,YAAY,KAAK,aAArB,EAAoC;AACzC,UAAM,cAAc,GAAG,CAAA,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAA,KAAK,CAAE,KAAP,MAAiB,sBAAsB,KAAK,CAAC,KAA5B,IAAqC,sBAAsB,KAAK,CAAC,KAAlF,CAAvB;;AACA,QAAI,CAAC,cAAD,IAAmB,CAAC,kBAAxB,EAA4C;AAC1C,MAAA,YAAY,CAAC,kBAAD,CAAZ,GAAmC,KAAK,CAAC,OAAN,CAAc,EAAjD,CAD0C,CAE1C;;AACA,MAAA,KAAK,CAAC,mBAAN,GAA4B,IAA5B;AACD;AACF,GAtMsE,CAwMvE;;;AACA,EAAA,KAAK,CAAC,QAAN,GAAiB,iBAAA,CAAA,2BAAA,CAA4B,QAA5B,EAAsC,YAAtC,CAAjB;AACA,SAAO,KAAP;AACD,CA3MM;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB","sourceRoot":""}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-tooltip",
|
3
|
-
"version": "0.0.0-
|
3
|
+
"version": "0.0.0-nightlye1926bfeca20220204.1",
|
4
4
|
"description": "React components for building web experiences",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -28,7 +28,7 @@
|
|
28
28
|
"devDependencies": {
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
30
30
|
"@fluentui/react-conformance": "*",
|
31
|
-
"@fluentui/react-conformance-griffel": "0.0.0-
|
31
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightlye1926bfeca20220204.1",
|
32
32
|
"@fluentui/scripts": "^1.0.0",
|
33
33
|
"@types/enzyme": "3.10.3",
|
34
34
|
"@types/enzyme-adapter-react-16": "1.0.3",
|
@@ -42,11 +42,11 @@
|
|
42
42
|
"react-test-renderer": "^16.3.0"
|
43
43
|
},
|
44
44
|
"dependencies": {
|
45
|
-
"@fluentui/react-portal": "0.0.0-
|
46
|
-
"@fluentui/react-positioning": "0.0.0-
|
47
|
-
"@fluentui/react-shared-contexts": "0.0.0-
|
48
|
-
"@fluentui/react-theme": "0.0.0-
|
49
|
-
"@fluentui/react-utilities": "0.0.0-
|
45
|
+
"@fluentui/react-portal": "0.0.0-nightlye1926bfeca20220204.1",
|
46
|
+
"@fluentui/react-positioning": "0.0.0-nightlye1926bfeca20220204.1",
|
47
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightlye1926bfeca20220204.1",
|
48
|
+
"@fluentui/react-theme": "0.0.0-nightlye1926bfeca20220204.1",
|
49
|
+
"@fluentui/react-utilities": "0.0.0-nightlye1926bfeca20220204.1",
|
50
50
|
"@griffel/react": "1.0.0",
|
51
51
|
"tslib": "^2.1.0"
|
52
52
|
},
|