@szhsin/react-menu
Advanced tools
Comparing version 4.0.4-alpha.0 to 4.0.4-alpha.1
{ | ||
"name": "@szhsin/react-menu", | ||
"version": "4.0.4-alpha.0", | ||
"version": "4.0.4-alpha.1", | ||
"description": "React component for building accessible menu, dropdown, submenu, context menu and more.", | ||
@@ -5,0 +5,0 @@ "author": "Zheng Song", |
@@ -22,5 +22,5 @@ import React = require('react'); | ||
type ClassNameProp<M = undefined> = string | ((modifiers: M) => string); | ||
export type ClassNameProp<M = undefined> = string | ((modifiers: M) => string); | ||
type RenderProp<M, R = React.ReactNode> = R | ((modifiers: M) => R); | ||
export type RenderProp<M, R = React.ReactNode> = R | ((modifiers: M) => R); | ||
@@ -36,3 +36,3 @@ export interface BaseProps<M = undefined> | ||
interface Event { | ||
export interface Event { | ||
/** | ||
@@ -90,7 +90,7 @@ * The `value` prop passed to the `MenuItem` being clicked. | ||
interface EventHandler<E> { | ||
export interface EventHandler<E> { | ||
(event: E): void; | ||
} | ||
interface RectElement { | ||
export interface RectElement { | ||
getBoundingClientRect(): { | ||
@@ -174,3 +174,3 @@ left: number; | ||
interface Hoverable { | ||
export interface Hoverable { | ||
disabled?: boolean; | ||
@@ -182,3 +182,3 @@ } | ||
*/ | ||
interface BaseMenuProps extends Omit<BaseProps, 'style'> { | ||
export interface BaseMenuProps extends Omit<BaseProps, 'style'> { | ||
/** | ||
@@ -260,3 +260,3 @@ * Can be a string or a function which receives a modifier object and returns a CSS `class` string. | ||
*/ | ||
interface RootMenuProps extends BaseMenuProps, Omit<MenuStateOptions, 'initialOpen'> { | ||
export interface RootMenuProps extends BaseMenuProps, Omit<MenuStateOptions, 'initialOpen'> { | ||
/** | ||
@@ -360,3 +360,3 @@ * Properties of this object are spread to the root DOM element containing the menu. | ||
*/ | ||
interface UncontrolledMenuProps { | ||
export interface UncontrolledMenuProps { | ||
/** | ||
@@ -695,9 +695,11 @@ * Menu component ref which can be used to programmatically open or close menu. | ||
type ClickEventProps = Required<Pick<React.HTMLAttributes<Element>, 'onMouseDown' | 'onClick'>>; | ||
export type ClickEventProps = Required< | ||
Pick<React.HTMLAttributes<Element>, 'onMouseDown' | 'onClick'> | ||
>; | ||
type HoverEventProps = Required< | ||
export type HoverEventProps = Required< | ||
Pick<React.HTMLAttributes<Element>, 'onMouseEnter' | 'onMouseLeave'> | ||
>; | ||
type ToggleEvent = (open: boolean, event: Parameters<React.MouseEventHandler>[0]) => void; | ||
export type ToggleEvent = (open: boolean, event: Parameters<React.MouseEventHandler>[0]) => void; | ||
@@ -704,0 +706,0 @@ /** |
161699
5172