@fluentui/react-tooltip 9.7.7 → 9.8.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 CHANGED
@@ -1,12 +1,24 @@
1
1
  # Change Log - @fluentui/react-tooltip
2
2
 
3
- This log was last generated on Fri, 11 Jul 2025 15:56:58 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 17 Jul 2025 13:45:51 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.8.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v9.8.0)
8
+
9
+ Thu, 17 Jul 2025 13:45:51 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.7.7..@fluentui/react-tooltip_v9.8.0)
11
+
12
+ ### Minor changes
13
+
14
+ - feat: enable griffel raw styles ([PR #34853](https://github.com/microsoft/fluentui/pull/34853) by martinhochel@microsoft.com)
15
+ - Bump @fluentui/react-portal to v9.7.0 ([PR #34862](https://github.com/microsoft/fluentui/pull/34862) by beachball)
16
+ - Bump @fluentui/react-positioning to v9.20.0 ([PR #34862](https://github.com/microsoft/fluentui/pull/34862) by beachball)
17
+ - Bump @fluentui/react-tabster to v9.26.0 ([PR #34862](https://github.com/microsoft/fluentui/pull/34862) by beachball)
18
+
7
19
  ## [9.7.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-tooltip_v9.7.7)
8
20
 
9
- Fri, 11 Jul 2025 15:56:58 GMT
21
+ Fri, 11 Jul 2025 15:59:24 GMT
10
22
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tooltip_v9.7.6..@fluentui/react-tooltip_v9.7.7)
11
23
 
12
24
  ### Patches
@@ -0,0 +1,47 @@
1
+ import { makeStyles, mergeClasses } from '@griffel/react';
2
+ import { createArrowStyles } from '@fluentui/react-positioning';
3
+ import { tokens } from '@fluentui/react-theme';
4
+ import { arrowHeight } from './private/constants';
5
+ export const tooltipClassNames = {
6
+ content: 'fui-Tooltip__content'
7
+ };
8
+ /**
9
+ * Styles for the tooltip
10
+ */ const useStyles = makeStyles({
11
+ root: {
12
+ display: 'none',
13
+ boxSizing: 'border-box',
14
+ maxWidth: '240px',
15
+ cursor: 'default',
16
+ fontFamily: tokens.fontFamilyBase,
17
+ fontSize: tokens.fontSizeBase200,
18
+ lineHeight: tokens.lineHeightBase200,
19
+ overflowWrap: 'break-word',
20
+ borderRadius: tokens.borderRadiusMedium,
21
+ border: `1px solid ${tokens.colorTransparentStroke}`,
22
+ padding: '4px 11px 6px 11px',
23
+ backgroundColor: tokens.colorNeutralBackground1,
24
+ color: tokens.colorNeutralForeground1,
25
+ // TODO need to add versions of tokens.alias.shadow.shadow8, etc. that work with filter
26
+ filter: `drop-shadow(0 0 2px ${tokens.colorNeutralShadowAmbient}) ` + `drop-shadow(0 4px 8px ${tokens.colorNeutralShadowKey})`
27
+ },
28
+ visible: {
29
+ display: 'block'
30
+ },
31
+ inverted: {
32
+ backgroundColor: tokens.colorNeutralBackgroundStatic,
33
+ color: tokens.colorNeutralForegroundStaticInverted
34
+ },
35
+ arrow: createArrowStyles({
36
+ arrowHeight
37
+ })
38
+ });
39
+ /**
40
+ * Apply styling to the Tooltip slots based on the state
41
+ */ export const useTooltipStyles_unstable = (state)=>{
42
+ 'use no memo';
43
+ const styles = useStyles();
44
+ state.content.className = mergeClasses(tooltipClassNames.content, styles.root, state.appearance === 'inverted' && styles.inverted, state.visible && styles.visible, state.content.className);
45
+ state.arrowClassName = styles.arrow;
46
+ return state;
47
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Tooltip/useTooltipStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { createArrowStyles } from '@fluentui/react-positioning';\nimport { tokens } from '@fluentui/react-theme';\nimport { arrowHeight } from './private/constants';\nimport type { TooltipSlots, TooltipState } from './Tooltip.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tooltipClassNames: SlotClassNames<TooltipSlots> = {\n content: 'fui-Tooltip__content',\n};\n\n/**\n * Styles for the tooltip\n */\nconst 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', // '5px 12px 7px 12px' minus the border width '1px'\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n\n // TODO need to add versions of tokens.alias.shadow.shadow8, etc. that work with filter\n filter:\n `drop-shadow(0 0 2px ${tokens.colorNeutralShadowAmbient}) ` +\n `drop-shadow(0 4px 8px ${tokens.colorNeutralShadowKey})`,\n },\n\n visible: {\n display: 'block',\n },\n\n inverted: {\n backgroundColor: tokens.colorNeutralBackgroundStatic,\n color: tokens.colorNeutralForegroundStaticInverted,\n },\n\n arrow: createArrowStyles({ arrowHeight }),\n});\n\n/**\n * Apply styling to the Tooltip slots based on the state\n */\nexport const useTooltipStyles_unstable = (state: TooltipState): TooltipState => {\n 'use no memo';\n\n const styles = useStyles();\n\n state.content.className = mergeClasses(\n tooltipClassNames.content,\n styles.root,\n state.appearance === 'inverted' && styles.inverted,\n state.visible && styles.visible,\n state.content.className,\n );\n\n state.arrowClassName = styles.arrow;\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","createArrowStyles","tokens","arrowHeight","tooltipClassNames","content","useStyles","root","display","boxSizing","maxWidth","cursor","fontFamily","fontFamilyBase","fontSize","fontSizeBase200","lineHeight","lineHeightBase200","overflowWrap","borderRadius","borderRadiusMedium","border","colorTransparentStroke","padding","backgroundColor","colorNeutralBackground1","color","colorNeutralForeground1","filter","colorNeutralShadowAmbient","colorNeutralShadowKey","visible","inverted","colorNeutralBackgroundStatic","colorNeutralForegroundStaticInverted","arrow","useTooltipStyles_unstable","state","styles","className","appearance","arrowClassName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAC1D,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,WAAW,QAAQ,sBAAsB;AAIlD,OAAO,MAAMC,oBAAkD;IAC7DC,SAAS;AACX,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BQ,MAAM;QACJC,SAAS;QACTC,WAAW;QACXC,UAAU;QACVC,QAAQ;QACRC,YAAYV,OAAOW,cAAc;QACjCC,UAAUZ,OAAOa,eAAe;QAChCC,YAAYd,OAAOe,iBAAiB;QACpCC,cAAc;QACdC,cAAcjB,OAAOkB,kBAAkB;QACvCC,QAAQ,CAAC,UAAU,EAAEnB,OAAOoB,sBAAsB,CAAC,CAAC;QACpDC,SAAS;QACTC,iBAAiBtB,OAAOuB,uBAAuB;QAC/CC,OAAOxB,OAAOyB,uBAAuB;QAErC,uFAAuF;QACvFC,QACE,CAAC,oBAAoB,EAAE1B,OAAO2B,yBAAyB,CAAC,EAAE,CAAC,GAC3D,CAAC,sBAAsB,EAAE3B,OAAO4B,qBAAqB,CAAC,CAAC,CAAC;IAC5D;IAEAC,SAAS;QACPvB,SAAS;IACX;IAEAwB,UAAU;QACRR,iBAAiBtB,OAAO+B,4BAA4B;QACpDP,OAAOxB,OAAOgC,oCAAoC;IACpD;IAEAC,OAAOlC,kBAAkB;QAAEE;IAAY;AACzC;AAEA;;CAEC,GACD,OAAO,MAAMiC,4BAA4B,CAACC;IACxC;IAEA,MAAMC,SAAShC;IAEf+B,MAAMhC,OAAO,CAACkC,SAAS,GAAGvC,aACxBI,kBAAkBC,OAAO,EACzBiC,OAAO/B,IAAI,EACX8B,MAAMG,UAAU,KAAK,cAAcF,OAAON,QAAQ,EAClDK,MAAMN,OAAO,IAAIO,OAAOP,OAAO,EAC/BM,MAAMhC,OAAO,CAACkC,SAAS;IAGzBF,MAAMI,cAAc,GAAGH,OAAOH,KAAK;IAEnC,OAAOE;AACT,EAAE"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ tooltipClassNames: function() {
13
+ return tooltipClassNames;
14
+ },
15
+ useTooltipStyles_unstable: function() {
16
+ return useTooltipStyles_unstable;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const _reactpositioning = require("@fluentui/react-positioning");
21
+ const _reacttheme = require("@fluentui/react-theme");
22
+ const _constants = require("./private/constants");
23
+ const tooltipClassNames = {
24
+ content: 'fui-Tooltip__content'
25
+ };
26
+ /**
27
+ * Styles for the tooltip
28
+ */ const useStyles = (0, _react.makeStyles)({
29
+ root: {
30
+ display: 'none',
31
+ boxSizing: 'border-box',
32
+ maxWidth: '240px',
33
+ cursor: 'default',
34
+ fontFamily: _reacttheme.tokens.fontFamilyBase,
35
+ fontSize: _reacttheme.tokens.fontSizeBase200,
36
+ lineHeight: _reacttheme.tokens.lineHeightBase200,
37
+ overflowWrap: 'break-word',
38
+ borderRadius: _reacttheme.tokens.borderRadiusMedium,
39
+ border: `1px solid ${_reacttheme.tokens.colorTransparentStroke}`,
40
+ padding: '4px 11px 6px 11px',
41
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground1,
42
+ color: _reacttheme.tokens.colorNeutralForeground1,
43
+ // TODO need to add versions of tokens.alias.shadow.shadow8, etc. that work with filter
44
+ filter: `drop-shadow(0 0 2px ${_reacttheme.tokens.colorNeutralShadowAmbient}) ` + `drop-shadow(0 4px 8px ${_reacttheme.tokens.colorNeutralShadowKey})`
45
+ },
46
+ visible: {
47
+ display: 'block'
48
+ },
49
+ inverted: {
50
+ backgroundColor: _reacttheme.tokens.colorNeutralBackgroundStatic,
51
+ color: _reacttheme.tokens.colorNeutralForegroundStaticInverted
52
+ },
53
+ arrow: (0, _reactpositioning.createArrowStyles)({
54
+ arrowHeight: _constants.arrowHeight
55
+ })
56
+ });
57
+ const useTooltipStyles_unstable = (state)=>{
58
+ 'use no memo';
59
+ const styles = useStyles();
60
+ state.content.className = (0, _react.mergeClasses)(tooltipClassNames.content, styles.root, state.appearance === 'inverted' && styles.inverted, state.visible && styles.visible, state.content.className);
61
+ state.arrowClassName = styles.arrow;
62
+ return state;
63
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Tooltip/useTooltipStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { createArrowStyles } from '@fluentui/react-positioning';\nimport { tokens } from '@fluentui/react-theme';\nimport { arrowHeight } from './private/constants';\nimport type { TooltipSlots, TooltipState } from './Tooltip.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tooltipClassNames: SlotClassNames<TooltipSlots> = {\n content: 'fui-Tooltip__content',\n};\n\n/**\n * Styles for the tooltip\n */\nconst 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', // '5px 12px 7px 12px' minus the border width '1px'\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n\n // TODO need to add versions of tokens.alias.shadow.shadow8, etc. that work with filter\n filter:\n `drop-shadow(0 0 2px ${tokens.colorNeutralShadowAmbient}) ` +\n `drop-shadow(0 4px 8px ${tokens.colorNeutralShadowKey})`,\n },\n\n visible: {\n display: 'block',\n },\n\n inverted: {\n backgroundColor: tokens.colorNeutralBackgroundStatic,\n color: tokens.colorNeutralForegroundStaticInverted,\n },\n\n arrow: createArrowStyles({ arrowHeight }),\n});\n\n/**\n * Apply styling to the Tooltip slots based on the state\n */\nexport const useTooltipStyles_unstable = (state: TooltipState): TooltipState => {\n 'use no memo';\n\n const styles = useStyles();\n\n state.content.className = mergeClasses(\n tooltipClassNames.content,\n styles.root,\n state.appearance === 'inverted' && styles.inverted,\n state.visible && styles.visible,\n state.content.className,\n );\n\n state.arrowClassName = styles.arrow;\n\n return state;\n};\n"],"names":["tooltipClassNames","useTooltipStyles_unstable","content","useStyles","makeStyles","root","display","boxSizing","maxWidth","cursor","fontFamily","tokens","fontFamilyBase","fontSize","fontSizeBase200","lineHeight","lineHeightBase200","overflowWrap","borderRadius","borderRadiusMedium","border","colorTransparentStroke","padding","backgroundColor","colorNeutralBackground1","color","colorNeutralForeground1","filter","colorNeutralShadowAmbient","colorNeutralShadowKey","visible","inverted","colorNeutralBackgroundStatic","colorNeutralForegroundStaticInverted","arrow","createArrowStyles","arrowHeight","state","styles","className","mergeClasses","appearance","arrowClassName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAOaA,iBAAAA;eAAAA;;IA4CAC,yBAAAA;eAAAA;;;uBAnD4B;kCACP;4BACX;2BACK;AAIrB,MAAMD,oBAAkD;IAC7DE,SAAS;AACX;AAEA;;CAEC,GACD,MAAMC,YAAYC,IAAAA,iBAAAA,EAAW;IAC3BC,MAAM;QACJC,SAAS;QACTC,WAAW;QACXC,UAAU;QACVC,QAAQ;QACRC,YAAYC,kBAAAA,CAAOC,cAAc;QACjCC,UAAUF,kBAAAA,CAAOG,eAAe;QAChCC,YAAYJ,kBAAAA,CAAOK,iBAAiB;QACpCC,cAAc;QACdC,cAAcP,kBAAAA,CAAOQ,kBAAkB;QACvCC,QAAQ,CAAC,UAAU,EAAET,kBAAAA,CAAOU,sBAAsB,CAAC,CAAC;QACpDC,SAAS;QACTC,iBAAiBZ,kBAAAA,CAAOa,uBAAuB;QAC/CC,OAAOd,kBAAAA,CAAOe,uBAAuB;QAErC,uFAAuF;QACvFC,QACE,CAAC,oBAAoB,EAAEhB,kBAAAA,CAAOiB,yBAAyB,CAAC,EAAE,CAAC,GAC3D,CAAC,sBAAsB,EAAEjB,kBAAAA,CAAOkB,qBAAqB,CAAC,CAAC,CAAC;IAC5D;IAEAC,SAAS;QACPxB,SAAS;IACX;IAEAyB,UAAU;QACRR,iBAAiBZ,kBAAAA,CAAOqB,4BAA4B;QACpDP,OAAOd,kBAAAA,CAAOsB,oCAAoC;IACpD;IAEAC,OAAOC,IAAAA,mCAAAA,EAAkB;QAAEC,aAAAA,sBAAAA;IAAY;AACzC;AAKO,MAAMnC,4BAA4B,CAACoC;IACxC;IAEA,MAAMC,SAASnC;IAEfkC,MAAMnC,OAAO,CAACqC,SAAS,GAAGC,IAAAA,mBAAAA,EACxBxC,kBAAkBE,OAAO,EACzBoC,OAAOjC,IAAI,EACXgC,MAAMI,UAAU,KAAK,cAAcH,OAAOP,QAAQ,EAClDM,MAAMP,OAAO,IAAIQ,OAAOR,OAAO,EAC/BO,MAAMnC,OAAO,CAACqC,SAAS;IAGzBF,MAAMK,cAAc,GAAGJ,OAAOJ,KAAK;IAEnC,OAAOG;AACT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-tooltip",
3
- "version": "9.7.7",
3
+ "version": "9.8.0",
4
4
  "description": "React components for building web experiences",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -20,10 +20,10 @@
20
20
  "dependencies": {
21
21
  "@fluentui/keyboard-keys": "^9.0.8",
22
22
  "@fluentui/react-jsx-runtime": "^9.1.2",
23
- "@fluentui/react-portal": "^9.6.4",
24
- "@fluentui/react-positioning": "^9.19.0",
23
+ "@fluentui/react-portal": "^9.7.0",
24
+ "@fluentui/react-positioning": "^9.20.0",
25
25
  "@fluentui/react-shared-contexts": "^9.24.0",
26
- "@fluentui/react-tabster": "^9.25.3",
26
+ "@fluentui/react-tabster": "^9.26.0",
27
27
  "@fluentui/react-theme": "^9.1.24",
28
28
  "@fluentui/react-utilities": "^9.22.0",
29
29
  "@griffel/react": "^1.5.22",