@fluentui/react-tooltip 9.72.9-experimental.component-base-hooks.20260122-49fc330360.0 → 9.74.3-experimental.esm.20260709-49ee7a20cf.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 +111 -13
- package/dist/index.d.cts +166 -0
- package/dist/index.d.ts +16 -2
- package/lib/Tooltip.js +1 -1
- package/lib/Tooltip.js.map +1 -1
- package/lib/components/Tooltip/Tooltip.js +4 -5
- package/lib/components/Tooltip/Tooltip.js.map +1 -1
- package/lib/components/Tooltip/Tooltip.types.js +1 -1
- package/lib/components/Tooltip/Tooltip.types.js.map +1 -1
- package/lib/components/Tooltip/index.js +5 -5
- package/lib/components/Tooltip/index.js.map +1 -1
- package/lib/components/Tooltip/private/useTooltipTimeout.js +2 -2
- package/lib/components/Tooltip/renderTooltip.js +2 -2
- package/lib/components/Tooltip/renderTooltip.js.map +1 -1
- package/lib/components/Tooltip/useTooltip.js +4 -4
- package/lib/components/Tooltip/useTooltip.js.map +1 -1
- package/lib/components/Tooltip/useTooltipBase.js +35 -11
- package/lib/components/Tooltip/useTooltipBase.js.map +1 -1
- package/lib/components/Tooltip/useTooltipStyles.styles.js +6 -6
- package/lib/components/Tooltip/useTooltipStyles.styles.js.map +1 -1
- package/lib/components/Tooltip/useTooltipStyles.styles.raw.js +6 -5
- package/lib/components/Tooltip/useTooltipStyles.styles.raw.js.map +1 -1
- package/lib/index.js +1 -4
- package/lib/index.js.map +1 -1
- package/lib-commonjs/{Tooltip.js → Tooltip.cjs} +1 -1
- package/lib-commonjs/{Tooltip.js.map → Tooltip.cjs.map} +1 -1
- package/lib-commonjs/components/Tooltip/{Tooltip.js → Tooltip.cjs} +3 -5
- package/lib-commonjs/components/Tooltip/Tooltip.cjs.map +1 -0
- package/lib-commonjs/components/Tooltip/Tooltip.types.cjs +4 -0
- package/lib-commonjs/components/Tooltip/Tooltip.types.cjs.map +1 -0
- package/lib-commonjs/components/Tooltip/{index.js → index.cjs} +5 -5
- package/lib-commonjs/components/Tooltip/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/Tooltip/renderTooltip.cjs.map +1 -0
- package/lib-commonjs/components/Tooltip/{useTooltip.js → useTooltip.cjs} +4 -4
- package/lib-commonjs/components/Tooltip/useTooltip.cjs.map +1 -0
- package/lib-commonjs/components/Tooltip/{useTooltipBase.js → useTooltipBase.cjs} +25 -3
- package/lib-commonjs/components/Tooltip/useTooltipBase.cjs.map +1 -0
- package/lib-commonjs/components/Tooltip/{useTooltipStyles.styles.js → useTooltipStyles.styles.cjs} +2 -1
- package/lib-commonjs/components/Tooltip/useTooltipStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/Tooltip/{useTooltipStyles.styles.raw.js → useTooltipStyles.styles.raw.cjs} +3 -2
- package/lib-commonjs/components/Tooltip/useTooltipStyles.styles.raw.cjs.map +1 -0
- package/lib-commonjs/{index.js → index.cjs} +4 -4
- package/lib-commonjs/index.cjs.map +1 -0
- package/package.json +21 -15
- package/lib-commonjs/components/Tooltip/Tooltip.js.map +0 -1
- package/lib-commonjs/components/Tooltip/Tooltip.types.js +0 -6
- package/lib-commonjs/components/Tooltip/Tooltip.types.js.map +0 -1
- package/lib-commonjs/components/Tooltip/renderTooltip.js.map +0 -1
- package/lib-commonjs/components/Tooltip/useTooltip.js.map +0 -1
- package/lib-commonjs/components/Tooltip/useTooltipBase.js.map +0 -1
- package/lib-commonjs/components/Tooltip/useTooltipStyles.styles.js.map +0 -1
- package/lib-commonjs/components/Tooltip/useTooltipStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/index.js.map +0 -1
- /package/lib-commonjs/components/Tooltip/private/{constants.js → constants.cjs} +0 -0
- /package/lib-commonjs/components/Tooltip/private/{constants.js.map → constants.cjs.map} +0 -0
- /package/lib-commonjs/components/Tooltip/private/{useTooltipTimeout.js → useTooltipTimeout.cjs} +0 -0
- /package/lib-commonjs/components/Tooltip/private/{useTooltipTimeout.js.map → useTooltipTimeout.cjs.map} +0 -0
- /package/lib-commonjs/components/Tooltip/{renderTooltip.js → renderTooltip.cjs} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,25 +1,123 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-tooltip
|
|
2
2
|
|
|
3
|
-
This log was last generated on Thu,
|
|
3
|
+
This log was last generated on Thu, 09 Jul 2026 17:33:57 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [9.
|
|
7
|
+
## [9.74.3-experimental.esm.20260709-49ee7a20cf.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v9.74.3-experimental.esm.20260709-49ee7a20cf.0)
|
|
8
8
|
|
|
9
|
-
Thu,
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.
|
|
9
|
+
Thu, 09 Jul 2026 17:33:57 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.10.3..@fluentui/react-tooltip_v9.74.3-experimental.esm.20260709-49ee7a20cf.0)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
|
-
- Release 9.
|
|
15
|
-
- Bump @fluentui/keyboard-keys to v9.
|
|
16
|
-
- Bump @fluentui/react-jsx-runtime to v9.
|
|
17
|
-
- Bump @fluentui/react-portal to v9.
|
|
18
|
-
- Bump @fluentui/react-positioning to v9.
|
|
19
|
-
- Bump @fluentui/react-shared-contexts to v9.
|
|
20
|
-
- Bump @fluentui/react-tabster to v9.
|
|
21
|
-
- Bump @fluentui/react-theme to v9.
|
|
22
|
-
- Bump @fluentui/react-utilities to v9.
|
|
14
|
+
- Release 9.74.3-experimental.esm.20260709-49ee7a20cf ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
+
- Bump @fluentui/keyboard-keys to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
16
|
+
- Bump @fluentui/react-jsx-runtime to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
17
|
+
- Bump @fluentui/react-portal to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
18
|
+
- Bump @fluentui/react-positioning to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
19
|
+
- Bump @fluentui/react-shared-contexts to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
20
|
+
- Bump @fluentui/react-tabster to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
21
|
+
- Bump @fluentui/react-theme to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
22
|
+
- Bump @fluentui/react-utilities to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
23
|
+
|
|
24
|
+
## [9.10.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v9.10.3)
|
|
25
|
+
|
|
26
|
+
Wed, 24 Jun 2026 11:10:03 GMT
|
|
27
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.10.2..@fluentui/react-tooltip_v9.10.3)
|
|
28
|
+
|
|
29
|
+
### Patches
|
|
30
|
+
|
|
31
|
+
- fix: remove redundant use no memo directives, and add justification to valid ones ([PR #36224](https://github.com/microsoft/fluentui/pull/36224) by martinhochel@microsoft.com)
|
|
32
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.4 ([commit](https://github.com/microsoft/fluentui/commit/a4b871ca80c1f16f35ab4229def4fe02be7f30ea) by beachball)
|
|
33
|
+
- Bump @fluentui/react-portal to v9.8.14 ([commit](https://github.com/microsoft/fluentui/commit/a4b871ca80c1f16f35ab4229def4fe02be7f30ea) by beachball)
|
|
34
|
+
- Bump @fluentui/react-positioning to v9.22.3 ([commit](https://github.com/microsoft/fluentui/commit/a4b871ca80c1f16f35ab4229def4fe02be7f30ea) by beachball)
|
|
35
|
+
- Bump @fluentui/react-tabster to v9.26.16 ([commit](https://github.com/microsoft/fluentui/commit/a4b871ca80c1f16f35ab4229def4fe02be7f30ea) by beachball)
|
|
36
|
+
- Bump @fluentui/react-utilities to v9.26.5 ([commit](https://github.com/microsoft/fluentui/commit/a4b871ca80c1f16f35ab4229def4fe02be7f30ea) by beachball)
|
|
37
|
+
|
|
38
|
+
## [9.10.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v9.10.2)
|
|
39
|
+
|
|
40
|
+
Tue, 26 May 2026 09:39:14 GMT
|
|
41
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.10.1..@fluentui/react-tooltip_v9.10.2)
|
|
42
|
+
|
|
43
|
+
### Patches
|
|
44
|
+
|
|
45
|
+
- fix: dismiss Tooltip when the document becomes hidden (e.g. tab backgrounded or app switched on mobile) ([PR #36023](https://github.com/microsoft/fluentui/pull/36023) by 198982749+Copilot@users.noreply.github.com)
|
|
46
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.3 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
|
|
47
|
+
- Bump @fluentui/react-portal to v9.8.13 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
|
|
48
|
+
- Bump @fluentui/react-positioning to v9.22.2 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
|
|
49
|
+
- Bump @fluentui/react-tabster to v9.26.15 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
|
|
50
|
+
- Bump @fluentui/react-utilities to v9.26.4 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
|
|
51
|
+
|
|
52
|
+
## [9.10.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v9.10.1)
|
|
53
|
+
|
|
54
|
+
Thu, 23 Apr 2026 14:21:05 GMT
|
|
55
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.10.0..@fluentui/react-tooltip_v9.10.1)
|
|
56
|
+
|
|
57
|
+
### Patches
|
|
58
|
+
|
|
59
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.2 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
|
|
60
|
+
- Bump @fluentui/react-portal to v9.8.12 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
|
|
61
|
+
- Bump @fluentui/react-positioning to v9.22.1 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
|
|
62
|
+
- Bump @fluentui/react-tabster to v9.26.14 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
|
|
63
|
+
- Bump @fluentui/react-utilities to v9.26.3 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
|
|
64
|
+
|
|
65
|
+
## [9.10.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v9.10.0)
|
|
66
|
+
|
|
67
|
+
Wed, 01 Apr 2026 15:52:43 GMT
|
|
68
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.9.3..@fluentui/react-tooltip_v9.10.0)
|
|
69
|
+
|
|
70
|
+
### Minor changes
|
|
71
|
+
|
|
72
|
+
- feat: expose base hooks for Tooltip ([PR #35904](https://github.com/microsoft/fluentui/pull/35904) by dmytrokirpa@microsoft.com)
|
|
73
|
+
|
|
74
|
+
## [9.9.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v9.9.3)
|
|
75
|
+
|
|
76
|
+
Tue, 03 Mar 2026 09:43:43 GMT
|
|
77
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.9.2..@fluentui/react-tooltip_v9.9.3)
|
|
78
|
+
|
|
79
|
+
### Patches
|
|
80
|
+
|
|
81
|
+
- Bump @fluentui/react-positioning to v9.22.0 ([commit](https://github.com/microsoft/fluentui/commit/81e1556b008bfbd07fe427d89af6142459d74c6f) by beachball)
|
|
82
|
+
|
|
83
|
+
## [9.9.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v9.9.2)
|
|
84
|
+
|
|
85
|
+
Wed, 25 Feb 2026 13:32:28 GMT
|
|
86
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.9.1..@fluentui/react-tooltip_v9.9.2)
|
|
87
|
+
|
|
88
|
+
### Patches
|
|
89
|
+
|
|
90
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.1 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
|
|
91
|
+
- Bump @fluentui/react-portal to v9.8.11 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
|
|
92
|
+
- Bump @fluentui/react-positioning to v9.21.0 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
|
|
93
|
+
- Bump @fluentui/react-shared-contexts to v9.26.2 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
|
|
94
|
+
- Bump @fluentui/react-tabster to v9.26.13 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
|
|
95
|
+
- Bump @fluentui/react-utilities to v9.26.2 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
|
|
96
|
+
|
|
97
|
+
## [9.9.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v9.9.1)
|
|
98
|
+
|
|
99
|
+
Thu, 12 Feb 2026 10:46:15 GMT
|
|
100
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.9.0..@fluentui/react-tooltip_v9.9.1)
|
|
101
|
+
|
|
102
|
+
### Patches
|
|
103
|
+
|
|
104
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.0 ([PR #35743](https://github.com/microsoft/fluentui/pull/35743) by beachball)
|
|
105
|
+
|
|
106
|
+
## [9.9.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v9.9.0)
|
|
107
|
+
|
|
108
|
+
Thu, 22 Jan 2026 17:06:28 GMT
|
|
109
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.8.12..@fluentui/react-tooltip_v9.9.0)
|
|
110
|
+
|
|
111
|
+
### Minor changes
|
|
112
|
+
|
|
113
|
+
- feat: add base hook for Tooltip component ([PR #35637](https://github.com/microsoft/fluentui/pull/35637) by dmytrokirpa@microsoft.com)
|
|
114
|
+
- Bump @fluentui/react-jsx-runtime to v9.3.5 ([PR #35574](https://github.com/microsoft/fluentui/pull/35574) by beachball)
|
|
115
|
+
- Bump @fluentui/react-portal to v9.8.10 ([PR #35574](https://github.com/microsoft/fluentui/pull/35574) by beachball)
|
|
116
|
+
- Bump @fluentui/react-positioning to v9.20.12 ([PR #35574](https://github.com/microsoft/fluentui/pull/35574) by beachball)
|
|
117
|
+
- Bump @fluentui/react-shared-contexts to v9.26.1 ([PR #35574](https://github.com/microsoft/fluentui/pull/35574) by beachball)
|
|
118
|
+
- Bump @fluentui/react-tabster to v9.26.12 ([PR #35574](https://github.com/microsoft/fluentui/pull/35574) by beachball)
|
|
119
|
+
- Bump @fluentui/react-theme to v9.2.1 ([PR #35574](https://github.com/microsoft/fluentui/pull/35574) by beachball)
|
|
120
|
+
- Bump @fluentui/react-utilities to v9.26.1 ([PR #35574](https://github.com/microsoft/fluentui/pull/35574) by beachball)
|
|
23
121
|
|
|
24
122
|
## [9.8.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v9.8.12)
|
|
25
123
|
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
2
|
+
import type { ComponentState } from '@fluentui/react-utilities';
|
|
3
|
+
import type { JSXElement } from '@fluentui/react-utilities';
|
|
4
|
+
import type { PortalProps } from '@fluentui/react-portal';
|
|
5
|
+
import type { PositioningShorthand } from '@fluentui/react-positioning';
|
|
6
|
+
import type * as React_2 from 'react';
|
|
7
|
+
import type { Slot } from '@fluentui/react-utilities';
|
|
8
|
+
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
9
|
+
import type { TriggerProps } from '@fluentui/react-utilities';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Data for the Tooltip's onVisibleChange event.
|
|
13
|
+
*/
|
|
14
|
+
export declare type OnVisibleChangeData = {
|
|
15
|
+
visible: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The event object, if this visibility change was triggered by a keyboard event on the document element
|
|
18
|
+
* (such as Escape to hide the visible tooltip). Otherwise undefined.
|
|
19
|
+
*/
|
|
20
|
+
documentKeyboardEvent?: KeyboardEvent;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Render the final JSX of Tooltip
|
|
25
|
+
*/
|
|
26
|
+
export declare const renderTooltip_unstable: (state: TooltipBaseState) => JSXElement;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A tooltip provides light weight contextual information on top of its target element.
|
|
30
|
+
*/
|
|
31
|
+
export declare const Tooltip: React_2.FC<TooltipProps>;
|
|
32
|
+
|
|
33
|
+
export declare type TooltipBaseProps = Omit<TooltipProps, 'appearance'>;
|
|
34
|
+
|
|
35
|
+
export declare type TooltipBaseState = Omit<TooltipState, 'appearance'>;
|
|
36
|
+
|
|
37
|
+
export declare const tooltipClassNames: SlotClassNames<TooltipSlots>;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Properties for Tooltip
|
|
41
|
+
*/
|
|
42
|
+
export declare type TooltipProps = ComponentProps<TooltipSlots> & TriggerProps<TooltipTriggerProps> & Pick<PortalProps, 'mountNode'> & {
|
|
43
|
+
/**
|
|
44
|
+
* The tooltip's visual appearance.
|
|
45
|
+
* * `normal` - Uses the theme's background and text colors.
|
|
46
|
+
* * `inverted` - Higher contrast variant that uses the theme's inverted colors.
|
|
47
|
+
*
|
|
48
|
+
* @default normal
|
|
49
|
+
*/
|
|
50
|
+
appearance?: 'normal' | 'inverted';
|
|
51
|
+
/**
|
|
52
|
+
* Delay before the tooltip is hidden, in milliseconds.
|
|
53
|
+
*
|
|
54
|
+
* @default 250
|
|
55
|
+
*/
|
|
56
|
+
hideDelay?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Notification when the visibility of the tooltip is changing.
|
|
59
|
+
*
|
|
60
|
+
* **Note**: for backwards compatibility, `event` will be undefined if this was triggered by a keyboard event on
|
|
61
|
+
* the document element. Use `data.documentKeyboardEvent` if the keyboard event object is needed.
|
|
62
|
+
*/
|
|
63
|
+
onVisibleChange?: (event: React_2.PointerEvent<HTMLElement> | React_2.FocusEvent<HTMLElement> | undefined, data: OnVisibleChangeData) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Configure the positioning of the tooltip
|
|
66
|
+
*
|
|
67
|
+
* @default above
|
|
68
|
+
*/
|
|
69
|
+
positioning?: PositioningShorthand;
|
|
70
|
+
/**
|
|
71
|
+
* (Required) Specifies whether this tooltip is acting as the description or label of its trigger element.
|
|
72
|
+
*
|
|
73
|
+
* * `label` - The tooltip sets the trigger's aria-label or aria-labelledby attribute. This is useful for buttons
|
|
74
|
+
* displaying only an icon, for example.
|
|
75
|
+
* * `description` - The tooltip sets the trigger's aria-description or aria-describedby attribute.
|
|
76
|
+
* * `inaccessible` - No aria attributes are set on the trigger. This makes the tooltip's content inaccessible to
|
|
77
|
+
* screen readers, and should only be used if the tooltip's text is available by some other means.
|
|
78
|
+
*/
|
|
79
|
+
relationship: 'label' | 'description' | 'inaccessible';
|
|
80
|
+
/**
|
|
81
|
+
* Delay before the tooltip is shown, in milliseconds.
|
|
82
|
+
*
|
|
83
|
+
* @default 250
|
|
84
|
+
*/
|
|
85
|
+
showDelay?: number;
|
|
86
|
+
/**
|
|
87
|
+
* Control the tooltip's visibility programatically.
|
|
88
|
+
*
|
|
89
|
+
* This can be used in conjunction with onVisibleChange to modify the tooltip's show and hide behavior.
|
|
90
|
+
*
|
|
91
|
+
* If not provided, the visibility will be controlled by the tooltip itself, based on hover and focus events on the
|
|
92
|
+
* trigger (child) element.
|
|
93
|
+
*
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
visible?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Render an arrow pointing to the target element
|
|
99
|
+
*
|
|
100
|
+
* @default false
|
|
101
|
+
*/
|
|
102
|
+
withArrow?: boolean;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Slot properties for Tooltip
|
|
107
|
+
*/
|
|
108
|
+
export declare type TooltipSlots = {
|
|
109
|
+
/**
|
|
110
|
+
* The text or JSX content of the tooltip.
|
|
111
|
+
*/
|
|
112
|
+
content: NonNullable<Slot<'div'>>;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* State used in rendering Tooltip
|
|
117
|
+
*/
|
|
118
|
+
export declare type TooltipState = ComponentState<TooltipSlots> & Pick<TooltipProps, 'mountNode' | 'relationship'> & Required<Pick<TooltipProps, 'appearance' | 'hideDelay' | 'positioning' | 'showDelay' | 'visible' | 'withArrow'>> & {
|
|
119
|
+
children?: JSXElement | null;
|
|
120
|
+
/**
|
|
121
|
+
* Whether the tooltip should be rendered to the DOM.
|
|
122
|
+
*/
|
|
123
|
+
shouldRenderTooltip?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Ref to the arrow element
|
|
126
|
+
*/
|
|
127
|
+
arrowRef?: React_2.Ref<HTMLDivElement>;
|
|
128
|
+
/**
|
|
129
|
+
* CSS class for the arrow element
|
|
130
|
+
*/
|
|
131
|
+
arrowClassName?: string;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* The properties that are added to the child of the Tooltip
|
|
136
|
+
*/
|
|
137
|
+
export declare type TooltipTriggerProps = {
|
|
138
|
+
ref?: React_2.Ref<unknown>;
|
|
139
|
+
} & Pick<React_2.HTMLAttributes<HTMLElement>, 'aria-describedby' | 'aria-label' | 'aria-labelledby' | 'onBlur' | 'onFocus' | 'onPointerEnter' | 'onPointerLeave' | 'aria-haspopup' | 'aria-expanded'>;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Create the state required to render Tooltip.
|
|
143
|
+
*
|
|
144
|
+
* The returned state can be modified with hooks such as useTooltipStyles_unstable,
|
|
145
|
+
* before being passed to renderTooltip_unstable.
|
|
146
|
+
*
|
|
147
|
+
* @param props - props from this instance of Tooltip
|
|
148
|
+
*/
|
|
149
|
+
export declare const useTooltip_unstable: (props: TooltipProps) => TooltipState;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Create the state required to render Tooltip.
|
|
153
|
+
*
|
|
154
|
+
* The returned state can be modified with hooks such as useTooltipStyles_unstable,
|
|
155
|
+
* before being passed to renderTooltip_unstable.
|
|
156
|
+
*
|
|
157
|
+
* @param props - props from this instance of Tooltip
|
|
158
|
+
*/
|
|
159
|
+
export declare const useTooltipBase_unstable: (props: TooltipBaseProps) => TooltipBaseState;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Apply styling to the Tooltip slots based on the state
|
|
163
|
+
*/
|
|
164
|
+
export declare const useTooltipStyles_unstable: (state: TooltipState) => TooltipState;
|
|
165
|
+
|
|
166
|
+
export { }
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { ComponentState } from '@fluentui/react-utilities';
|
|
|
3
3
|
import type { JSXElement } from '@fluentui/react-utilities';
|
|
4
4
|
import type { PortalProps } from '@fluentui/react-portal';
|
|
5
5
|
import type { PositioningShorthand } from '@fluentui/react-positioning';
|
|
6
|
-
import * as React_2 from 'react';
|
|
6
|
+
import type * as React_2 from 'react';
|
|
7
7
|
import type { Slot } from '@fluentui/react-utilities';
|
|
8
8
|
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
9
9
|
import type { TriggerProps } from '@fluentui/react-utilities';
|
|
@@ -23,13 +23,17 @@ export declare type OnVisibleChangeData = {
|
|
|
23
23
|
/**
|
|
24
24
|
* Render the final JSX of Tooltip
|
|
25
25
|
*/
|
|
26
|
-
export declare const renderTooltip_unstable: (state:
|
|
26
|
+
export declare const renderTooltip_unstable: (state: TooltipBaseState) => JSXElement;
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* A tooltip provides light weight contextual information on top of its target element.
|
|
30
30
|
*/
|
|
31
31
|
export declare const Tooltip: React_2.FC<TooltipProps>;
|
|
32
32
|
|
|
33
|
+
export declare type TooltipBaseProps = Omit<TooltipProps, 'appearance'>;
|
|
34
|
+
|
|
35
|
+
export declare type TooltipBaseState = Omit<TooltipState, 'appearance'>;
|
|
36
|
+
|
|
33
37
|
export declare const tooltipClassNames: SlotClassNames<TooltipSlots>;
|
|
34
38
|
|
|
35
39
|
/**
|
|
@@ -144,6 +148,16 @@ export declare type TooltipTriggerProps = {
|
|
|
144
148
|
*/
|
|
145
149
|
export declare const useTooltip_unstable: (props: TooltipProps) => TooltipState;
|
|
146
150
|
|
|
151
|
+
/**
|
|
152
|
+
* Create the state required to render Tooltip.
|
|
153
|
+
*
|
|
154
|
+
* The returned state can be modified with hooks such as useTooltipStyles_unstable,
|
|
155
|
+
* before being passed to renderTooltip_unstable.
|
|
156
|
+
*
|
|
157
|
+
* @param props - props from this instance of Tooltip
|
|
158
|
+
*/
|
|
159
|
+
export declare const useTooltipBase_unstable: (props: TooltipBaseProps) => TooltipBaseState;
|
|
160
|
+
|
|
147
161
|
/**
|
|
148
162
|
* Apply styling to the Tooltip slots based on the state
|
|
149
163
|
*/
|
package/lib/Tooltip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Tooltip, renderTooltip_unstable, tooltipClassNames, useTooltipStyles_unstable, useTooltip_unstable, useTooltipBase_unstable } from
|
|
1
|
+
export { Tooltip, renderTooltip_unstable, tooltipClassNames, useTooltipStyles_unstable, useTooltip_unstable, useTooltipBase_unstable } from "./components/Tooltip/index.js";
|
package/lib/Tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Tooltip.ts"],"sourcesContent":["export type {\n OnVisibleChangeData,\n TooltipChildProps,\n TooltipBaseProps,\n TooltipProps,\n TooltipSlots,\n TooltipBaseState,\n TooltipState,\n} from './components/Tooltip/index';\nexport {\n Tooltip,\n renderTooltip_unstable,\n tooltipClassNames,\n useTooltipStyles_unstable,\n useTooltip_unstable,\n useTooltipBase_unstable,\n} from './components/Tooltip/index';\n"],"names":["Tooltip","renderTooltip_unstable","tooltipClassNames","useTooltipStyles_unstable","useTooltip_unstable","useTooltipBase_unstable"],"mappings":"AASA,SACEA,OAAO,EACPC,sBAAsB,EACtBC,iBAAiB,EACjBC,yBAAyB,EACzBC,mBAAmB,EACnBC,uBAAuB,QAClB,
|
|
1
|
+
{"version":3,"sources":["../src/Tooltip.ts"],"sourcesContent":["export type {\n OnVisibleChangeData,\n TooltipChildProps,\n TooltipBaseProps,\n TooltipProps,\n TooltipSlots,\n TooltipBaseState,\n TooltipState,\n} from './components/Tooltip/index';\nexport {\n Tooltip,\n renderTooltip_unstable,\n tooltipClassNames,\n useTooltipStyles_unstable,\n useTooltip_unstable,\n useTooltipBase_unstable,\n} from './components/Tooltip/index';\n"],"names":["Tooltip","renderTooltip_unstable","tooltipClassNames","useTooltipStyles_unstable","useTooltip_unstable","useTooltipBase_unstable"],"mappings":"AASA,SACEA,OAAO,EACPC,sBAAsB,EACtBC,iBAAiB,EACjBC,yBAAyB,EACzBC,mBAAmB,EACnBC,uBAAuB,QAClB,gCAA6B"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { useTooltipStyles_unstable } from './useTooltipStyles.styles';
|
|
2
|
+
import { useTooltip_unstable } from "./useTooltip.js";
|
|
3
|
+
import { renderTooltip_unstable } from "./renderTooltip.js";
|
|
4
|
+
import { useCustomStyleHook_unstable } from "@fluentui/react-shared-contexts";
|
|
5
|
+
import { useTooltipStyles_unstable } from "./useTooltipStyles.styles.js";
|
|
7
6
|
/**
|
|
8
7
|
* A tooltip provides light weight contextual information on top of its target element.
|
|
9
8
|
*/ export const Tooltip = (props)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTooltip_unstable } from './useTooltip';\nimport { renderTooltip_unstable } from './renderTooltip';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useTooltipStyles_unstable } from './useTooltipStyles.styles';\nimport type { TooltipProps } from './Tooltip.types';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\n\n/**\n * A tooltip provides light weight contextual information on top of its target element.\n */\nexport const Tooltip: React.FC<TooltipProps> = props => {\n const state = useTooltip_unstable(props);\n\n useTooltipStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTooltipStyles_unstable')(state);\n\n return renderTooltip_unstable(state);\n};\n\nTooltip.displayName = 'Tooltip';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\n(Tooltip as FluentTriggerComponent).isFluentTriggerComponent = true;\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useTooltip_unstable } from './useTooltip';\nimport { renderTooltip_unstable } from './renderTooltip';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useTooltipStyles_unstable } from './useTooltipStyles.styles';\nimport type { TooltipProps } from './Tooltip.types';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\n\n/**\n * A tooltip provides light weight contextual information on top of its target element.\n */\nexport const Tooltip: React.FC<TooltipProps> = props => {\n const state = useTooltip_unstable(props);\n\n useTooltipStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTooltipStyles_unstable')(state);\n\n return renderTooltip_unstable(state);\n};\n\nTooltip.displayName = 'Tooltip';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\n(Tooltip as FluentTriggerComponent).isFluentTriggerComponent = true;\n"],"names":["useTooltip_unstable","renderTooltip_unstable","useCustomStyleHook_unstable","useTooltipStyles_unstable","Tooltip","props","state","displayName","isFluentTriggerComponent"],"mappings":"AAAA;AAGA,SAASA,mBAAmB,QAAQ,kBAAe;AACnD,SAASC,sBAAsB,QAAQ,qBAAkB;AACzD,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,yBAAyB,QAAQ,+BAA4B;AAItE;;CAEC,GACD,OAAO,MAAMC,UAAkCC,CAAAA;IAC7C,MAAMC,QAAQN,oBAAoBK;IAElCF,0BAA0BG;IAE1BJ,4BAA4B,6BAA6BI;IAEzD,OAAOL,uBAAuBK;AAChC,EAAE;AAEFF,QAAQG,WAAW,GAAG;AACtB,6FAA6F;AAC5FH,QAAmCI,wBAAwB,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export { };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Tooltip/Tooltip.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { PositioningShorthand } from '@fluentui/react-positioning';\nimport type { ComponentProps, ComponentState, JSXElement, Slot, TriggerProps } from '@fluentui/react-utilities';\nimport type { PortalProps } from '@fluentui/react-portal';\n\n/**\n * Slot properties for Tooltip\n */\nexport type TooltipSlots = {\n /**\n * The text or JSX content of the tooltip.\n */\n content: NonNullable<Slot<'div'>>;\n};\n\n/**\n * The properties that are added to the child of the Tooltip\n */\nexport type TooltipChildProps = {\n ref?: React.Ref<unknown>;\n} & Pick<\n React.HTMLAttributes<HTMLElement>,\n | 'aria-describedby'\n | 'aria-label'\n | 'aria-labelledby'\n | 'onBlur'\n | 'onFocus'\n | 'onPointerEnter'\n | 'onPointerLeave'\n | 'aria-haspopup'\n | 'aria-expanded'\n>;\n\n/**\n * Data for the Tooltip's onVisibleChange event.\n */\nexport type OnVisibleChangeData = {\n visible: boolean;\n\n /**\n * The event object, if this visibility change was triggered by a keyboard event on the document element\n * (such as Escape to hide the visible tooltip). Otherwise undefined.\n */\n documentKeyboardEvent?: KeyboardEvent;\n};\n\n/**\n * Properties for Tooltip\n */\nexport type TooltipProps = ComponentProps<TooltipSlots> &\n TriggerProps<TooltipChildProps> &\n Pick<PortalProps, 'mountNode'> & {\n /**\n * The tooltip's visual appearance.\n * * `normal` - Uses the theme's background and text colors.\n * * `inverted` - Higher contrast variant that uses the theme's inverted colors.\n *\n * @default normal\n */\n appearance?: 'normal' | 'inverted';\n /**\n * Delay before the tooltip is hidden, in milliseconds.\n *\n * @default 250\n */\n hideDelay?: number;\n\n /**\n * Notification when the visibility of the tooltip is changing.\n *\n * **Note**: for backwards compatibility, `event` will be undefined if this was triggered by a keyboard event on\n * the document element. Use `data.documentKeyboardEvent` if the keyboard event object is needed.\n */\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onVisibleChange?: (\n event: React.PointerEvent<HTMLElement> | React.FocusEvent<HTMLElement> | undefined,\n data: OnVisibleChangeData,\n ) => void;\n\n /**\n * Configure the positioning of the tooltip\n *\n * @default above\n */\n positioning?: PositioningShorthand;\n\n /**\n * (Required) Specifies whether this tooltip is acting as the description or label of its trigger element.\n *\n * * `label` - The tooltip sets the trigger's aria-label or aria-labelledby attribute. This is useful for buttons\n * displaying only an icon, for example.\n * * `description` - The tooltip sets the trigger's aria-description or aria-describedby attribute.\n * * `inaccessible` - No aria attributes are set on the trigger. This makes the tooltip's content inaccessible to\n * screen readers, and should only be used if the tooltip's text is available by some other means.\n */\n relationship: 'label' | 'description' | 'inaccessible';\n\n /**\n * Delay before the tooltip is shown, in milliseconds.\n *\n * @default 250\n */\n showDelay?: number;\n\n /**\n * Control the tooltip's visibility programatically.\n *\n * This can be used in conjunction with onVisibleChange to modify the tooltip's show and hide behavior.\n *\n * If not provided, the visibility will be controlled by the tooltip itself, based on hover and focus events on the\n * trigger (child) element.\n *\n * @default false\n */\n visible?: boolean;\n\n /**\n * Render an arrow pointing to the target element\n *\n * @default false\n */\n withArrow?: boolean;\n };\n\nexport type TooltipBaseProps = Omit<TooltipProps, 'appearance'>;\n\n/**\n * State used in rendering Tooltip\n */\nexport type TooltipState = ComponentState<TooltipSlots> &\n Pick<TooltipProps, 'mountNode' | 'relationship'> &\n Required<Pick<TooltipProps, 'appearance' | 'hideDelay' | 'positioning' | 'showDelay' | 'visible' | 'withArrow'>> & {\n children?: JSXElement | null;\n\n /**\n * Whether the tooltip should be rendered to the DOM.\n */\n shouldRenderTooltip?: boolean;\n\n /**\n * Ref to the arrow element\n */\n arrowRef?: React.Ref<HTMLDivElement>;\n\n /**\n * CSS class for the arrow element\n */\n arrowClassName?: string;\n };\n\nexport type TooltipBaseState = Omit<TooltipState, 'appearance'>;\n"],"names":[
|
|
1
|
+
{"version":3,"sources":["../src/components/Tooltip/Tooltip.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { PositioningShorthand } from '@fluentui/react-positioning';\nimport type { ComponentProps, ComponentState, JSXElement, Slot, TriggerProps } from '@fluentui/react-utilities';\nimport type { PortalProps } from '@fluentui/react-portal';\n\n/**\n * Slot properties for Tooltip\n */\nexport type TooltipSlots = {\n /**\n * The text or JSX content of the tooltip.\n */\n content: NonNullable<Slot<'div'>>;\n};\n\n/**\n * The properties that are added to the child of the Tooltip\n */\nexport type TooltipChildProps = {\n ref?: React.Ref<unknown>;\n} & Pick<\n React.HTMLAttributes<HTMLElement>,\n | 'aria-describedby'\n | 'aria-label'\n | 'aria-labelledby'\n | 'onBlur'\n | 'onFocus'\n | 'onPointerEnter'\n | 'onPointerLeave'\n | 'aria-haspopup'\n | 'aria-expanded'\n>;\n\n/**\n * Data for the Tooltip's onVisibleChange event.\n */\nexport type OnVisibleChangeData = {\n visible: boolean;\n\n /**\n * The event object, if this visibility change was triggered by a keyboard event on the document element\n * (such as Escape to hide the visible tooltip). Otherwise undefined.\n */\n documentKeyboardEvent?: KeyboardEvent;\n};\n\n/**\n * Properties for Tooltip\n */\nexport type TooltipProps = ComponentProps<TooltipSlots> &\n TriggerProps<TooltipChildProps> &\n Pick<PortalProps, 'mountNode'> & {\n /**\n * The tooltip's visual appearance.\n * * `normal` - Uses the theme's background and text colors.\n * * `inverted` - Higher contrast variant that uses the theme's inverted colors.\n *\n * @default normal\n */\n appearance?: 'normal' | 'inverted';\n /**\n * Delay before the tooltip is hidden, in milliseconds.\n *\n * @default 250\n */\n hideDelay?: number;\n\n /**\n * Notification when the visibility of the tooltip is changing.\n *\n * **Note**: for backwards compatibility, `event` will be undefined if this was triggered by a keyboard event on\n * the document element. Use `data.documentKeyboardEvent` if the keyboard event object is needed.\n */\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onVisibleChange?: (\n event: React.PointerEvent<HTMLElement> | React.FocusEvent<HTMLElement> | undefined,\n data: OnVisibleChangeData,\n ) => void;\n\n /**\n * Configure the positioning of the tooltip\n *\n * @default above\n */\n positioning?: PositioningShorthand;\n\n /**\n * (Required) Specifies whether this tooltip is acting as the description or label of its trigger element.\n *\n * * `label` - The tooltip sets the trigger's aria-label or aria-labelledby attribute. This is useful for buttons\n * displaying only an icon, for example.\n * * `description` - The tooltip sets the trigger's aria-description or aria-describedby attribute.\n * * `inaccessible` - No aria attributes are set on the trigger. This makes the tooltip's content inaccessible to\n * screen readers, and should only be used if the tooltip's text is available by some other means.\n */\n relationship: 'label' | 'description' | 'inaccessible';\n\n /**\n * Delay before the tooltip is shown, in milliseconds.\n *\n * @default 250\n */\n showDelay?: number;\n\n /**\n * Control the tooltip's visibility programatically.\n *\n * This can be used in conjunction with onVisibleChange to modify the tooltip's show and hide behavior.\n *\n * If not provided, the visibility will be controlled by the tooltip itself, based on hover and focus events on the\n * trigger (child) element.\n *\n * @default false\n */\n visible?: boolean;\n\n /**\n * Render an arrow pointing to the target element\n *\n * @default false\n */\n withArrow?: boolean;\n };\n\nexport type TooltipBaseProps = Omit<TooltipProps, 'appearance'>;\n\n/**\n * State used in rendering Tooltip\n */\nexport type TooltipState = ComponentState<TooltipSlots> &\n Pick<TooltipProps, 'mountNode' | 'relationship'> &\n Required<Pick<TooltipProps, 'appearance' | 'hideDelay' | 'positioning' | 'showDelay' | 'visible' | 'withArrow'>> & {\n children?: JSXElement | null;\n\n /**\n * Whether the tooltip should be rendered to the DOM.\n */\n shouldRenderTooltip?: boolean;\n\n /**\n * Ref to the arrow element\n */\n arrowRef?: React.Ref<HTMLDivElement>;\n\n /**\n * CSS class for the arrow element\n */\n arrowClassName?: string;\n };\n\nexport type TooltipBaseState = Omit<TooltipState, 'appearance'>;\n"],"names":[],"mappings":"AAsJA,WAAgE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { Tooltip } from
|
|
2
|
-
export { renderTooltip_unstable } from
|
|
3
|
-
export { useTooltip_unstable } from
|
|
4
|
-
export { useTooltipBase_unstable } from
|
|
5
|
-
export { tooltipClassNames, useTooltipStyles_unstable } from
|
|
1
|
+
export { Tooltip } from "./Tooltip.js";
|
|
2
|
+
export { renderTooltip_unstable } from "./renderTooltip.js";
|
|
3
|
+
export { useTooltip_unstable } from "./useTooltip.js";
|
|
4
|
+
export { useTooltipBase_unstable } from "./useTooltipBase.js";
|
|
5
|
+
export { tooltipClassNames, useTooltipStyles_unstable } from "./useTooltipStyles.styles.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Tooltip/index.ts"],"sourcesContent":["export { Tooltip } from './Tooltip';\nexport type {\n OnVisibleChangeData,\n TooltipChildProps,\n TooltipBaseProps,\n TooltipProps,\n TooltipSlots,\n TooltipBaseState,\n TooltipState,\n} from './Tooltip.types';\nexport { renderTooltip_unstable } from './renderTooltip';\nexport { useTooltip_unstable } from './useTooltip';\nexport { useTooltipBase_unstable } from './useTooltipBase';\nexport { tooltipClassNames, useTooltipStyles_unstable } from './useTooltipStyles.styles';\n"],"names":["Tooltip","renderTooltip_unstable","useTooltip_unstable","useTooltipBase_unstable","tooltipClassNames","useTooltipStyles_unstable"],"mappings":"AAAA,SAASA,OAAO,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/Tooltip/index.ts"],"sourcesContent":["export { Tooltip } from './Tooltip';\nexport type {\n OnVisibleChangeData,\n TooltipChildProps,\n TooltipBaseProps,\n TooltipProps,\n TooltipSlots,\n TooltipBaseState,\n TooltipState,\n} from './Tooltip.types';\nexport { renderTooltip_unstable } from './renderTooltip';\nexport { useTooltip_unstable } from './useTooltip';\nexport { useTooltipBase_unstable } from './useTooltipBase';\nexport { tooltipClassNames, useTooltipStyles_unstable } from './useTooltipStyles.styles';\n"],"names":["Tooltip","renderTooltip_unstable","useTooltip_unstable","useTooltipBase_unstable","tooltipClassNames","useTooltipStyles_unstable"],"mappings":"AAAA,SAASA,OAAO,QAAQ,eAAY;AAUpC,SAASC,sBAAsB,QAAQ,qBAAkB;AACzD,SAASC,mBAAmB,QAAQ,kBAAe;AACnD,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,iBAAiB,EAAEC,yBAAyB,QAAQ,+BAA4B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { useFluent_unstable as useFluent } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useFluent_unstable as useFluent } from "@fluentui/react-shared-contexts";
|
|
4
4
|
const setTimeoutNoop = (_callback)=>-1;
|
|
5
5
|
const clearTimeoutNoop = (_handle)=>undefined;
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
-
import { Portal } from
|
|
3
|
-
import { assertSlots } from
|
|
2
|
+
import { Portal } from "@fluentui/react-portal";
|
|
3
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
4
4
|
/**
|
|
5
5
|
* Render the final JSX of Tooltip
|
|
6
6
|
*/ export const renderTooltip_unstable = (state)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Tooltip/renderTooltip.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { Portal } from '@fluentui/react-portal';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type {
|
|
1
|
+
{"version":3,"sources":["../src/components/Tooltip/renderTooltip.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { Portal } from '@fluentui/react-portal';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { TooltipBaseState, TooltipSlots } from './Tooltip.types';\n\n/**\n * Render the final JSX of Tooltip\n */\nexport const renderTooltip_unstable = (state: TooltipBaseState): JSXElement => {\n assertSlots<TooltipSlots>(state);\n\n return (\n <>\n {state.children}\n {state.shouldRenderTooltip && (\n <Portal mountNode={state.mountNode}>\n <state.content>\n {state.withArrow && <div ref={state.arrowRef} className={state.arrowClassName} />}\n {state.content.children}\n </state.content>\n </Portal>\n )}\n </>\n );\n};\n"],"names":["Portal","assertSlots","renderTooltip_unstable","state","children","shouldRenderTooltip","mountNode","content","withArrow","div","ref","arrowRef","className","arrowClassName"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,MAAM,QAAQ,yBAAyB;AAChD,SAASC,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,yBAAyB,CAACC;IACrCF,YAA0BE;IAE1B,qBACE;;YACGA,MAAMC,QAAQ;YACdD,MAAME,mBAAmB,kBACxB,KAACL;gBAAOM,WAAWH,MAAMG,SAAS;0BAChC,cAAA,MAACH,MAAMI,OAAO;;wBACXJ,MAAMK,SAAS,kBAAI,KAACC;4BAAIC,KAAKP,MAAMQ,QAAQ;4BAAEC,WAAWT,MAAMU,cAAc;;wBAC5EV,MAAMI,OAAO,CAACH,QAAQ;;;;;;AAMnC,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { useTooltipBase_unstable } from
|
|
2
|
+
import { useTooltipBase_unstable } from "./useTooltipBase.js";
|
|
3
3
|
/**
|
|
4
4
|
* Create the state required to render Tooltip.
|
|
5
5
|
*
|
|
@@ -8,9 +8,9 @@ import { useTooltipBase_unstable } from './useTooltipBase';
|
|
|
8
8
|
*
|
|
9
9
|
* @param props - props from this instance of Tooltip
|
|
10
10
|
*/ export const useTooltip_unstable = (props)=>{
|
|
11
|
-
'use no memo';
|
|
12
|
-
const { appearance = 'normal' } = props;
|
|
13
|
-
const state = useTooltipBase_unstable(
|
|
11
|
+
'use no memo'; // justified: compiler would optimize useTooltip_unstable — manual opt-out to preserve runtime behavior
|
|
12
|
+
const { appearance = 'normal', ...baseProps } = props;
|
|
13
|
+
const state = useTooltipBase_unstable(baseProps);
|
|
14
14
|
return {
|
|
15
15
|
appearance,
|
|
16
16
|
...state
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Tooltip/useTooltip.tsx"],"sourcesContent":["'use client';\n\nimport type { TooltipProps, TooltipState } from './Tooltip.types';\nimport { useTooltipBase_unstable } from './useTooltipBase';\n\n/**\n * Create the state required to render Tooltip.\n *\n * The returned state can be modified with hooks such as useTooltipStyles_unstable,\n * before being passed to renderTooltip_unstable.\n *\n * @param props - props from this instance of Tooltip\n */\nexport const useTooltip_unstable = (props: TooltipProps): TooltipState => {\n 'use no memo'
|
|
1
|
+
{"version":3,"sources":["../src/components/Tooltip/useTooltip.tsx"],"sourcesContent":["'use client';\n\nimport type { TooltipProps, TooltipState } from './Tooltip.types';\nimport { useTooltipBase_unstable } from './useTooltipBase';\n\n/**\n * Create the state required to render Tooltip.\n *\n * The returned state can be modified with hooks such as useTooltipStyles_unstable,\n * before being passed to renderTooltip_unstable.\n *\n * @param props - props from this instance of Tooltip\n */\nexport const useTooltip_unstable = (props: TooltipProps): TooltipState => {\n 'use no memo'; // justified: compiler would optimize useTooltip_unstable — manual opt-out to preserve runtime behavior\n\n const { appearance = 'normal', ...baseProps } = props;\n\n const state = useTooltipBase_unstable(baseProps);\n\n return {\n appearance,\n ...state,\n };\n};\n"],"names":["useTooltipBase_unstable","useTooltip_unstable","props","appearance","baseProps","state"],"mappings":"AAAA;AAGA,SAASA,uBAAuB,QAAQ,sBAAmB;AAE3D;;;;;;;CAOC,GACD,OAAO,MAAMC,sBAAsB,CAACC;IAClC,eAAe,uGAAuG;IAEtH,MAAM,EAAEC,aAAa,QAAQ,EAAE,GAAGC,WAAW,GAAGF;IAEhD,MAAMG,QAAQL,wBAAwBI;IAEtC,OAAO;QACLD;QACA,GAAGE,KAAK;IACV;AACF,EAAE"}
|