@plasmicapp/react-web
Advanced tools
Comparing version 0.1.24 to 0.1.25
@@ -152,2 +152,5 @@ import * as React from "react"; | ||
}): (boolean | React.HTMLAttributes<HTMLElement>)[]; | ||
declare function useFocusVisibleWithin(opts: { | ||
isTextInput?: boolean; | ||
}): (boolean | React.HTMLAttributes<HTMLElement>)[]; | ||
declare function useHover(): (boolean | { | ||
@@ -166,2 +169,3 @@ onMouseEnter: (e: React.MouseEvent<Element, MouseEvent>) => void; | ||
readonly useFocusedWithin: typeof useFocusedWithin; | ||
readonly useFocusVisibleWithin: typeof useFocusVisibleWithin; | ||
readonly usePressed: typeof usePressed; | ||
@@ -168,0 +172,0 @@ }; |
@@ -545,2 +545,9 @@ "use strict"; | ||
} | ||
function useFocusVisibleWithin(opts) { | ||
var _a = focus_1.useFocusRing({ | ||
within: true, | ||
isTextInput: opts.isTextInput | ||
}), isFocusVisible = _a.isFocusVisible, focusProps = _a.focusProps; | ||
return [isFocusVisible, focusProps]; | ||
} | ||
function useHover() { | ||
@@ -571,2 +578,3 @@ var _a = React.useState(false), isHover = _a[0], setHover = _a[1]; | ||
useFocusedWithin: useFocusedWithin, | ||
useFocusVisibleWithin: useFocusVisibleWithin, | ||
usePressed: usePressed | ||
@@ -573,0 +581,0 @@ }; |
{ | ||
"name": "@plasmicapp/react-web", | ||
"version": "0.1.24", | ||
"version": "0.1.25", | ||
"description": "plasmic library for rendering in the presentational style", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
34954
784