@react-aria/tooltip
Advanced tools
Comparing version 3.0.0-nightly.723 to 3.0.0-nightly.734
@@ -29,2 +29,5 @@ var { | ||
/** | ||
* Provides the accessibility implementation for a Tooltip component. | ||
*/ | ||
function useTooltip(props) { | ||
@@ -43,2 +46,6 @@ let domProps = filterDOMProps(props, { | ||
/** | ||
* Provides the behavior and accessibility implementation for a tooltip trigger, e.g. a button | ||
* that shows a description when focused or hovered. | ||
*/ | ||
function useTooltipTrigger(props, state, ref) { | ||
@@ -45,0 +52,0 @@ let { |
@@ -6,2 +6,6 @@ import { useFocusable } from "@react-aria/focus"; | ||
import { filterDOMProps, mergeProps, useId } from "@react-aria/utils"; | ||
/** | ||
* Provides the accessibility implementation for a Tooltip component. | ||
*/ | ||
export function useTooltip(props) { | ||
@@ -17,2 +21,7 @@ let domProps = filterDOMProps(props, { | ||
} | ||
/** | ||
* Provides the behavior and accessibility implementation for a tooltip trigger, e.g. a button | ||
* that shows a description when focused or hovered. | ||
*/ | ||
export function useTooltipTrigger(props, state, ref) { | ||
@@ -19,0 +28,0 @@ let { |
@@ -7,11 +7,27 @@ import { AriaTooltipProps, TooltipTriggerProps } from "@react-types/tooltip"; | ||
interface TooltipAria { | ||
/** | ||
* Props for the tooltip element. | ||
*/ | ||
tooltipProps: HTMLAttributes<HTMLElement>; | ||
} | ||
/** | ||
* Provides the accessibility implementation for a Tooltip component. | ||
*/ | ||
export function useTooltip(props: AriaTooltipProps): TooltipAria; | ||
interface TooltipTriggerAria { | ||
/** | ||
* Props for the trigger element. | ||
*/ | ||
triggerProps: HTMLAttributes<HTMLElement> & PressProps & HoverProps & FocusEvents; | ||
/** | ||
* Props for the overlay container element. | ||
*/ | ||
tooltipProps: HTMLAttributes<HTMLElement>; | ||
} | ||
/** | ||
* Provides the behavior and accessibility implementation for a tooltip trigger, e.g. a button | ||
* that shows a description when focused or hovered. | ||
*/ | ||
export function useTooltipTrigger(props: TooltipTriggerProps, state: TooltipTriggerState, ref: RefObject<HTMLElement>): TooltipTriggerAria; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@react-aria/tooltip", | ||
"version": "3.0.0-nightly.723+61d8633a", | ||
"version": "3.0.0-nightly.734+c5f4a778", | ||
"description": "Spectrum UI components in React", | ||
@@ -21,9 +21,9 @@ "license": "Apache-2.0", | ||
"@babel/runtime": "^7.6.2", | ||
"@react-aria/focus": "3.0.0-nightly.723+61d8633a", | ||
"@react-aria/interactions": "3.0.0-nightly.723+61d8633a", | ||
"@react-aria/overlays": "3.0.0-nightly.723+61d8633a", | ||
"@react-aria/utils": "3.0.0-nightly.723+61d8633a", | ||
"@react-stately/tooltip": "3.0.0-nightly.2401+61d8633a", | ||
"@react-types/shared": "3.0.0-nightly.723+61d8633a", | ||
"@react-types/tooltip": "3.0.0-nightly.2401+61d8633a" | ||
"@react-aria/focus": "3.0.0-nightly.734+c5f4a778", | ||
"@react-aria/interactions": "3.0.0-nightly.734+c5f4a778", | ||
"@react-aria/overlays": "3.0.0-nightly.734+c5f4a778", | ||
"@react-aria/utils": "3.0.0-nightly.734+c5f4a778", | ||
"@react-stately/tooltip": "3.0.1-nightly.2412+c5f4a778", | ||
"@react-types/shared": "3.0.0-nightly.734+c5f4a778", | ||
"@react-types/tooltip": "3.0.1-nightly.2412+c5f4a778" | ||
}, | ||
@@ -36,3 +36,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "61d8633a588d2603c84651e81ccdefb50f1bdff9" | ||
"gitHead": "c5f4a778679acd21cf9f178f26db191f0f195e40" | ||
} |
@@ -18,5 +18,11 @@ /* | ||
interface TooltipAria { | ||
/** | ||
* Props for the tooltip element. | ||
*/ | ||
tooltipProps: HTMLAttributes<HTMLElement> | ||
} | ||
/** | ||
* Provides the accessibility implementation for a Tooltip component. | ||
*/ | ||
export function useTooltip(props: AriaTooltipProps): TooltipAria { | ||
@@ -23,0 +29,0 @@ let domProps = filterDOMProps(props, {labelable: true}); |
@@ -23,6 +23,17 @@ /* | ||
interface TooltipTriggerAria { | ||
/** | ||
* Props for the trigger element. | ||
*/ | ||
triggerProps: HTMLAttributes<HTMLElement> & PressProps & HoverProps & FocusEvents, | ||
/** | ||
* Props for the overlay container element. | ||
*/ | ||
tooltipProps: HTMLAttributes<HTMLElement> | ||
} | ||
/** | ||
* Provides the behavior and accessibility implementation for a tooltip trigger, e.g. a button | ||
* that shows a description when focused or hovered. | ||
*/ | ||
export function useTooltipTrigger(props: TooltipTriggerProps, state: TooltipTriggerState, ref: RefObject<HTMLElement>) : TooltipTriggerAria { | ||
@@ -29,0 +40,0 @@ let { |
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
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
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
46279
460