UNPKG

@blinkk/selective-edit

Version:
35 lines (34 loc) 1.03 kB
import { Field, FieldConfig } from '../field'; import { GlobalConfig, SelectiveEditor } from '../editor'; import { TemplateResult } from 'lit-html'; import { DeepObject } from '../../utility/deepObject'; import { Types } from '../types'; export interface NumberFieldConfig extends FieldConfig { /** * Maximum value for the number input. */ max?: number; /** * Minimum value for the number input. */ min?: number; /** * Placeholder for the number input. */ placeholder?: string; /** * Step size for the number input. */ step?: number; } export declare class NumberField extends Field { config: NumberFieldConfig; constructor(types: Types, config: NumberFieldConfig, globalConfig: GlobalConfig, fieldType?: string); /** * Handle when the input changes value. * * @param evt Input event from changing value. */ handleInput(evt: Event): void; templateInput(editor: SelectiveEditor, data: DeepObject): TemplateResult; }