UNPKG

@fluentui/react-northstar

Version:
75 lines (74 loc) 3.42 kB
import * as React from 'react'; import * as PropTypes from 'prop-types'; import { ComponentEventHandler, FluentComponentStaticProps } from '../../types'; import { UIComponentProps } from '../../utils/commonPropInterfaces'; export interface DropdownSearchInputSlotClassNames { input: string; wrapper: string; } export interface DropdownSearchInputProps extends UIComponentProps<DropdownSearchInputProps> { /** Accessibility props for combobox slot. */ accessibilityComboboxProps?: any; /** Accessibility props for input slot. */ accessibilityInputProps?: any; /** A dropdown search input can show that it cannot be interacted with. */ disabled?: boolean; /** A dropdown search input can be formatted to appear inline in the context of a Dropdown. */ inline?: boolean; /** Ref for input DOM node. */ inputRef?: React.Ref<HTMLInputElement>; /** * Called on input element focus. * * @param event - React's original SyntheticEvent. * @param data - All props and proposed value. */ onFocus?: ComponentEventHandler<DropdownSearchInputProps>; /** * Called on input element blur. * * @param event - React's original SyntheticEvent. * @param data - All props and proposed value. */ onInputBlur?: ComponentEventHandler<DropdownSearchInputProps>; /** * Called on input key down event. * * @param event - React's original SyntheticEvent. * @param data - All props and proposed value. */ onInputKeyDown?: ComponentEventHandler<DropdownSearchInputProps>; /** * Called on input key up event. * * @param event - React's original SyntheticEvent. * @param data - All props and proposed value. */ onKeyUp?: ComponentEventHandler<DropdownSearchInputProps>; /** A placeholder message. */ placeholder?: string; } export declare const dropdownSearchInputClassName = "ui-dropdown__searchinput"; export declare const dropdownSearchInputSlotClassNames: DropdownSearchInputSlotClassNames; export declare type DropdownSearchInputStylesProps = Required<Pick<DropdownSearchInputProps, 'inline'>>; /** * A DropdownSearchInput represents item of 'search' Dropdown. * Used to display the search input field. */ export declare const DropdownSearchInput: (<TExtendedElementType extends React.ElementType<any> = "input">(props: React.RefAttributes<HTMLInputElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof DropdownSearchInputProps> & { as?: TExtendedElementType; } & DropdownSearchInputProps) => JSX.Element) & { propTypes?: React.WeakValidationMap<DropdownSearchInputProps> & { as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>; }; contextTypes?: PropTypes.ValidationMap<any>; defaultProps?: Partial<DropdownSearchInputProps & { as: "input"; }>; displayName?: string; readonly __PRIVATE_PROPS?: React.RefAttributes<HTMLInputElement> & Omit<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & { ref?: React.Ref<HTMLInputElement>; }, "as" | keyof DropdownSearchInputProps> & { as?: "input"; } & DropdownSearchInputProps; } & FluentComponentStaticProps<DropdownSearchInputProps>;