@react-types/shared 3.16.0 → 3.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/events.d.ts +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/shared",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.17.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "a0efee84aa178cb1a202951dfd6d8de02b292307"
|
|
18
18
|
}
|
package/src/events.d.ts
CHANGED
|
@@ -68,11 +68,11 @@ export interface KeyboardEvents {
|
|
|
68
68
|
onKeyUp?: (e: KeyboardEvent) => void
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
export interface FocusEvents {
|
|
71
|
+
export interface FocusEvents<Target = Element> {
|
|
72
72
|
/** Handler that is called when the element receives focus. */
|
|
73
|
-
onFocus?: (e: FocusEvent) => void,
|
|
73
|
+
onFocus?: (e: FocusEvent<Target>) => void,
|
|
74
74
|
/** Handler that is called when the element loses focus. */
|
|
75
|
-
onBlur?: (e: FocusEvent) => void,
|
|
75
|
+
onBlur?: (e: FocusEvent<Target>) => void,
|
|
76
76
|
/** Handler that is called when the element's focus status changes. */
|
|
77
77
|
onFocusChange?: (isFocused: boolean) => void
|
|
78
78
|
}
|
|
@@ -105,7 +105,7 @@ export interface PressEvents {
|
|
|
105
105
|
onPressUp?: (e: PressEvent) => void
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
export interface FocusableProps extends FocusEvents
|
|
108
|
+
export interface FocusableProps<Target = Element> extends FocusEvents<Target>, KeyboardEvents {
|
|
109
109
|
/** Whether the element should receive focus on render. */
|
|
110
110
|
autoFocus?: boolean
|
|
111
111
|
}
|