Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fluentui/react-tooltip

Package Overview
Dependencies
Maintainers
12
Versions
977
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/react-tooltip - npm Package Compare versions

Comparing version 9.4.43 to 9.5.0

2

dist/index.d.ts

@@ -134,3 +134,3 @@ import type { ComponentProps } from '@fluentui/react-utilities';

ref?: React_2.Ref<unknown>;
} & Pick<React_2.HTMLAttributes<HTMLElement>, 'aria-describedby' | 'aria-label' | 'aria-labelledby' | 'onBlur' | 'onFocus' | 'onPointerEnter' | 'onPointerLeave'>;
} & Pick<React_2.HTMLAttributes<HTMLElement>, 'aria-describedby' | 'aria-label' | 'aria-labelledby' | 'onBlur' | 'onFocus' | 'onPointerEnter' | 'onPointerLeave' | 'aria-haspopup' | 'aria-expanded'>;

@@ -137,0 +137,0 @@ /**

@@ -21,3 +21,3 @@ "use strict";

'use no memo';
var _child_props, _child_props1, _child_props2, _child_props3;
var _child_props, _child_props1, _child_props2, _child_props3, _child_props4, _child_props5;
const context = (0, _reactsharedcontexts.useTooltipVisibility_unstable)();

@@ -201,2 +201,3 @@ const isServerSideRender = (0, _reactutilities.useIsSSR)();

const triggerAriaProps = {};
const isMenuTrigger = (child === null || child === void 0 ? void 0 : (_child_props = child.props) === null || _child_props === void 0 ? void 0 : _child_props['aria-haspopup']) === 'menu' && (child === null || child === void 0 ? void 0 : (_child_props1 = child.props) === null || _child_props1 === void 0 ? void 0 : _child_props1['aria-expanded']);
if (relationship === 'label') {

@@ -216,4 +217,5 @@ // aria-label only works if the content is a string. Otherwise, need to use aria-labelledby.

}
// Don't render the Tooltip in SSR to avoid hydration errors
if (isServerSideRender) {
// Case 1: Don't render the Tooltip in SSR to avoid hydration errors
// Case 2: Don't render the Tooltip, if it triggers Menu and it's already opened
if (isServerSideRender || isMenuTrigger) {
state.shouldRenderTooltip = false;

@@ -226,8 +228,8 @@ }

ref: (0, _reactutilities.useMergedRefs)(child === null || child === void 0 ? void 0 : child.ref, keyborgListenerCallbackRef, positioningOptions.target === undefined ? targetRef : undefined),
onPointerEnter: (0, _reactutilities.useEventCallback)((0, _reactutilities.mergeCallbacks)(child === null || child === void 0 ? void 0 : (_child_props = child.props) === null || _child_props === void 0 ? void 0 : _child_props.onPointerEnter, onEnterTrigger)),
onPointerLeave: (0, _reactutilities.useEventCallback)((0, _reactutilities.mergeCallbacks)(child === null || child === void 0 ? void 0 : (_child_props1 = child.props) === null || _child_props1 === void 0 ? void 0 : _child_props1.onPointerLeave, onLeaveTrigger)),
onFocus: (0, _reactutilities.useEventCallback)((0, _reactutilities.mergeCallbacks)(child === null || child === void 0 ? void 0 : (_child_props2 = child.props) === null || _child_props2 === void 0 ? void 0 : _child_props2.onFocus, onEnterTrigger)),
onBlur: (0, _reactutilities.useEventCallback)((0, _reactutilities.mergeCallbacks)(child === null || child === void 0 ? void 0 : (_child_props3 = child.props) === null || _child_props3 === void 0 ? void 0 : _child_props3.onBlur, onLeaveTrigger))
onPointerEnter: (0, _reactutilities.useEventCallback)((0, _reactutilities.mergeCallbacks)(child === null || child === void 0 ? void 0 : (_child_props2 = child.props) === null || _child_props2 === void 0 ? void 0 : _child_props2.onPointerEnter, onEnterTrigger)),
onPointerLeave: (0, _reactutilities.useEventCallback)((0, _reactutilities.mergeCallbacks)(child === null || child === void 0 ? void 0 : (_child_props3 = child.props) === null || _child_props3 === void 0 ? void 0 : _child_props3.onPointerLeave, onLeaveTrigger)),
onFocus: (0, _reactutilities.useEventCallback)((0, _reactutilities.mergeCallbacks)(child === null || child === void 0 ? void 0 : (_child_props4 = child.props) === null || _child_props4 === void 0 ? void 0 : _child_props4.onFocus, onEnterTrigger)),
onBlur: (0, _reactutilities.useEventCallback)((0, _reactutilities.mergeCallbacks)(child === null || child === void 0 ? void 0 : (_child_props5 = child.props) === null || _child_props5 === void 0 ? void 0 : _child_props5.onBlur, onLeaveTrigger))
});
return state;
};

@@ -17,3 +17,3 @@ import * as React from 'react';

'use no memo';
var _child_props, _child_props1, _child_props2, _child_props3;
var _child_props, _child_props1, _child_props2, _child_props3, _child_props4, _child_props5;
const context = useTooltipVisibility();

@@ -197,2 +197,3 @@ const isServerSideRender = useIsSSR();

const triggerAriaProps = {};
const isMenuTrigger = (child === null || child === void 0 ? void 0 : (_child_props = child.props) === null || _child_props === void 0 ? void 0 : _child_props['aria-haspopup']) === 'menu' && (child === null || child === void 0 ? void 0 : (_child_props1 = child.props) === null || _child_props1 === void 0 ? void 0 : _child_props1['aria-expanded']);
if (relationship === 'label') {

@@ -212,4 +213,5 @@ // aria-label only works if the content is a string. Otherwise, need to use aria-labelledby.

}
// Don't render the Tooltip in SSR to avoid hydration errors
if (isServerSideRender) {
// Case 1: Don't render the Tooltip in SSR to avoid hydration errors
// Case 2: Don't render the Tooltip, if it triggers Menu and it's already opened
if (isServerSideRender || isMenuTrigger) {
state.shouldRenderTooltip = false;

@@ -223,8 +225,8 @@ }

positioningOptions.target === undefined ? targetRef : undefined),
onPointerEnter: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : (_child_props = child.props) === null || _child_props === void 0 ? void 0 : _child_props.onPointerEnter, onEnterTrigger)),
onPointerLeave: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : (_child_props1 = child.props) === null || _child_props1 === void 0 ? void 0 : _child_props1.onPointerLeave, onLeaveTrigger)),
onFocus: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : (_child_props2 = child.props) === null || _child_props2 === void 0 ? void 0 : _child_props2.onFocus, onEnterTrigger)),
onBlur: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : (_child_props3 = child.props) === null || _child_props3 === void 0 ? void 0 : _child_props3.onBlur, onLeaveTrigger))
onPointerEnter: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : (_child_props2 = child.props) === null || _child_props2 === void 0 ? void 0 : _child_props2.onPointerEnter, onEnterTrigger)),
onPointerLeave: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : (_child_props3 = child.props) === null || _child_props3 === void 0 ? void 0 : _child_props3.onPointerLeave, onLeaveTrigger)),
onFocus: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : (_child_props4 = child.props) === null || _child_props4 === void 0 ? void 0 : _child_props4.onFocus, onEnterTrigger)),
onBlur: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : (_child_props5 = child.props) === null || _child_props5 === void 0 ? void 0 : _child_props5.onBlur, onLeaveTrigger))
});
return state;
};
{
"name": "@fluentui/react-tooltip",
"version": "9.4.43",
"version": "9.5.0",
"description": "React components for building web experiences",

@@ -22,9 +22,9 @@ "main": "lib-commonjs/index.js",

"@fluentui/keyboard-keys": "^9.0.8",
"@fluentui/react-jsx-runtime": "^9.0.46",
"@fluentui/react-portal": "^9.4.38",
"@fluentui/react-positioning": "^9.15.12",
"@fluentui/react-shared-contexts": "^9.21.0",
"@fluentui/react-tabster": "^9.23.0",
"@fluentui/react-theme": "^9.1.22",
"@fluentui/react-utilities": "^9.18.17",
"@fluentui/react-jsx-runtime": "^9.0.47",
"@fluentui/react-portal": "^9.4.39",
"@fluentui/react-positioning": "^9.15.13",
"@fluentui/react-shared-contexts": "^9.21.1",
"@fluentui/react-tabster": "^9.23.1",
"@fluentui/react-theme": "^9.1.23",
"@fluentui/react-utilities": "^9.18.18",
"@griffel/react": "^1.5.22",

@@ -31,0 +31,0 @@ "@swc/helpers": "^0.5.1"

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc