@fluentui/react-tooltip 9.10.3 → 9.10.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +29 -2
  2. package/dist/index.d.cts +170 -0
  3. package/dist/index.d.ts +4 -0
  4. package/lib/Tooltip.js +1 -1
  5. package/lib/Tooltip.js.map +1 -1
  6. package/lib/components/Tooltip/Tooltip.js +4 -4
  7. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  8. package/lib/components/Tooltip/Tooltip.types.js.map +1 -1
  9. package/lib/components/Tooltip/index.js +5 -5
  10. package/lib/components/Tooltip/index.js.map +1 -1
  11. package/lib/components/Tooltip/private/useTooltipTimeout.js +2 -2
  12. package/lib/components/Tooltip/renderTooltip.js +2 -2
  13. package/lib/components/Tooltip/useTooltip.js +1 -1
  14. package/lib/components/Tooltip/useTooltip.js.map +1 -1
  15. package/lib/components/Tooltip/useTooltipBase.js +19 -9
  16. package/lib/components/Tooltip/useTooltipBase.js.map +1 -1
  17. package/lib/components/Tooltip/useTooltipStyles.styles.js +10 -6
  18. package/lib/components/Tooltip/useTooltipStyles.styles.js.map +1 -1
  19. package/lib/components/Tooltip/useTooltipStyles.styles.raw.js +9 -5
  20. package/lib/components/Tooltip/useTooltipStyles.styles.raw.js.map +1 -1
  21. package/lib/index.js +1 -1
  22. package/lib/index.js.map +1 -1
  23. package/lib-commonjs/{Tooltip.js → Tooltip.cjs} +1 -1
  24. package/lib-commonjs/{Tooltip.js.map → Tooltip.cjs.map} +1 -1
  25. package/lib-commonjs/components/Tooltip/{Tooltip.js → Tooltip.cjs} +3 -3
  26. package/lib-commonjs/components/Tooltip/{Tooltip.js.map → Tooltip.cjs.map} +1 -1
  27. package/lib-commonjs/components/Tooltip/{Tooltip.types.js.map → Tooltip.types.cjs.map} +1 -1
  28. package/lib-commonjs/components/Tooltip/{index.js → index.cjs} +5 -5
  29. package/lib-commonjs/components/Tooltip/{index.js.map → index.cjs.map} +1 -1
  30. package/lib-commonjs/components/Tooltip/{useTooltip.js → useTooltip.cjs} +1 -1
  31. package/lib-commonjs/components/Tooltip/{useTooltip.js.map → useTooltip.cjs.map} +1 -1
  32. package/lib-commonjs/components/Tooltip/{useTooltipBase.js → useTooltipBase.cjs} +13 -3
  33. package/lib-commonjs/components/Tooltip/useTooltipBase.cjs.map +1 -0
  34. package/lib-commonjs/components/Tooltip/{useTooltipStyles.styles.js → useTooltipStyles.styles.cjs} +7 -1
  35. package/lib-commonjs/components/Tooltip/useTooltipStyles.styles.cjs.map +1 -0
  36. package/lib-commonjs/components/Tooltip/{useTooltipStyles.styles.raw.js → useTooltipStyles.styles.raw.cjs} +6 -2
  37. package/lib-commonjs/components/Tooltip/useTooltipStyles.styles.raw.cjs.map +1 -0
  38. package/lib-commonjs/{index.js → index.cjs} +1 -1
  39. package/lib-commonjs/{index.js.map → index.cjs.map} +1 -1
  40. package/package.json +21 -15
  41. package/lib-commonjs/components/Tooltip/useTooltipBase.js.map +0 -1
  42. package/lib-commonjs/components/Tooltip/useTooltipStyles.styles.js.map +0 -1
  43. package/lib-commonjs/components/Tooltip/useTooltipStyles.styles.raw.js.map +0 -1
  44. /package/lib-commonjs/components/Tooltip/{Tooltip.types.js → Tooltip.types.cjs} +0 -0
  45. /package/lib-commonjs/components/Tooltip/private/{constants.js → constants.cjs} +0 -0
  46. /package/lib-commonjs/components/Tooltip/private/{constants.js.map → constants.cjs.map} +0 -0
  47. /package/lib-commonjs/components/Tooltip/private/{useTooltipTimeout.js → useTooltipTimeout.cjs} +0 -0
  48. /package/lib-commonjs/components/Tooltip/private/{useTooltipTimeout.js.map → useTooltipTimeout.cjs.map} +0 -0
  49. /package/lib-commonjs/components/Tooltip/{renderTooltip.js → renderTooltip.cjs} +0 -0
  50. /package/lib-commonjs/components/Tooltip/{renderTooltip.js.map → renderTooltip.cjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,12 +1,39 @@
1
1
  # Change Log - @fluentui/react-tooltip
2
2
 
3
- This log was last generated on Wed, 24 Jun 2026 11:03:52 GMT and should not be manually modified.
3
+ <!-- This log was last generated on Tue, 11 Aug 2026 17:16:03 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.10.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v9.10.5)
8
+
9
+ Tue, 11 Aug 2026 17:16:03 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.10.4..@fluentui/react-tooltip_v9.10.5)
11
+
12
+ ### Patches
13
+
14
+ - Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake. ([PR #36327](https://github.com/microsoft/fluentui/pull/36327) by martinhochel@microsoft.com)
15
+ - Bump @fluentui/keyboard-keys to v9.0.9 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v9.4.5 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
17
+ - Bump @fluentui/react-portal to v9.8.15 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
+ - Bump @fluentui/react-positioning to v9.23.1 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
+ - Bump @fluentui/react-shared-contexts to v9.26.3 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
20
+ - Bump @fluentui/react-tabster to v9.26.17 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
21
+ - Bump @fluentui/react-theme to v9.2.2 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
22
+ - Bump @fluentui/react-utilities to v9.26.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
23
+
24
+ ## [9.10.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v9.10.4)
25
+
26
+ Tue, 04 Aug 2026 10:12:12 GMT
27
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.10.3..@fluentui/react-tooltip_v9.10.4)
28
+
29
+ ### Patches
30
+
31
+ - fix: hide Tooltip when its trigger scrolls outside an overflow container ([PR #36386](https://github.com/microsoft/fluentui/pull/36386) by paulmardling@microsoft.com)
32
+ - Bump @fluentui/react-positioning to v9.23.0 ([PR #36453](https://github.com/microsoft/fluentui/pull/36453) by beachball)
33
+
7
34
  ## [9.10.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v9.10.3)
8
35
 
9
- Wed, 24 Jun 2026 11:03:52 GMT
36
+ Wed, 24 Jun 2026 11:10:03 GMT
10
37
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.10.2..@fluentui/react-tooltip_v9.10.3)
11
38
 
12
39
  ### Patches
@@ -0,0 +1,170 @@
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 positioning has determined that the tooltip or its target is outside its clipping boundary.
122
+ */
123
+ hidden?: boolean;
124
+ /**
125
+ * Whether the tooltip should be rendered to the DOM.
126
+ */
127
+ shouldRenderTooltip?: boolean;
128
+ /**
129
+ * Ref to the arrow element
130
+ */
131
+ arrowRef?: React_2.Ref<HTMLDivElement>;
132
+ /**
133
+ * CSS class for the arrow element
134
+ */
135
+ arrowClassName?: string;
136
+ };
137
+
138
+ /**
139
+ * The properties that are added to the child of the Tooltip
140
+ */
141
+ export declare type TooltipTriggerProps = {
142
+ ref?: React_2.Ref<unknown>;
143
+ } & Pick<React_2.HTMLAttributes<HTMLElement>, 'aria-describedby' | 'aria-label' | 'aria-labelledby' | 'onBlur' | 'onFocus' | 'onPointerEnter' | 'onPointerLeave' | 'aria-haspopup' | 'aria-expanded'>;
144
+
145
+ /**
146
+ * Create the state required to render Tooltip.
147
+ *
148
+ * The returned state can be modified with hooks such as useTooltipStyles_unstable,
149
+ * before being passed to renderTooltip_unstable.
150
+ *
151
+ * @param props - props from this instance of Tooltip
152
+ */
153
+ export declare const useTooltip_unstable: (props: TooltipProps) => TooltipState;
154
+
155
+ /**
156
+ * Create the state required to render Tooltip.
157
+ *
158
+ * The returned state can be modified with hooks such as useTooltipStyles_unstable,
159
+ * before being passed to renderTooltip_unstable.
160
+ *
161
+ * @param props - props from this instance of Tooltip
162
+ */
163
+ export declare const useTooltipBase_unstable: (props: TooltipBaseProps) => TooltipBaseState;
164
+
165
+ /**
166
+ * Apply styling to the Tooltip slots based on the state
167
+ */
168
+ export declare const useTooltipStyles_unstable: (state: TooltipState) => TooltipState;
169
+
170
+ export { }
package/dist/index.d.ts CHANGED
@@ -117,6 +117,10 @@ export declare type TooltipSlots = {
117
117
  */
118
118
  export declare type TooltipState = ComponentState<TooltipSlots> & Pick<TooltipProps, 'mountNode' | 'relationship'> & Required<Pick<TooltipProps, 'appearance' | 'hideDelay' | 'positioning' | 'showDelay' | 'visible' | 'withArrow'>> & {
119
119
  children?: JSXElement | null;
120
+ /**
121
+ * Whether positioning has determined that the tooltip or its target is outside its clipping boundary.
122
+ */
123
+ hidden?: boolean;
120
124
  /**
121
125
  * Whether the tooltip should be rendered to the DOM.
122
126
  */
package/lib/Tooltip.js CHANGED
@@ -1 +1 @@
1
- export { Tooltip, renderTooltip_unstable, tooltipClassNames, useTooltipStyles_unstable, useTooltip_unstable, useTooltipBase_unstable } from './components/Tooltip/index';
1
+ export { Tooltip, renderTooltip_unstable, tooltipClassNames, useTooltipStyles_unstable, useTooltip_unstable, useTooltipBase_unstable } from "./components/Tooltip/index.js";
@@ -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,6BAA6B"}
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,8 +1,8 @@
1
1
  'use client';
2
- import { useTooltip_unstable } from './useTooltip';
3
- import { renderTooltip_unstable } from './renderTooltip';
4
- import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
5
- 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";
6
6
  /**
7
7
  * A tooltip provides light weight contextual information on top of its target element.
8
8
  */ export const Tooltip = (props)=>{
@@ -1 +1 @@
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,eAAe;AACnD,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,yBAAyB,QAAQ,4BAA4B;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
+ {"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
- {"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
+ {"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 positioning has determined that the tooltip or its target is outside its clipping boundary.\n */\n hidden?: boolean;\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":"AA2JA,WAAgE"}
@@ -1,5 +1,5 @@
1
- export { Tooltip } from './Tooltip';
2
- export { renderTooltip_unstable } from './renderTooltip';
3
- export { useTooltip_unstable } from './useTooltip';
4
- export { useTooltipBase_unstable } from './useTooltipBase';
5
- export { tooltipClassNames, useTooltipStyles_unstable } from './useTooltipStyles.styles';
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,YAAY;AAUpC,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,iBAAiB,EAAEC,yBAAyB,QAAQ,4BAA4B"}
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 'react';
3
- import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
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 '@fluentui/react-portal';
3
- import { assertSlots } from '@fluentui/react-utilities';
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,5 +1,5 @@
1
1
  'use client';
2
- import { useTooltipBase_unstable } from './useTooltipBase';
2
+ import { useTooltipBase_unstable } from "./useTooltipBase.js";
3
3
  /**
4
4
  * Create the state required to render Tooltip.
5
5
  *
@@ -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'; // 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,mBAAmB;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"}
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"}
@@ -1,12 +1,12 @@
1
1
  'use client';
2
- import * as React from 'react';
3
- import { mergeArrowOffset, resolvePositioningShorthand, usePositioning } from '@fluentui/react-positioning';
4
- import { useTooltipVisibility_unstable as useTooltipVisibility, useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
5
- import { KEYBORG_FOCUSIN, useIsNavigatingWithKeyboard } from '@fluentui/react-tabster';
6
- import { applyTriggerPropsToChildren, useControllableState, useId, useIsomorphicLayoutEffect, useIsSSR, useMergedRefs, getTriggerChild, mergeCallbacks, useEventCallback, slot, getReactElementRef } from '@fluentui/react-utilities';
7
- import { arrowHeight, tooltipBorderRadius } from './private/constants';
8
- import { useTooltipTimeout } from './private/useTooltipTimeout';
9
- import { Escape } from '@fluentui/keyboard-keys';
2
+ import * as React from "react";
3
+ import { mergeArrowOffset, resolvePositioningShorthand, usePositioning } from "@fluentui/react-positioning";
4
+ import { useTooltipVisibility_unstable as useTooltipVisibility, useFluent_unstable as useFluent } from "@fluentui/react-shared-contexts";
5
+ import { KEYBORG_FOCUSIN, useIsNavigatingWithKeyboard } from "@fluentui/react-tabster";
6
+ import { applyTriggerPropsToChildren, useControllableState, useId, useIsomorphicLayoutEffect, useIsSSR, useMergedRefs, getTriggerChild, mergeCallbacks, useEventCallback, slot, getReactElementRef } from "@fluentui/react-utilities";
7
+ import { arrowHeight, tooltipBorderRadius } from "./private/constants.js";
8
+ import { useTooltipTimeout } from "./private/useTooltipTimeout.js";
9
+ import { Escape } from "@fluentui/keyboard-keys";
10
10
  /**
11
11
  * Create the state required to render Tooltip.
12
12
  *
@@ -23,6 +23,7 @@ import { Escape } from '@fluentui/keyboard-keys';
23
23
  state: props.visible,
24
24
  initialState: false
25
25
  });
26
+ const [hidden, setHidden] = React.useState(false);
26
27
  const { children, content, withArrow = false, positioning = 'above', onVisibleChange, relationship, showDelay = 250, hideDelay = 250, mountNode } = props;
27
28
  const state = {
28
29
  withArrow,
@@ -31,6 +32,7 @@ import { Escape } from '@fluentui/keyboard-keys';
31
32
  hideDelay,
32
33
  relationship,
33
34
  visible,
35
+ hidden,
34
36
  shouldRenderTooltip: visible,
35
37
  mountNode,
36
38
  // Slots
@@ -45,13 +47,21 @@ import { Escape } from '@fluentui/keyboard-keys';
45
47
  })
46
48
  };
47
49
  state.content.id = useId('tooltip-', state.content.id);
50
+ const resolvedPositioning = resolvePositioningShorthand(state.positioning);
51
+ const onPositioningEnd = useEventCallback((event)=>{
52
+ var _resolvedPositioning_onPositioningEnd;
53
+ const { escaped, referenceHidden } = event.detail;
54
+ setHidden(escaped || referenceHidden);
55
+ (_resolvedPositioning_onPositioningEnd = resolvedPositioning.onPositioningEnd) === null || _resolvedPositioning_onPositioningEnd === void 0 ? void 0 : _resolvedPositioning_onPositioningEnd.call(resolvedPositioning, event);
56
+ });
48
57
  const positioningOptions = {
49
58
  enabled: state.visible,
50
59
  arrowPadding: 2 * tooltipBorderRadius,
51
60
  position: 'above',
52
61
  align: 'center',
53
62
  offset: 4,
54
- ...resolvePositioningShorthand(state.positioning)
63
+ ...resolvedPositioning,
64
+ onPositioningEnd
55
65
  };
56
66
  if (state.withArrow) {
57
67
  positioningOptions.offset = mergeArrowOffset(positioningOptions.offset, arrowHeight);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Tooltip/useTooltipBase.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { mergeArrowOffset, resolvePositioningShorthand, usePositioning } from '@fluentui/react-positioning';\nimport {\n useTooltipVisibility_unstable as useTooltipVisibility,\n useFluent_unstable as useFluent,\n} from '@fluentui/react-shared-contexts';\nimport type { KeyborgFocusInEvent } from '@fluentui/react-tabster';\nimport { KEYBORG_FOCUSIN, useIsNavigatingWithKeyboard } from '@fluentui/react-tabster';\nimport {\n applyTriggerPropsToChildren,\n useControllableState,\n useId,\n useIsomorphicLayoutEffect,\n useIsSSR,\n useMergedRefs,\n getTriggerChild,\n mergeCallbacks,\n useEventCallback,\n slot,\n getReactElementRef,\n} from '@fluentui/react-utilities';\nimport type { TooltipBaseProps, TooltipBaseState, TooltipChildProps, OnVisibleChangeData } from './Tooltip.types';\nimport { arrowHeight, tooltipBorderRadius } from './private/constants';\nimport { useTooltipTimeout } from './private/useTooltipTimeout';\nimport { Escape } from '@fluentui/keyboard-keys';\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 useTooltipBase_unstable = (props: TooltipBaseProps): TooltipBaseState => {\n const context = useTooltipVisibility();\n const isServerSideRender = useIsSSR();\n const { targetDocument } = useFluent();\n\n const [visible, setVisibleInternal] = useControllableState({ state: props.visible, initialState: false });\n\n const {\n children,\n content,\n withArrow = false,\n positioning = 'above',\n onVisibleChange,\n relationship,\n showDelay = 250,\n hideDelay = 250,\n mountNode,\n } = props;\n\n const state: TooltipBaseState = {\n withArrow,\n positioning,\n showDelay,\n hideDelay,\n relationship,\n visible,\n shouldRenderTooltip: visible,\n mountNode,\n // Slots\n components: {\n content: 'div',\n },\n content: slot.always(content, {\n defaultProps: {\n role: 'tooltip',\n },\n elementType: 'div',\n }),\n };\n\n state.content.id = useId('tooltip-', state.content.id);\n\n const positioningOptions = {\n enabled: state.visible,\n arrowPadding: 2 * tooltipBorderRadius,\n position: 'above' as const,\n align: 'center' as const,\n offset: 4,\n ...resolvePositioningShorthand(state.positioning),\n };\n\n if (state.withArrow) {\n positioningOptions.offset = mergeArrowOffset(positioningOptions.offset, arrowHeight);\n }\n\n const {\n targetRef,\n containerRef,\n arrowRef,\n }: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n targetRef: React.MutableRefObject<unknown>;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n containerRef: React.MutableRefObject<HTMLDivElement>;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n arrowRef: React.MutableRefObject<HTMLDivElement>;\n } = usePositioning(positioningOptions);\n\n const [setDelayTimeout, clearDelayTimeout] = useTooltipTimeout(containerRef);\n\n const setVisible = React.useCallback(\n (ev: React.PointerEvent<HTMLElement> | React.FocusEvent<HTMLElement> | undefined, data: OnVisibleChangeData) => {\n clearDelayTimeout();\n setVisibleInternal(oldVisible => {\n if (data.visible !== oldVisible) {\n onVisibleChange?.(ev, data);\n }\n return data.visible;\n });\n },\n [clearDelayTimeout, setVisibleInternal, onVisibleChange],\n );\n\n state.content.ref = useMergedRefs(state.content.ref, containerRef);\n state.arrowRef = arrowRef;\n\n // When this tooltip is visible, hide any other tooltips, and register it\n // as the visibleTooltip with the TooltipContext.\n // Also add a listener on document to hide the tooltip if Escape is pressed\n useIsomorphicLayoutEffect(() => {\n if (visible) {\n const thisTooltip = {\n hide: (ev?: KeyboardEvent) => setVisible(undefined, { visible: false, documentKeyboardEvent: ev }),\n };\n\n context.visibleTooltip?.hide();\n // eslint-disable-next-line react-hooks/immutability\n context.visibleTooltip = thisTooltip;\n\n const onDocumentKeyDown = (ev: KeyboardEvent) => {\n if (ev.key === Escape && !ev.defaultPrevented) {\n thisTooltip.hide(ev);\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: Dialog, Popover, Menu and Tooltip\n ev.preventDefault();\n }\n };\n\n targetDocument?.addEventListener('keydown', onDocumentKeyDown, {\n // As this event is added at targeted document,\n // we need to capture the event to be sure keydown handling from tooltip happens first\n capture: true,\n });\n\n // Dismiss the tooltip when the document becomes hidden (e.g. tab backgrounded,\n // app switched on mobile). The original trigger (hover/tap/focus) is no longer\n // active in this case, so persisting the tooltip is a stale UI state.\n const onDocumentVisibilityChange = () => {\n if (targetDocument?.visibilityState === 'hidden') {\n thisTooltip.hide();\n }\n };\n\n targetDocument?.addEventListener('visibilitychange', onDocumentVisibilityChange);\n\n return () => {\n if (context.visibleTooltip === thisTooltip) {\n context.visibleTooltip = undefined;\n }\n\n targetDocument?.removeEventListener('keydown', onDocumentKeyDown, { capture: true });\n targetDocument?.removeEventListener('visibilitychange', onDocumentVisibilityChange);\n };\n }\n }, [context, targetDocument, visible, setVisible]);\n\n // Used to skip showing the tooltip in certain situations when the trigger is focused.\n // See comments where this is set for more info.\n const ignoreNextFocusEventRef = React.useRef(false);\n\n // Listener for onPointerEnter and onFocus on the trigger element\n const onEnterTrigger = React.useCallback(\n // eslint-disable-next-line react-hooks/preserve-manual-memoization\n (ev: React.PointerEvent<HTMLElement> | React.FocusEvent<HTMLElement>) => {\n if (ev.type === 'focus' && ignoreNextFocusEventRef.current) {\n ignoreNextFocusEventRef.current = false;\n return;\n }\n\n // Show immediately if another tooltip is already visible\n const delay = context.visibleTooltip ? 0 : state.showDelay;\n\n setDelayTimeout(() => {\n setVisible(ev, { visible: true });\n }, delay);\n\n ev.persist(); // Persist the event since the setVisible call will happen asynchronously\n },\n [setDelayTimeout, setVisible, state.showDelay, context],\n );\n\n const isNavigatingWithKeyboard = useIsNavigatingWithKeyboard();\n\n // Callback ref that attaches a keyborg:focusin event listener.\n const [keyborgListenerCallbackRef] = React.useState(() => {\n const onKeyborgFocusIn = ((ev: KeyborgFocusInEvent) => {\n // Skip showing the tooltip if focus moved programmatically.\n // For example, we don't want to show the tooltip when a dialog is closed\n // and Tabster programmatically restores focus to the trigger button.\n // See https://github.com/microsoft/fluentui/issues/27576\n if (ev.detail?.isFocusedProgrammatically && !isNavigatingWithKeyboard()) {\n ignoreNextFocusEventRef.current = true;\n }\n }) as EventListener;\n\n // Save the current element to remove the listener when the ref changes\n let current: Element | null = null;\n\n // Callback ref that attaches the listener to the element\n return (element: Element | null) => {\n current?.removeEventListener(KEYBORG_FOCUSIN, onKeyborgFocusIn);\n element?.addEventListener(KEYBORG_FOCUSIN, onKeyborgFocusIn);\n current = element;\n };\n });\n\n // Listener for onPointerLeave and onBlur on the trigger element\n const onLeaveTrigger = React.useCallback(\n // eslint-disable-next-line react-hooks/preserve-manual-memoization\n (ev: React.PointerEvent<HTMLElement> | React.FocusEvent<HTMLElement>) => {\n let delay = state.hideDelay;\n\n if (ev.type === 'blur') {\n // Hide immediately when losing focus\n delay = 0;\n\n // The focused element gets a blur event when the document loses focus\n // (e.g. switching tabs in the browser), but we don't want to show the\n // tooltip again when the document gets focus back. Handle this case by\n // checking if the blurred element is still the document's activeElement.\n // See https://github.com/microsoft/fluentui/issues/13541\n ignoreNextFocusEventRef.current = targetDocument?.activeElement === ev.target;\n }\n\n setDelayTimeout(() => {\n setVisible(ev, { visible: false });\n }, delay);\n\n ev.persist(); // Persist the event since the setVisible call will happen asynchronously\n },\n [setDelayTimeout, setVisible, state.hideDelay, targetDocument],\n );\n\n // Cancel the hide timer when the mouse or focus enters the tooltip, and restart it when the mouse or focus leaves.\n // This keeps the tooltip visible when the mouse is moved over it, or it has focus within.\n // eslint-disable-next-line react-hooks/immutability\n state.content.onPointerEnter = mergeCallbacks(state.content.onPointerEnter, clearDelayTimeout);\n // eslint-disable-next-line react-hooks/immutability, react-hooks/refs\n state.content.onPointerLeave = mergeCallbacks(state.content.onPointerLeave, onLeaveTrigger);\n // eslint-disable-next-line react-hooks/immutability\n state.content.onFocus = mergeCallbacks(state.content.onFocus, clearDelayTimeout);\n // eslint-disable-next-line react-hooks/immutability, react-hooks/refs\n state.content.onBlur = mergeCallbacks(state.content.onBlur, onLeaveTrigger);\n\n const child = getTriggerChild(children);\n\n const triggerAriaProps: Pick<TooltipChildProps, 'aria-label' | 'aria-labelledby' | 'aria-describedby'> = {};\n const isPopupExpanded =\n child?.props?.['aria-haspopup'] &&\n (child?.props?.['aria-expanded'] === true || child?.props?.['aria-expanded'] === 'true');\n\n if (relationship === 'label') {\n // aria-label only works if the content is a string. Otherwise, need to use aria-labelledby.\n if (typeof state.content.children === 'string') {\n triggerAriaProps['aria-label'] = state.content.children;\n } else {\n triggerAriaProps['aria-labelledby'] = state.content.id;\n // Always render the tooltip even if hidden, so that aria-labelledby refers to a valid element\n // eslint-disable-next-line react-hooks/immutability\n state.shouldRenderTooltip = true;\n }\n } else if (relationship === 'description') {\n triggerAriaProps['aria-describedby'] = state.content.id;\n // Always render the tooltip even if hidden, so that aria-describedby refers to a valid element\n // eslint-disable-next-line react-hooks/immutability\n state.shouldRenderTooltip = true;\n }\n\n // Case 1: Don't render the Tooltip in SSR to avoid hydration errors\n // Case 2: Don't render the Tooltip, if it triggers Menu or another popup and it's already opened\n if (isServerSideRender || isPopupExpanded) {\n // eslint-disable-next-line react-hooks/immutability\n state.shouldRenderTooltip = false;\n }\n\n // Apply the trigger props to the child, either by calling the render function, or cloning with the new props\n // eslint-disable-next-line react-hooks/immutability\n state.children = applyTriggerPropsToChildren(children, {\n ...triggerAriaProps,\n ...child?.props,\n ref: useMergedRefs(\n getReactElementRef<HTMLButtonElement>(child),\n keyborgListenerCallbackRef,\n // If the target prop is not provided, attach targetRef to the trigger element's ref prop\n positioningOptions.target === undefined ? targetRef : undefined,\n ),\n // eslint-disable-next-line react-hooks/refs\n onPointerEnter: useEventCallback(mergeCallbacks(child?.props?.onPointerEnter, onEnterTrigger)),\n // eslint-disable-next-line react-hooks/refs\n onPointerLeave: useEventCallback(mergeCallbacks(child?.props?.onPointerLeave, onLeaveTrigger)),\n // eslint-disable-next-line react-hooks/refs\n onFocus: useEventCallback(mergeCallbacks(child?.props?.onFocus, onEnterTrigger)),\n // eslint-disable-next-line react-hooks/refs\n onBlur: useEventCallback(mergeCallbacks(child?.props?.onBlur, onLeaveTrigger)),\n });\n\n return state;\n};\n"],"names":["React","mergeArrowOffset","resolvePositioningShorthand","usePositioning","useTooltipVisibility_unstable","useTooltipVisibility","useFluent_unstable","useFluent","KEYBORG_FOCUSIN","useIsNavigatingWithKeyboard","applyTriggerPropsToChildren","useControllableState","useId","useIsomorphicLayoutEffect","useIsSSR","useMergedRefs","getTriggerChild","mergeCallbacks","useEventCallback","slot","getReactElementRef","arrowHeight","tooltipBorderRadius","useTooltipTimeout","Escape","useTooltipBase_unstable","props","child","context","isServerSideRender","targetDocument","visible","setVisibleInternal","state","initialState","children","content","withArrow","positioning","onVisibleChange","relationship","showDelay","hideDelay","mountNode","shouldRenderTooltip","components","always","defaultProps","role","elementType","id","positioningOptions","enabled","arrowPadding","position","align","offset","targetRef","containerRef","arrowRef","setDelayTimeout","clearDelayTimeout","setVisible","useCallback","ev","data","oldVisible","ref","thisTooltip","hide","undefined","documentKeyboardEvent","visibleTooltip","onDocumentKeyDown","key","defaultPrevented","preventDefault","addEventListener","capture","onDocumentVisibilityChange","visibilityState","removeEventListener","ignoreNextFocusEventRef","useRef","onEnterTrigger","type","current","delay","persist","isNavigatingWithKeyboard","keyborgListenerCallbackRef","useState","onKeyborgFocusIn","detail","isFocusedProgrammatically","element","onLeaveTrigger","activeElement","target","onPointerEnter","onPointerLeave","onFocus","onBlur","triggerAriaProps","isPopupExpanded"],"mappings":"AAAA;AAEA,Y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BAAmB,GAAG;IAC9B;IAEA,6GAA6G;IAC7G,oDAAoD;IACpDX,MAAME,QAAQ,GAAGzB,4BAA4ByB,UAAU;QACrD,GAAGoE,gBAAgB;WAChB5E,kBAAAA,4BAAAA,MAAOD,KAAK,AAAf;QACAyC,KAAKpD,cACHK,mBAAsCO,QACtC+D,4BACA,yFAAyF;QACzFvC,mBAAmB+C,MAAM,KAAK5B,YAAYb,YAAYa;QAExD,4CAA4C;QAC5C6B,gBAAgBjF,iBAAiBD,eAAeU,kBAAAA,6BAAAA,gBAAAA,MAAOD,KAAK,cAAZC,oCAAAA,cAAcwE,cAAc,EAAEf;QAC9E,4CAA4C;QAC5CgB,gBAAgBlF,iBAAiBD,eAAeU,kBAAAA,6BAAAA,gBAAAA,MAAOD,KAAK,cAAZC,oCAAAA,cAAcyE,cAAc,EAAEJ;QAC9E,4CAA4C;QAC5CK,SAASnF,iBAAiBD,eAAeU,kBAAAA,6BAAAA,gBAAAA,MAAOD,KAAK,cAAZC,oCAAAA,cAAc0E,OAAO,EAAEjB;QAChE,4CAA4C;QAC5CkB,QAAQpF,iBAAiBD,eAAeU,kBAAAA,6BAAAA,gBAAAA,MAAOD,KAAK,cAAZC,oCAAAA,cAAc2E,MAAM,EAAEN;IAChE;IAEA,OAAO/D;AACT,EAAE"}
1
+ {"version":3,"sources":["../src/components/Tooltip/useTooltipBase.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { mergeArrowOffset, resolvePositioningShorthand, usePositioning } from '@fluentui/react-positioning';\nimport type { PositioningProps } from '@fluentui/react-positioning';\nimport {\n useTooltipVisibility_unstable as useTooltipVisibility,\n useFluent_unstable as useFluent,\n} from '@fluentui/react-shared-contexts';\nimport type { KeyborgFocusInEvent } from '@fluentui/react-tabster';\nimport { KEYBORG_FOCUSIN, useIsNavigatingWithKeyboard } from '@fluentui/react-tabster';\nimport {\n applyTriggerPropsToChildren,\n useControllableState,\n useId,\n useIsomorphicLayoutEffect,\n useIsSSR,\n useMergedRefs,\n getTriggerChild,\n mergeCallbacks,\n useEventCallback,\n slot,\n getReactElementRef,\n} from '@fluentui/react-utilities';\nimport type { TooltipBaseProps, TooltipBaseState, TooltipChildProps, OnVisibleChangeData } from './Tooltip.types';\nimport { arrowHeight, tooltipBorderRadius } from './private/constants';\nimport { useTooltipTimeout } from './private/useTooltipTimeout';\nimport { Escape } from '@fluentui/keyboard-keys';\n\ntype OnPositioningEndEvent = Parameters<Exclude<PositioningProps['onPositioningEnd'], undefined>>[0];\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 useTooltipBase_unstable = (props: TooltipBaseProps): TooltipBaseState => {\n const context = useTooltipVisibility();\n const isServerSideRender = useIsSSR();\n const { targetDocument } = useFluent();\n\n const [visible, setVisibleInternal] = useControllableState({ state: props.visible, initialState: false });\n const [hidden, setHidden] = React.useState(false);\n\n const {\n children,\n content,\n withArrow = false,\n positioning = 'above',\n onVisibleChange,\n relationship,\n showDelay = 250,\n hideDelay = 250,\n mountNode,\n } = props;\n\n const state: TooltipBaseState = {\n withArrow,\n positioning,\n showDelay,\n hideDelay,\n relationship,\n visible,\n hidden,\n shouldRenderTooltip: visible,\n mountNode,\n // Slots\n components: {\n content: 'div',\n },\n content: slot.always(content, {\n defaultProps: {\n role: 'tooltip',\n },\n elementType: 'div',\n }),\n };\n\n state.content.id = useId('tooltip-', state.content.id);\n\n const resolvedPositioning = resolvePositioningShorthand(state.positioning);\n const onPositioningEnd = useEventCallback((event: OnPositioningEndEvent) => {\n const { escaped, referenceHidden } = event.detail;\n\n setHidden(escaped || referenceHidden);\n resolvedPositioning.onPositioningEnd?.(event);\n });\n\n const positioningOptions = {\n enabled: state.visible,\n arrowPadding: 2 * tooltipBorderRadius,\n position: 'above' as const,\n align: 'center' as const,\n offset: 4,\n ...resolvedPositioning,\n onPositioningEnd,\n };\n\n if (state.withArrow) {\n positioningOptions.offset = mergeArrowOffset(positioningOptions.offset, arrowHeight);\n }\n\n const {\n targetRef,\n containerRef,\n arrowRef,\n }: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n targetRef: React.MutableRefObject<unknown>;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n containerRef: React.MutableRefObject<HTMLDivElement>;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n arrowRef: React.MutableRefObject<HTMLDivElement>;\n } = usePositioning(positioningOptions);\n\n const [setDelayTimeout, clearDelayTimeout] = useTooltipTimeout(containerRef);\n\n const setVisible = React.useCallback(\n (ev: React.PointerEvent<HTMLElement> | React.FocusEvent<HTMLElement> | undefined, data: OnVisibleChangeData) => {\n clearDelayTimeout();\n setVisibleInternal(oldVisible => {\n if (data.visible !== oldVisible) {\n onVisibleChange?.(ev, data);\n }\n return data.visible;\n });\n },\n [clearDelayTimeout, setVisibleInternal, onVisibleChange],\n );\n\n state.content.ref = useMergedRefs(state.content.ref, containerRef);\n state.arrowRef = arrowRef;\n\n // When this tooltip is visible, hide any other tooltips, and register it\n // as the visibleTooltip with the TooltipContext.\n // Also add a listener on document to hide the tooltip if Escape is pressed\n useIsomorphicLayoutEffect(() => {\n if (visible) {\n const thisTooltip = {\n hide: (ev?: KeyboardEvent) => setVisible(undefined, { visible: false, documentKeyboardEvent: ev }),\n };\n\n context.visibleTooltip?.hide();\n // eslint-disable-next-line react-hooks/immutability\n context.visibleTooltip = thisTooltip;\n\n const onDocumentKeyDown = (ev: KeyboardEvent) => {\n if (ev.key === Escape && !ev.defaultPrevented) {\n thisTooltip.hide(ev);\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: Dialog, Popover, Menu and Tooltip\n ev.preventDefault();\n }\n };\n\n targetDocument?.addEventListener('keydown', onDocumentKeyDown, {\n // As this event is added at targeted document,\n // we need to capture the event to be sure keydown handling from tooltip happens first\n capture: true,\n });\n\n // Dismiss the tooltip when the document becomes hidden (e.g. tab backgrounded,\n // app switched on mobile). The original trigger (hover/tap/focus) is no longer\n // active in this case, so persisting the tooltip is a stale UI state.\n const onDocumentVisibilityChange = () => {\n if (targetDocument?.visibilityState === 'hidden') {\n thisTooltip.hide();\n }\n };\n\n targetDocument?.addEventListener('visibilitychange', onDocumentVisibilityChange);\n\n return () => {\n if (context.visibleTooltip === thisTooltip) {\n context.visibleTooltip = undefined;\n }\n\n targetDocument?.removeEventListener('keydown', onDocumentKeyDown, { capture: true });\n targetDocument?.removeEventListener('visibilitychange', onDocumentVisibilityChange);\n };\n }\n }, [context, targetDocument, visible, setVisible]);\n\n // Used to skip showing the tooltip in certain situations when the trigger is focused.\n // See comments where this is set for more info.\n const ignoreNextFocusEventRef = React.useRef(false);\n\n // Listener for onPointerEnter and onFocus on the trigger element\n const onEnterTrigger = React.useCallback(\n // eslint-disable-next-line react-hooks/preserve-manual-memoization\n (ev: React.PointerEvent<HTMLElement> | React.FocusEvent<HTMLElement>) => {\n if (ev.type === 'focus' && ignoreNextFocusEventRef.current) {\n ignoreNextFocusEventRef.current = false;\n return;\n }\n\n // Show immediately if another tooltip is already visible\n const delay = context.visibleTooltip ? 0 : state.showDelay;\n\n setDelayTimeout(() => {\n setVisible(ev, { visible: true });\n }, delay);\n\n ev.persist(); // Persist the event since the setVisible call will happen asynchronously\n },\n [setDelayTimeout, setVisible, state.showDelay, context],\n );\n\n const isNavigatingWithKeyboard = useIsNavigatingWithKeyboard();\n\n // Callback ref that attaches a keyborg:focusin event listener.\n const [keyborgListenerCallbackRef] = React.useState(() => {\n const onKeyborgFocusIn = ((ev: KeyborgFocusInEvent) => {\n // Skip showing the tooltip if focus moved programmatically.\n // For example, we don't want to show the tooltip when a dialog is closed\n // and Tabster programmatically restores focus to the trigger button.\n // See https://github.com/microsoft/fluentui/issues/27576\n if (ev.detail?.isFocusedProgrammatically && !isNavigatingWithKeyboard()) {\n ignoreNextFocusEventRef.current = true;\n }\n }) as EventListener;\n\n // Save the current element to remove the listener when the ref changes\n let current: Element | null = null;\n\n // Callback ref that attaches the listener to the element\n return (element: Element | null) => {\n current?.removeEventListener(KEYBORG_FOCUSIN, onKeyborgFocusIn);\n element?.addEventListener(KEYBORG_FOCUSIN, onKeyborgFocusIn);\n current = element;\n };\n });\n\n // Listener for onPointerLeave and onBlur on the trigger element\n const onLeaveTrigger = React.useCallback(\n // eslint-disable-next-line react-hooks/preserve-manual-memoization\n (ev: React.PointerEvent<HTMLElement> | React.FocusEvent<HTMLElement>) => {\n let delay = state.hideDelay;\n\n if (ev.type === 'blur') {\n // Hide immediately when losing focus\n delay = 0;\n\n // The focused element gets a blur event when the document loses focus\n // (e.g. switching tabs in the browser), but we don't want to show the\n // tooltip again when the document gets focus back. Handle this case by\n // checking if the blurred element is still the document's activeElement.\n // See https://github.com/microsoft/fluentui/issues/13541\n ignoreNextFocusEventRef.current = targetDocument?.activeElement === ev.target;\n }\n\n setDelayTimeout(() => {\n setVisible(ev, { visible: false });\n }, delay);\n\n ev.persist(); // Persist the event since the setVisible call will happen asynchronously\n },\n [setDelayTimeout, setVisible, state.hideDelay, targetDocument],\n );\n\n // Cancel the hide timer when the mouse or focus enters the tooltip, and restart it when the mouse or focus leaves.\n // This keeps the tooltip visible when the mouse is moved over it, or it has focus within.\n // eslint-disable-next-line react-hooks/immutability\n state.content.onPointerEnter = mergeCallbacks(state.content.onPointerEnter, clearDelayTimeout);\n // eslint-disable-next-line react-hooks/immutability, react-hooks/refs\n state.content.onPointerLeave = mergeCallbacks(state.content.onPointerLeave, onLeaveTrigger);\n // eslint-disable-next-line react-hooks/immutability\n state.content.onFocus = mergeCallbacks(state.content.onFocus, clearDelayTimeout);\n // eslint-disable-next-line react-hooks/immutability, react-hooks/refs\n state.content.onBlur = mergeCallbacks(state.content.onBlur, onLeaveTrigger);\n\n const child = getTriggerChild(children);\n\n const triggerAriaProps: Pick<TooltipChildProps, 'aria-label' | 'aria-labelledby' | 'aria-describedby'> = {};\n const isPopupExpanded =\n child?.props?.['aria-haspopup'] &&\n (child?.props?.['aria-expanded'] === true || child?.props?.['aria-expanded'] === 'true');\n\n if (relationship === 'label') {\n // aria-label only works if the content is a string. Otherwise, need to use aria-labelledby.\n if (typeof state.content.children === 'string') {\n triggerAriaProps['aria-label'] = state.content.children;\n } else {\n triggerAriaProps['aria-labelledby'] = state.content.id;\n // Always render the tooltip even if hidden, so that aria-labelledby refers to a valid element\n // eslint-disable-next-line react-hooks/immutability\n state.shouldRenderTooltip = true;\n }\n } else if (relationship === 'description') {\n triggerAriaProps['aria-describedby'] = state.content.id;\n // Always render the tooltip even if hidden, so that aria-describedby refers to a valid element\n // eslint-disable-next-line react-hooks/immutability\n state.shouldRenderTooltip = true;\n }\n\n // Case 1: Don't render the Tooltip in SSR to avoid hydration errors\n // Case 2: Don't render the Tooltip, if it triggers Menu or another popup and it's already opened\n if (isServerSideRender || isPopupExpanded) {\n // eslint-disable-next-line react-hooks/immutability\n state.shouldRenderTooltip = false;\n }\n\n // Apply the trigger props to the child, either by calling the render function, or cloning with the new props\n // eslint-disable-next-line react-hooks/immutability\n state.children = applyTriggerPropsToChildren(children, {\n ...triggerAriaProps,\n ...child?.props,\n ref: useMergedRefs(\n getReactElementRef<HTMLButtonElement>(child),\n keyborgListenerCallbackRef,\n // If the target prop is not provided, attach targetRef to the trigger element's ref prop\n positioningOptions.target === undefined ? targetRef : undefined,\n ),\n // eslint-disable-next-line react-hooks/refs\n onPointerEnter: useEventCallback(mergeCallbacks(child?.props?.onPointerEnter, onEnterTrigger)),\n // eslint-disable-next-line react-hooks/refs\n onPointerLeave: useEventCallback(mergeCallbacks(child?.props?.onPointerLeave, onLeaveTrigger)),\n // eslint-disable-next-line react-hooks/refs\n onFocus: useEventCallback(mergeCallbacks(child?.props?.onFocus, onEnterTrigger)),\n // eslint-disable-next-line react-hooks/refs\n onBlur: useEventCallback(mergeCallbacks(child?.props?.onBlur, onLeaveTrigger)),\n });\n\n return state;\n};\n"],"names":["React","mergeArrowOffset","resolvePositioningShorthand","usePositioning","useTooltipVisibility_unstable","useTooltipVisibility","useFluent_unstable","useFluent","KEYBORG_FOCUSIN","useIsNavigatingWithKeyboard","applyTriggerPropsToChildren","useControllableState","useId","useIsomorphicLayoutEffect","useIsSSR","useMergedRefs","getTriggerChild","mergeCallbacks","useEventCallback","slot","getReactElementRef","arrowHeight","tooltipBorderRadius","useTooltipTimeout","Escape","useTooltipBase_unstable","props","child","context","isServerSideRender","targetDocument","visible","setVisibleInternal","state","initialState","hidden","setHidden","useState","children","content","withArrow","positioning","onVisibleChange","relationship","showDelay","hideDelay","mountNode","shouldRenderTooltip","components","always","defaultProps","role","elementType","id","resolvedPositioning","onPositioningEnd","event","escaped","referenceHidden","detail","positioningOptions","enabled","arrowPadding","position","align","offset","targetRef","containerRef","arrowRef","setDelayTimeout","clearDelayTimeout","setVisible","useCallback","ev","data","oldVisible","ref","thisTooltip","hide","undefined","documentKeyboardEvent","visibleTooltip","onDocumentKeyDown","key","defaultPrevented","preventDefault","addEventListener","capture","onDocumentVisibilityChange","visibilityState","removeEventListener","ignoreNextFocusEventRef","useRef","onEnterTrigger","type","current","delay","persist","isNavigatingWithKeyboard","keyborgListenerCallbackRef","onKeyborgFocusIn","isFocusedProgrammatically","element","onLeaveTrigger","activeElement","target","onPointerEnter","onPointerLeave","onFocus","onBlur","triggerAriaProps","isPopupExpanded"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gBAAgB,EAAEC,2BAA2B,EAAEC,cAAc,QAAQ,8BAA8B;AAE5G,SACEC,iCAAiCC,oBAAoB,EACrDC,sBAAsBC,SAAS,QAC1B,kCAAkC;AAEzC,SAASC,eAAe,EAAEC,2BAA2B,QAAQ,0BAA0B;AACvF,SACEC,2BAA2B,EAC3BC,oBAAoB,EACpBC,KAAK,EACLC,yBAAyB,EACzBC,QAAQ,EACRC,aAAa,EACbC,eAAe,EACfC,cAAc,EACdC,gBAAgB,EAChBC,IAAI,EACJC,kBAAkB,QACb,4BAA4B;AAEnC,SAAS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4BAA4B4B,UAAU;QACrD,GAAGwE,gBAAgB;WAChBnF,kBAAAA,4BAAAA,MAAOD,KAAK,AAAf;QACAkD,KAAK7D,cACHK,mBAAsCO,QACtCwE,4BACA,yFAAyF;QACzFvC,mBAAmB6C,MAAM,KAAK1B,YAAYb,YAAYa;QAExD,4CAA4C;QAC5C2B,gBAAgBxF,iBAAiBD,eAAeU,kBAAAA,6BAAAA,gBAAAA,MAAOD,KAAK,cAAZC,oCAAAA,cAAc+E,cAAc,EAAEb;QAC9E,4CAA4C;QAC5Cc,gBAAgBzF,iBAAiBD,eAAeU,kBAAAA,6BAAAA,gBAAAA,MAAOD,KAAK,cAAZC,oCAAAA,cAAcgF,cAAc,EAAEJ;QAC9E,4CAA4C;QAC5CK,SAAS1F,iBAAiBD,eAAeU,kBAAAA,6BAAAA,gBAAAA,MAAOD,KAAK,cAAZC,oCAAAA,cAAciF,OAAO,EAAEf;QAChE,4CAA4C;QAC5CgB,QAAQ3F,iBAAiBD,eAAeU,kBAAAA,6BAAAA,gBAAAA,MAAOD,KAAK,cAAZC,oCAAAA,cAAckF,MAAM,EAAEN;IAChE;IAEA,OAAOtE;AACT,EAAE"}
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
 
3
- import { __styles, mergeClasses } from '@griffel/react';
4
- import { createArrowStyles } from '@fluentui/react-positioning';
5
- import { tokens } from '@fluentui/react-theme';
6
- import { arrowHeight } from './private/constants';
3
+ import { __styles, mergeClasses } from "@griffel/react";
4
+ import { createArrowStyles } from "@fluentui/react-positioning";
5
+ import { tokens } from "@fluentui/react-theme";
6
+ import { arrowHeight } from "./private/constants.js";
7
7
  export const tooltipClassNames = {
8
8
  content: 'fui-Tooltip__content'
9
9
  };
@@ -54,6 +54,10 @@ const useStyles = /*#__PURE__*/__styles({
54
54
  visible: {
55
55
  mc9l5x: "ftgm304"
56
56
  },
57
+ hidden: {
58
+ Bcdw1i0: "fd7fpy0",
59
+ Bkecrkj: "f1aehjj5"
60
+ },
57
61
  inverted: {
58
62
  De3pzq: "fg3r6xk",
59
63
  sj55zd: "fonrgv7"
@@ -115,7 +119,7 @@ const useStyles = /*#__PURE__*/__styles({
115
119
  p: -2
116
120
  }], [".f1bzqsji{padding:4px 11px 6px 11px;}", {
117
121
  p: -1
118
- }], ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fxeb0a7{filter:drop-shadow(0 0 2px var(--colorNeutralShadowAmbient)) drop-shadow(0 4px 8px var(--colorNeutralShadowKey));}", ".ftgm304{display:block;}", ".fg3r6xk{background-color:var(--colorNeutralBackgroundStatic);}", ".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}", ".f1euv43f{position:absolute;}", ".f1bsuimh{z-index:-1;}", ".f1s3jn22{--fui-positioning-arrow-height:8.484px;}", ".fv40uqz{--fui-positioning-arrow-offset:-4.242px;}", ".f1u2r49w{background-color:inherit;}", ".fqhgnl{background-clip:content-box;}", ".f17bz04i{border-bottom-left-radius:var(--borderRadiusSmall);}", ".f36o3x3{transform:rotate(var(--fui-positioning-arrow-angle));}", ".fzofk8q{height:var(--fui-positioning-arrow-height);}", ".f1wbx1ie{width:var(--fui-positioning-arrow-height);}", ".f1wl9k8s::before{content:\"\";}", ".f1aocrix::before{display:block;}", ".f1ljr5q2::before{background-color:inherit;}", [".f155f1qt::before{margin:-1px;}", {
122
+ }], ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fxeb0a7{filter:drop-shadow(0 0 2px var(--colorNeutralShadowAmbient)) drop-shadow(0 4px 8px var(--colorNeutralShadowKey));}", ".ftgm304{display:block;}", ".fd7fpy0{visibility:hidden;}", ".f1aehjj5{pointer-events:none;}", ".fg3r6xk{background-color:var(--colorNeutralBackgroundStatic);}", ".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}", ".f1euv43f{position:absolute;}", ".f1bsuimh{z-index:-1;}", ".f1s3jn22{--fui-positioning-arrow-height:8.484px;}", ".fv40uqz{--fui-positioning-arrow-offset:-4.242px;}", ".f1u2r49w{background-color:inherit;}", ".fqhgnl{background-clip:content-box;}", ".f17bz04i{border-bottom-left-radius:var(--borderRadiusSmall);}", ".f36o3x3{transform:rotate(var(--fui-positioning-arrow-angle));}", ".fzofk8q{height:var(--fui-positioning-arrow-height);}", ".f1wbx1ie{width:var(--fui-positioning-arrow-height);}", ".f1wl9k8s::before{content:\"\";}", ".f1aocrix::before{display:block;}", ".f1ljr5q2::before{background-color:inherit;}", [".f155f1qt::before{margin:-1px;}", {
119
123
  p: -1
120
124
  }], ".f9mhzq7::before{width:100%;}", ".fr6rhvx::before{height:100%;}", [".f1kc0wz4::before{border:1px solid var(--colorTransparentStroke);}", {
121
125
  p: -2
@@ -127,7 +131,7 @@ const useStyles = /*#__PURE__*/__styles({
127
131
  export const useTooltipStyles_unstable = state => {
128
132
  const styles = useStyles();
129
133
  // eslint-disable-next-line react-hooks/immutability
130
- state.content.className = mergeClasses(tooltipClassNames.content, styles.root, state.appearance === 'inverted' && styles.inverted, state.visible && styles.visible, state.content.className);
134
+ state.content.className = mergeClasses(tooltipClassNames.content, styles.root, state.appearance === 'inverted' && styles.inverted, state.visible && styles.visible, state.hidden && styles.hidden, state.content.className);
131
135
  // eslint-disable-next-line react-hooks/immutability
132
136
  state.arrowClassName = styles.arrow;
133
137
  return state;
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","createArrowStyles","tokens","arrowHeight","tooltipClassNames","content","useStyles","root","mc9l5x","B7ck84d","B2u0y6b","Bceei9c","Bahqtrf","Be2twd7","Bg96gwp","Btd35i7","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","De3pzq","sj55zd","Bhu2qc9","visible","inverted","arrow","qhf8xq","Bj3rh1h","rhnwrx","Bdy53xb","B2eet1l","Bz10aip","Bqenvij","a9b677","Ftih45","Br0sdwz","cmx5o7","susq4k","Biibvgv","Bicfajf","qehafq","Brs5u8j","Ccq8qp","Baz25je","Bcgcnre","Bqjgrrk","qa3bma","y0oebl","Biqmznv","Bm6vgfq","Bbv0w2i","uvfttm","eqrjj","Bk5zm6e","m598lv","B4f6apu","ydt019","Bq4z7u6","Bdkvgpv","B0qfbqy","kj8mxx","r59vdv","Bkw5xw4","hl6cv3","aea9ga","yayu3t","Bhsv975","rhl9o9","B7gxrvb","B6q6orb","B0lu1f8","d","p","useTooltipStyles_unstable","state","styles","className","appearance","arrowClassName"],"sources":["useTooltipStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { createArrowStyles } from '@fluentui/react-positioning';\nimport { tokens } from '@fluentui/react-theme';\nimport { arrowHeight } from './private/constants';\nexport const tooltipClassNames = {\n content: 'fui-Tooltip__content'\n};\n/**\n * Styles for the tooltip\n */ const useStyles = makeStyles({\n root: {\n display: 'none',\n boxSizing: 'border-box',\n maxWidth: '240px',\n cursor: 'default',\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n overflowWrap: 'break-word',\n borderRadius: tokens.borderRadiusMedium,\n border: `1px solid ${tokens.colorTransparentStroke}`,\n padding: '4px 11px 6px 11px',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n // TODO need to add versions of tokens.alias.shadow.shadow8, etc. that work with filter\n filter: `drop-shadow(0 0 2px ${tokens.colorNeutralShadowAmbient}) ` + `drop-shadow(0 4px 8px ${tokens.colorNeutralShadowKey})`\n },\n visible: {\n display: 'block'\n },\n inverted: {\n backgroundColor: tokens.colorNeutralBackgroundStatic,\n color: tokens.colorNeutralForegroundStaticInverted\n },\n arrow: createArrowStyles({\n arrowHeight\n })\n});\n/**\n * Apply styling to the Tooltip slots based on the state\n */ export const useTooltipStyles_unstable = (state)=>{\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.content.className = mergeClasses(tooltipClassNames.content, styles.root, state.appearance === 'inverted' && styles.inverted, state.visible && styles.visible, state.content.className);\n // eslint-disable-next-line react-hooks/immutability\n state.arrowClassName = styles.arrow;\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,iBAAiB,QAAQ,6BAA6B;AAC/D,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,WAAW,QAAQ,qBAAqB;AACjD,OAAO,MAAMC,iBAAiB,GAAG;EAC7BC,OAAO,EAAE;AACb,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGP,QAAA;EAAAQ,IAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,OAAA;IAAAtC,MAAA;EAAA;EAAAuC,QAAA;IAAAJ,MAAA;IAAAC,MAAA;EAAA;EAAAI,KAAA;IAAAvC,OAAA;IAAAwC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IA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3,"names":["__styles","mergeClasses","createArrowStyles","tokens","arrowHeight","tooltipClassNames","content","useStyles","root","mc9l5x","B7ck84d","B2u0y6b","Bceei9c","Bahqtrf","Be2twd7","Bg96gwp","Btd35i7","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","De3pzq","sj55zd","Bhu2qc9","visible","hidden","Bcdw1i0","Bkecrkj","inverted","arrow","qhf8xq","Bj3rh1h","rhnwrx","Bdy53xb","B2eet1l","Bz10aip","Bqenvij","a9b677","Ftih45","Br0sdwz","cmx5o7","susq4k","Biibvgv","Bicfajf","qehafq","Brs5u8j","Ccq8qp","Baz25je","Bcgcnre","Bqjgrrk","qa3bma","y0oebl","Biqmznv","Bm6vgfq","Bbv0w2i","uvfttm","eqrjj","Bk5zm6e","m598lv","B4f6apu","ydt019","Bq4z7u6","Bdkvgpv","B0qfbqy","kj8mxx","r59vdv","Bkw5xw4","hl6cv3","aea9ga","yayu3t","Bhsv975","rhl9o9","B7gxrvb","B6q6orb","B0lu1f8","d","p","useTooltipStyles_unstable","state","styles","className","appearance","arrowClassName"],"sources":["useTooltipStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\nimport { createArrowStyles } from \"@fluentui/react-positioning\";\nimport { tokens } from \"@fluentui/react-theme\";\nimport { arrowHeight } from \"./private/constants.js\";\nexport const tooltipClassNames = {\n content: 'fui-Tooltip__content'\n};\n/**\n * Styles for the tooltip\n */ const useStyles = makeStyles({\n root: {\n display: 'none',\n boxSizing: 'border-box',\n maxWidth: '240px',\n cursor: 'default',\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n overflowWrap: 'break-word',\n borderRadius: tokens.borderRadiusMedium,\n border: `1px solid ${tokens.colorTransparentStroke}`,\n padding: '4px 11px 6px 11px',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n // TODO need to add versions of tokens.alias.shadow.shadow8, etc. that work with filter\n filter: `drop-shadow(0 0 2px ${tokens.colorNeutralShadowAmbient}) ` + `drop-shadow(0 4px 8px ${tokens.colorNeutralShadowKey})`\n },\n visible: {\n display: 'block'\n },\n hidden: {\n visibility: 'hidden',\n pointerEvents: 'none'\n },\n inverted: {\n backgroundColor: tokens.colorNeutralBackgroundStatic,\n color: tokens.colorNeutralForegroundStaticInverted\n },\n arrow: createArrowStyles({\n arrowHeight\n })\n});\n/**\n * Apply styling to the Tooltip slots based on the state\n */ export const useTooltipStyles_unstable = (state)=>{\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.content.className = mergeClasses(tooltipClassNames.content, styles.root, state.appearance === 'inverted' && styles.inverted, state.visible && styles.visible, state.hidden && styles.hidden, state.content.className);\n // eslint-disable-next-line react-hooks/immutability\n state.arrowClassName = styles.arrow;\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,iBAAiB,QAAQ,6BAA6B;AAC/D,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,WAAW,QAAQ,wBAAwB;AACpD,OAAO,MAAMC,iBAAiB,GAAG;EAC7BC,OAAO,EAAE;AACb,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGP,QAAA;EAAAQ,IAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MA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