@react-stately/tooltip
Advanced tools
Comparing version 3.0.0-nightly.2401 to 3.0.0
@@ -18,2 +18,7 @@ var { | ||
let $dbf206483fc3f3f5862f69116107e0c$var$globalCooldownTimeout = null; | ||
/** | ||
* Manages state for a tooltip trigger. Tracks whether the tooltip is open, and provides | ||
* methods to toggle this state. Ensures only one tooltip is open at a time and controls | ||
* the delay for showing a tooltip. | ||
*/ | ||
@@ -106,3 +111,3 @@ function useTooltipTriggerState(props) { | ||
}; | ||
}, []); | ||
}, [id]); | ||
return { | ||
@@ -109,0 +114,0 @@ isOpen, |
@@ -11,2 +11,8 @@ import { useOverlayTriggerState } from "@react-stately/overlays"; | ||
let $af9cde49ea815e766aeca6386e9$var$globalCooldownTimeout = null; | ||
/** | ||
* Manages state for a tooltip trigger. Tracks whether the tooltip is open, and provides | ||
* methods to toggle this state. Ensures only one tooltip is open at a time and controls | ||
* the delay for showing a tooltip. | ||
*/ | ||
export function useTooltipTriggerState(props) { | ||
@@ -98,3 +104,3 @@ let { | ||
}; | ||
}, []); | ||
}, [id]); | ||
return { | ||
@@ -101,0 +107,0 @@ isOpen, |
import { TooltipTriggerProps } from "@react-types/tooltip"; | ||
export interface TooltipTriggerState { | ||
/** Whether the tooltip is currently showing. */ | ||
isOpen: boolean; | ||
open: (immediate?: boolean) => void; | ||
close: () => void; | ||
/** | ||
* Shows the tooltip. By default, the tooltip becomes visible after a delay | ||
* depending on a global warmup timer. The `immediate` option shows the | ||
* tooltip immediately instead. | ||
*/ | ||
open(immediate?: boolean): void; | ||
/** Hides the tooltip. */ | ||
close(): void; | ||
} | ||
/** | ||
* Manages state for a tooltip trigger. Tracks whether the tooltip is open, and provides | ||
* methods to toggle this state. Ensures only one tooltip is open at a time and controls | ||
* the delay for showing a tooltip. | ||
*/ | ||
export function useTooltipTriggerState(props: TooltipTriggerProps): TooltipTriggerState; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@react-stately/tooltip", | ||
"version": "3.0.0-nightly.2401+61d8633a", | ||
"version": "3.0.0", | ||
"description": "Spectrum UI components in React", | ||
@@ -21,5 +21,5 @@ "license": "Apache-2.0", | ||
"@babel/runtime": "^7.6.2", | ||
"@react-stately/overlays": "3.1.1-nightly.2401+61d8633a", | ||
"@react-stately/utils": "3.0.0-nightly.723+61d8633a", | ||
"@react-types/tooltip": "3.0.0-nightly.2401+61d8633a" | ||
"@react-stately/overlays": "^3.1.1", | ||
"@react-stately/utils": "^3.1.1", | ||
"@react-types/tooltip": "^3.0.0" | ||
}, | ||
@@ -32,3 +32,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "61d8633a588d2603c84651e81ccdefb50f1bdff9" | ||
"gitHead": "0778f71a3c13e1e24388a23b6d525e3b9f5b98f1" | ||
} |
@@ -21,5 +21,12 @@ /* | ||
export interface TooltipTriggerState { | ||
/** Whether the tooltip is currently showing. */ | ||
isOpen: boolean, | ||
open: (immediate?: boolean) => void, | ||
close: () => void | ||
/** | ||
* Shows the tooltip. By default, the tooltip becomes visible after a delay | ||
* depending on a global warmup timer. The `immediate` option shows the | ||
* tooltip immediately instead. | ||
*/ | ||
open(immediate?: boolean): void, | ||
/** Hides the tooltip. */ | ||
close(): void | ||
} | ||
@@ -33,2 +40,7 @@ | ||
/** | ||
* Manages state for a tooltip trigger. Tracks whether the tooltip is open, and provides | ||
* methods to toggle this state. Ensures only one tooltip is open at a time and controls | ||
* the delay for showing a tooltip. | ||
*/ | ||
export function useTooltipTriggerState(props: TooltipTriggerProps): TooltipTriggerState { | ||
@@ -107,3 +119,3 @@ let {delay = TOOLTIP_DELAY} = props; | ||
}; | ||
}, []); | ||
}, [id]); | ||
@@ -110,0 +122,0 @@ return { |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
39636
362
1
0
+ Added@react-stately/overlays@3.6.11(transitive)
+ Added@react-stately/utils@3.10.4(transitive)
+ Added@react-types/overlays@3.8.10(transitive)
+ Added@react-types/shared@3.25.0(transitive)
+ Added@react-types/tooltip@3.4.12(transitive)
+ Added@swc/helpers@0.5.13(transitive)
+ Addedtslib@2.8.0(transitive)
Updated@react-stately/utils@^3.1.1
Updated@react-types/tooltip@^3.0.0