@react-aria/tooltip
Advanced tools
Comparing version 3.0.0-nightly.697 to 3.0.0-nightly.698
@@ -29,11 +29,8 @@ var { | ||
function useTooltip(props) { | ||
let { | ||
id, | ||
role = 'tooltip' | ||
} = props; | ||
let domProps = filterDOMProps(props); | ||
let domProps = filterDOMProps(props, { | ||
labelable: true | ||
}); | ||
return { | ||
tooltipProps: mergeProps(domProps, { | ||
role, | ||
id: useId(id) | ||
role: 'tooltip' | ||
}) | ||
@@ -40,0 +37,0 @@ }; |
@@ -7,11 +7,8 @@ import { useFocusable } from "@react-aria/focus"; | ||
export function useTooltip(props) { | ||
let { | ||
id, | ||
role = 'tooltip' | ||
} = props; | ||
let domProps = filterDOMProps(props); | ||
let domProps = filterDOMProps(props, { | ||
labelable: true | ||
}); | ||
return { | ||
tooltipProps: mergeProps(domProps, { | ||
role, | ||
id: useId(id) | ||
role: 'tooltip' | ||
}) | ||
@@ -18,0 +15,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
import { AriaTooltipProps, TooltipTriggerAriaProps } from "@react-types/tooltip"; | ||
import { AriaTooltipProps, TooltipTriggerProps } from "@react-types/tooltip"; | ||
import { HTMLAttributes, RefObject } from "react"; | ||
@@ -14,4 +14,4 @@ import { FocusEvents } from "@react-types/shared"; | ||
} | ||
export function useTooltipTrigger(props: TooltipTriggerAriaProps, state: TooltipTriggerState, ref: RefObject<HTMLElement>): TooltipTriggerAria; | ||
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.697+b8e7a96e", | ||
"version": "3.0.0-nightly.698+1aa1058d", | ||
"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.697+b8e7a96e", | ||
"@react-aria/interactions": "3.0.0-nightly.697+b8e7a96e", | ||
"@react-aria/overlays": "3.0.0-nightly.697+b8e7a96e", | ||
"@react-aria/utils": "3.0.0-nightly.697+b8e7a96e", | ||
"@react-stately/tooltip": "3.0.0-nightly.2375+b8e7a96e", | ||
"@react-types/shared": "3.0.0-nightly.697+b8e7a96e", | ||
"@react-types/tooltip": "3.0.0-nightly.2375+b8e7a96e" | ||
"@react-aria/focus": "3.0.0-nightly.698+1aa1058d", | ||
"@react-aria/interactions": "3.0.0-nightly.698+1aa1058d", | ||
"@react-aria/overlays": "3.0.0-nightly.698+1aa1058d", | ||
"@react-aria/utils": "3.0.0-nightly.698+1aa1058d", | ||
"@react-stately/tooltip": "3.0.0-nightly.2376+1aa1058d", | ||
"@react-types/shared": "3.0.0-nightly.698+1aa1058d", | ||
"@react-types/tooltip": "3.0.0-nightly.2376+1aa1058d" | ||
}, | ||
@@ -36,3 +36,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "b8e7a96e0b55f9875146f58484f97a1d9c1b04d8" | ||
"gitHead": "1aa1058d2bef892d4ecf411cfaeec5ba24440cde" | ||
} |
@@ -14,3 +14,3 @@ /* | ||
import {AriaTooltipProps} from '@react-types/tooltip'; | ||
import {filterDOMProps, mergeProps, useId} from '@react-aria/utils'; | ||
import {filterDOMProps, mergeProps} from '@react-aria/utils'; | ||
import {HTMLAttributes} from 'react'; | ||
@@ -23,15 +23,9 @@ | ||
export function useTooltip(props: AriaTooltipProps): TooltipAria { | ||
let { | ||
id, | ||
role = 'tooltip' | ||
} = props; | ||
let domProps = filterDOMProps(props, {labelable: true}); | ||
let domProps = filterDOMProps(props); | ||
return { | ||
tooltipProps: mergeProps(domProps, { | ||
role, | ||
id: useId(id) | ||
role: 'tooltip' | ||
}) | ||
}; | ||
} |
@@ -17,3 +17,3 @@ /* | ||
import {mergeProps, useId} from '@react-aria/utils'; | ||
import {TooltipTriggerAriaProps} from '@react-types/tooltip'; | ||
import {TooltipTriggerProps} from '@react-types/tooltip'; | ||
import {TooltipTriggerState} from '@react-stately/tooltip'; | ||
@@ -28,3 +28,3 @@ import {useFocusable} from '@react-aria/focus'; | ||
export function useTooltipTrigger(props: TooltipTriggerAriaProps, state: TooltipTriggerState, ref: RefObject<HTMLElement>) : TooltipTriggerAria { | ||
export function useTooltipTrigger(props: TooltipTriggerProps, state: TooltipTriggerState, ref: RefObject<HTMLElement>) : TooltipTriggerAria { | ||
let { | ||
@@ -31,0 +31,0 @@ isDisabled |
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
39695
374