@momentum-ui/react-collaboration
Version:
Cisco Momentum UI Framework for React Collaboration Applications
65 lines (64 loc) • 2.62 kB
TypeScript
declare const _default: import("@restart/context/mapContextToProps").ContextInjectedComponent<typeof Menu, any, any>;
export default _default;
/**
* @deprecated - Components in the legacy folder (/src/legacy) are deprecated. Please use a component from the components folder (/src/components) instead. Legacy components may not follow accessibility standards.
**/
declare class Menu extends React.Component<any, any, any> {
constructor(props: any);
state: {
currentElements: any;
activeElement: any;
listContext: {
active: any[];
focus: any;
ariaConfig: any;
};
selectContext: {
parentKeyDown: (e: any, opts: any) => void;
parentOnSelect: (e: any, opts: any) => void;
};
};
componentDidMount(): void;
componentDidUpdate(prevProps: any, prevState: any): void;
_selectRefocus: boolean;
getFocusableItems: (node: any, selector: any) => any;
getIncludesFirstCharacter: (str: any, char: any) => any;
getNextFocusedChild(element: any, current: any, offset: any): any;
handleSelect: (e: any, opts: any) => void;
setFocus: (child: any, isParent: any, isChild: any) => void;
setFocusByFirstCharacter: (element: any, char: any) => void;
setFocusToLimit(element: any, target: any): any;
handleKeyDown: (e: any, opts: any) => void;
render(): JSX.Element;
menuNode: HTMLDivElement;
}
declare namespace Menu {
namespace propTypes {
let ariaLabel: PropTypes.Requireable<string>;
let ariaConfig: PropTypes.Requireable<object>;
let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
let className: PropTypes.Requireable<string>;
let focusFirst: PropTypes.Requireable<boolean>;
let onSelect: PropTypes.Requireable<(...args: any[]) => any>;
let parentOnSelect: PropTypes.Requireable<(...args: any[]) => any>;
}
namespace defaultProps {
let ariaLabel_1: string;
export { ariaLabel_1 as ariaLabel };
let ariaConfig_1: any;
export { ariaConfig_1 as ariaConfig };
let children_1: any;
export { children_1 as children };
let className_1: string;
export { className_1 as className };
let focusFirst_1: boolean;
export { focusFirst_1 as focusFirst };
let onSelect_1: any;
export { onSelect_1 as onSelect };
let parentOnSelect_1: any;
export { parentOnSelect_1 as parentOnSelect };
}
let displayName: string;
}
import React from 'react';
import PropTypes from 'prop-types';