Skip to content

Commit f67aed3

Browse files
committed
chore(release): 3.0.2
1 parent 2daf7b8 commit f67aed3

File tree

3 files changed

+12
-21
lines changed

3 files changed

+12
-21
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [3.0.2](https://github.com/accessible-ui/disclosure/compare/v3.0.1...v3.0.2) (2020-08-10)
6+
57
### [3.0.1](https://github.com/accessible-ui/disclosure/compare/v3.0.0...v3.0.1) (2020-07-12)
68

79
## [3.0.0](https://github.com/accessible-ui/disclosure/compare/v2.0.2...v3.0.0) (2020-07-12)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@accessible/disclosure",
3-
"version": "3.0.1",
3+
"version": "3.0.2",
44
"homepage": "https://github.com/accessible-ui/disclosure#readme",
55
"repository": "github:accessible-ui/disclosure",
66
"bugs": "https://github.com/accessible-ui/disclosure/issues",

types/index.d.ts

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,14 @@ export declare namespace Target {
7373
* @param target A React ref or HTML element
7474
* @param options Configuration options
7575
*/
76-
export declare function useA11yCloseButton<
77-
T extends HTMLElement,
78-
E extends React.MouseEvent<T, MouseEvent>
79-
>(
76+
export declare function useA11yCloseButton<T extends HTMLElement>(
8077
target: React.RefObject<T> | T | null,
81-
{onClick}?: UseA11yCloseButtonOptions<E>
78+
{onClick}?: UseA11yCloseButtonOptions
8279
): {
8380
readonly 'aria-controls': string | undefined
8481
readonly 'aria-expanded': boolean
8582
readonly 'aria-label': 'Close'
8683
} & {
87-
readonly onClick: (event: E) => void
8884
readonly role: 'button'
8985
readonly tabIndex: 0
9086
}
@@ -117,19 +113,15 @@ export declare namespace CloseButton {
117113
* @param target A React ref or HTML element
118114
* @param options Configuration options
119115
*/
120-
export declare function useA11yTrigger<
121-
T extends HTMLElement,
122-
E extends React.MouseEvent<T, MouseEvent>
123-
>(
116+
export declare function useA11yTrigger<T extends HTMLElement>(
124117
target: React.RefObject<T> | T | null,
125-
options?: UseA11yTriggerOptions<E>
118+
options?: UseA11yTriggerOptions
126119
): {
127120
readonly 'aria-controls': string | undefined
128121
readonly 'aria-expanded': boolean
129122
readonly className: string | undefined
130123
readonly style: React.CSSProperties | undefined
131124
} & {
132-
readonly onClick: (event: E) => void
133125
readonly role: 'button'
134126
readonly tabIndex: 0
135127
}
@@ -206,7 +198,7 @@ export interface DisclosureProps {
206198
*/
207199
children: React.ReactNode
208200
}
209-
export interface UseA11yTriggerOptions<E = React.MouseEvent<any, MouseEvent>> {
201+
export interface UseA11yTriggerOptions {
210202
/**
211203
* Adds this class name to props when the disclosure is open
212204
*/
@@ -227,10 +219,9 @@ export interface UseA11yTriggerOptions<E = React.MouseEvent<any, MouseEvent>> {
227219
* Adds an onClick handler in addition to the default one that
228220
* toggles the disclosure's open state.
229221
*/
230-
onClick?: (e: E) => any
222+
onClick?: (e: MouseEvent) => any
231223
}
232-
export interface TriggerProps
233-
extends Omit<UseA11yTriggerOptions<any>, 'onClick'> {
224+
export interface TriggerProps extends Omit<UseA11yTriggerOptions, 'onClick'> {
234225
/**
235226
* The child is cloned by this component and has aria attributes injected
236227
* into its props as well as the events defined above.
@@ -285,14 +276,12 @@ export interface TargetProps extends UseA11yTargetOptions {
285276
*/
286277
children: JSX.Element | React.ReactElement
287278
}
288-
export interface UseA11yCloseButtonOptions<
289-
E = React.MouseEvent<any, MouseEvent>
290-
> {
279+
export interface UseA11yCloseButtonOptions {
291280
/**
292281
* Adds an onClick handler in addition to the default one that
293282
* closes the disclosure.
294283
*/
295-
onClick?: (e: E) => any
284+
onClick?: (e: MouseEvent) => any
296285
}
297286
export interface CloseButtonProps {
298287
/**

0 commit comments

Comments
 (0)