UNPKG

nativescript-numeric-keyboard

Version:

Handy and elegant numeric keyboard for iOS NativeScript apps. On Android we fall back to the regular numeric keyboard.

36 lines (35 loc) 1.46 kB
import { TextField, Property, Color } from "@nativescript/core"; export interface NumericKeyboardOptions { textField: TextField; noDecimals?: boolean; noReturnKey?: boolean; returnKeyButtonBackgroundColor?: Color; returnKeyTitle?: string; locale?: string; noIpadInputBar?: boolean; onReturnKeyPressed?: () => boolean; } export interface NumericKeyboardApi { decorate(args: NumericKeyboardOptions): Promise<any>; } export interface TextAndDecimalSeparatorHolder { getDecimalSeparator(): string; getText(): string; getMaxLength(): number; getNativeTextField(): any; } export declare abstract class NumericKeyboardViewBase extends TextField implements TextAndDecimalSeparatorHolder { _decimalSep: string; get ios(): any; set ios(value: any); getDecimalSeparator(): string; getText(): string; getMaxLength(): number; getNativeTextField(): number; } export declare const returnKeyTitleProperty: Property<NumericKeyboardViewBase, string>; export declare const localeProperty: Property<NumericKeyboardViewBase, string>; export declare const noDecimalsProperty: Property<NumericKeyboardViewBase, boolean>; export declare const noReturnKeyProperty: Property<NumericKeyboardViewBase, boolean>; export declare const returnKeyButtonBackgroundColorProperty: Property<NumericKeyboardViewBase, Color>; export declare const noIpadInputBarProperty: Property<NumericKeyboardViewBase, boolean>;