@momentum-ui/react-collaboration
Version:
Cisco Momentum UI Framework for React Collaboration Applications
86 lines (85 loc) • 3.42 kB
TypeScript
export default ButtonGroup;
/**
* @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 ButtonGroup extends React.Component<any, any, any> {
static getDerivedStateFromProps({ active }: {
active: any;
}, state: any): any;
constructor(props: any);
state: {
bgContext: {
width: any;
active: any;
focus: any;
isButtonGroup: boolean;
};
selectContext: {
parentOnSelect: (e: any, opts: any) => any;
parentKeyDown: (e: any) => void;
};
};
componentDidMount(): void;
componentDidUpdate(prevProps: any, prevState: any): void;
determineInitialFocus: () => void;
handleSelect: (e: any, opts: any) => any;
getNextFocusedChild(items: any, current: any, offset: any): any;
getValue: (arr: any, index: any, attribute: any) => any;
getIncludesFirstCharacter: (str: any, char: any) => any;
setFocus: (items: any, index: any) => void;
setActiveAndFocus: (active: any, focus: any) => void;
_needsRefocus: boolean;
setFocusByFirstCharacter: (char: any, focusIdx: any, items: any, length: any) => void;
getFocusableItems: () => any;
handleKeyDown: (e: any) => void;
render(): JSX.Element;
containerNode: HTMLDivElement;
}
declare namespace ButtonGroup {
namespace propTypes {
let active: PropTypes.Requireable<string>;
let ariaLabel: PropTypes.Requireable<string>;
let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
let className: PropTypes.Requireable<string>;
let focusOnLoad: PropTypes.Requireable<boolean>;
let focusFirstQuery: PropTypes.Requireable<string>;
let focusQuery: PropTypes.Requireable<string>;
let highlightSelected: PropTypes.Requireable<boolean>;
let justified: PropTypes.Requireable<boolean>;
let onSelect: PropTypes.Requireable<(...args: any[]) => any>;
let pillWidth: PropTypes.Requireable<string>;
let theme: PropTypes.Requireable<string>;
let type: PropTypes.Requireable<string>;
}
namespace defaultProps {
let active_1: string;
export { active_1 as active };
let ariaLabel_1: string;
export { ariaLabel_1 as ariaLabel };
let children_1: any;
export { children_1 as children };
let className_1: string;
export { className_1 as className };
let focusOnLoad_1: boolean;
export { focusOnLoad_1 as focusOnLoad };
let focusFirstQuery_1: string;
export { focusFirstQuery_1 as focusFirstQuery };
let focusQuery_1: string;
export { focusQuery_1 as focusQuery };
let highlightSelected_1: boolean;
export { highlightSelected_1 as highlightSelected };
let justified_1: boolean;
export { justified_1 as justified };
let onSelect_1: any;
export { onSelect_1 as onSelect };
let pillWidth_1: string;
export { pillWidth_1 as pillWidth };
let theme_1: string;
export { theme_1 as theme };
let type_1: string;
export { type_1 as type };
}
let displayName: string;
}
import React from 'react';
import PropTypes from 'prop-types';