igniteui-react-inputs
Version:
Ignite UI React input components.
305 lines (302 loc) • 10.1 kB
TypeScript
import * as React from 'react';
import { XInput } from "./XInput";
import { IgrXInputGroupItem, IIgrXInputGroupItemProps } from './igr-x-input-group-item';
import { IgrInputChangeEventArgs } from './igr-input-change-event-args';
import { ControlDisplayDensity } from "igniteui-react-core";
import { IgrKeyEventArgs } from "igniteui-react-core";
import { BaseControlTheme } from "igniteui-react-core";
import { HorizontalAlignment } from "igniteui-react-core";
export declare class IgrXInput extends IgrXInputGroupItem<IIgrXInputProps & React.HTMLAttributes<HTMLElement>> {
private _container;
private _initialized;
private _elRef;
private _portalManager;
private _wrapper;
private _getMainRef;
render(): React.DetailedReactHTMLElement<{
className: string;
ref: (ref: any) => void;
children: any[];
}, any>;
private requestRender;
constructor(props: IIgrXInputProps & React.HTMLAttributes<HTMLElement>);
shouldComponentUpdate(nextProps: any, nextState: any): boolean;
protected initializeProperties(): void;
updateStyle(): void;
destroy(): void;
componentWillUnmount(): void;
componentDidMount(): void;
initializeContent(): void;
protected createImplementation(): XInput;
private _input;
/**
* @hidden
*/
get i(): XInput;
/**
* Gets or sets the base built in theme to use for the button.
*/
get baseTheme(): BaseControlTheme;
set baseTheme(v: BaseControlTheme);
/**
* Gets or sets the display density to use for the input.
*/
get density(): ControlDisplayDensity;
set density(v: ControlDisplayDensity);
/**
* Gets the actual display density to use for the label.
*/
get actualDensity(): ControlDisplayDensity;
set actualDensity(v: ControlDisplayDensity);
/**
* Gets/Sets the input mask for the input.
*/
get mask(): string;
set mask(v: string);
/**
* Gets/Sets the character representing a fillable spot in the input mask
*/
get promptChar(): string;
set promptChar(v: string);
/**
* Specifies if the bound value includes the formatting symbols.
*/
get includeLiterals(): boolean;
set includeLiterals(v: boolean);
get showSpinner(): boolean;
set showSpinner(v: boolean);
/**
* Gets the actual color to use for the text color.
*/
get actualTextColor(): string;
set actualTextColor(v: string);
/**
* Gets the actual hover color to use for the text.
*/
get actualHoverTextColor(): string;
set actualHoverTextColor(v: string);
/**
* Gets or sets the color to use for the text.
*/
get textColor(): string;
set textColor(v: string);
/**
* Gets or sets the use for the button.
*/
get textStyle(): string;
set textStyle(v: string);
/**
* Gets or sets the type to use for the input.
*/
get inputType(): string;
set inputType(v: string);
/**
* Gets or sets the placeholder to use for the input.
*/
get placeholder(): string;
set placeholder(v: string);
/**
* Gets or sets the color to use for the hovered text of the button regardless of type.
*/
get hoverTextColor(): string;
set hoverTextColor(v: string);
/**
* Gets or sets the id to use for the checkbox.
*/
get id(): string;
set id(v: string);
/**
* Gets or sets TabIndex to use for the checkbox.
*/
get tabIndex(): number;
set tabIndex(v: number);
/**
* Gets or sets the for attribute to use for the input.
*/
get for(): string;
set for(v: string);
/**
* Gets or sets the value of the aria-label attribute.
*/
get ariaLabel(): string;
set ariaLabel(v: string);
/**
* Gets or sets whether the input is hovered.
*/
get isHover(): boolean;
set isHover(v: boolean);
/**
* Gets or sets the value for the input.
*/
get value(): string;
set value(v: string);
get hasValue(): boolean;
/**
* Gets or sets whether the checkbox is disabled.
*/
get disabled(): boolean;
set disabled(v: boolean);
/**
* Gets or sets whether the checkbox is readonly.
*/
get readonly(): boolean;
set readonly(v: boolean);
/**
* Gets or sets the alignment of the text.
*/
get textAlignment(): HorizontalAlignment;
set textAlignment(v: HorizontalAlignment);
/**
* Returns / Sets the beginning index of the selected text. When nothing is selected, this returns the position of the text input cursor (caret) inside of the input.
*/
get selectionStart(): number;
set selectionStart(v: number);
/**
* Returns / Sets the end index of the selected text. When nothing is selected, this returns the position of the text input cursor (caret) inside of the input.
*/
get selectionEnd(): number;
set selectionEnd(v: number);
onDetachedFromUI(): void;
onAttachedToUI(): void;
/**
* Exports visual information about the current state of the grid.
*/
exportVisualModel(): any;
/**
* Returns a serialized copy of the exported visual model
*/
exportSerializedVisualModel(): string;
setSelectionRange(selectionStart: number, selectionEnd: number): void;
blur(): void;
select(): void;
private _keyDown;
private _keyDown_wrapped;
get keyDown(): (s: IgrXInput, e: IgrKeyEventArgs) => void;
set keyDown(ev: (s: IgrXInput, e: IgrKeyEventArgs) => void);
private _keyUp;
private _keyUp_wrapped;
get keyUp(): (s: IgrXInput, e: IgrKeyEventArgs) => void;
set keyUp(ev: (s: IgrXInput, e: IgrKeyEventArgs) => void);
private _keyPress;
private _keyPress_wrapped;
get keyPress(): (s: IgrXInput, e: IgrKeyEventArgs) => void;
set keyPress(ev: (s: IgrXInput, e: IgrKeyEventArgs) => void);
private _change;
private _change_wrapped;
get change(): (s: IgrXInput, e: IgrInputChangeEventArgs) => void;
set change(ev: (s: IgrXInput, e: IgrInputChangeEventArgs) => void);
private _changing;
private _changing_wrapped;
get changing(): (s: IgrXInput, e: IgrInputChangeEventArgs) => void;
set changing(ev: (s: IgrXInput, e: IgrInputChangeEventArgs) => void);
private _compositionEnd;
private _compositionEnd_wrapped;
get compositionEnd(): (s: IgrXInput, e: IgrInputChangeEventArgs) => void;
set compositionEnd(ev: (s: IgrXInput, e: IgrInputChangeEventArgs) => void);
}
export interface IIgrXInputProps extends IIgrXInputGroupItemProps {
children?: React.ReactNode;
/**
* Gets or sets the base built in theme to use for the button.
*/
baseTheme?: BaseControlTheme | string;
/**
* Gets or sets the display density to use for the input.
*/
density?: ControlDisplayDensity | string;
/**
* Gets the actual display density to use for the label.
*/
actualDensity?: ControlDisplayDensity | string;
/**
* Gets/Sets the input mask for the input.
*/
mask?: string;
/**
* Gets/Sets the character representing a fillable spot in the input mask
*/
promptChar?: string;
/**
* Specifies if the bound value includes the formatting symbols.
*/
includeLiterals?: boolean | string;
showSpinner?: boolean | string;
/**
* Gets the actual color to use for the text color.
*/
actualTextColor?: string;
/**
* Gets the actual hover color to use for the text.
*/
actualHoverTextColor?: string;
/**
* Gets or sets the color to use for the text.
*/
textColor?: string;
/**
* Gets or sets the use for the button.
*/
textStyle?: string;
/**
* Gets or sets the type to use for the input.
*/
inputType?: string;
/**
* Gets or sets the placeholder to use for the input.
*/
placeholder?: string;
/**
* Gets or sets the color to use for the hovered text of the button regardless of type.
*/
hoverTextColor?: string;
/**
* Gets or sets the id to use for the checkbox.
*/
id?: string;
/**
* Gets or sets TabIndex to use for the checkbox.
*/
tabIndex?: number | string;
/**
* Gets or sets the for attribute to use for the input.
*/
for?: string;
/**
* Gets or sets the value of the aria-label attribute.
*/
ariaLabel?: string;
/**
* Gets or sets whether the input is hovered.
*/
isHover?: boolean | string;
/**
* Gets or sets the value for the input.
*/
value?: string;
/**
* Gets or sets whether the checkbox is disabled.
*/
disabled?: boolean | string;
/**
* Gets or sets whether the checkbox is readonly.
*/
readonly?: boolean | string;
/**
* Gets or sets the alignment of the text.
*/
textAlignment?: HorizontalAlignment | string;
/**
* Returns / Sets the beginning index of the selected text. When nothing is selected, this returns the position of the text input cursor (caret) inside of the input.
*/
selectionStart?: number | string;
/**
* Returns / Sets the end index of the selected text. When nothing is selected, this returns the position of the text input cursor (caret) inside of the input.
*/
selectionEnd?: number | string;
keyDown?: (s: IgrXInput, e: IgrKeyEventArgs) => void;
keyUp?: (s: IgrXInput, e: IgrKeyEventArgs) => void;
keyPress?: (s: IgrXInput, e: IgrKeyEventArgs) => void;
change?: (s: IgrXInput, e: IgrInputChangeEventArgs) => void;
changing?: (s: IgrXInput, e: IgrInputChangeEventArgs) => void;
compositionEnd?: (s: IgrXInput, e: IgrInputChangeEventArgs) => void;
}