UNPKG

@inkline/inkline

Version:

Inkline is the Vue.js UI/UX Library built for creating your next design system

200 lines (199 loc) 5.09 kB
import { sizePropValidator } from '../../mixins'; import { Classes, InputElementEvent } from '../../types'; declare const _default: import("vue").DefineComponent<{ /** * The color variant of the input * @type light | dark * @default light * @name color */ color: { type: StringConstructor; default: () => string; }; /** * Display the input as clearable * @type Boolean * @default false * @name clearable */ clearable: { type: BooleanConstructor; default: boolean; }; /** * The disabled state of the input * @type Boolean * @default false * @name disabled */ disabled: { type: BooleanConstructor; default: boolean; }; /** * The error state of the input, computed based on schema by default. * @type Boolean | Array * @default ['touched', 'dirty', 'invalid'] * @TODO use propDefaultValue to set default value * @name error */ error: { type: (ArrayConstructor | BooleanConstructor)[]; default: () => string[]; }; /** * The id of the internal input element * @type String * @default * @name id */ id: { type: StringConstructor; default: undefined; }; /** * Used to set the field value * @type String | Number * @default '' * @name modelValue */ modelValue: { type: (StringConstructor | NumberConstructor)[]; default: string; }; /** * The unique identifier of the input * @type String * @default uid() * @name name */ name: { type: (StringConstructor | NumberConstructor)[]; default(): string; }; /** * Display the input as plaintext, disabling interaction * @type Boolean * @default false * @name plaintext */ plaintext: { type: BooleanConstructor; default: boolean; }; /** * The readonly state of the input * @type Boolean * @default false * @name readonly */ readonly: { type: BooleanConstructor; default: boolean; }; /** * The size variant of the input * @type sm | md | lg * @default md * @name size */ size: { type: StringConstructor; default: () => string; validator: typeof sizePropValidator; }; /** * The tabindex of the input * @type Number | String * @default 0 * @name tabindex */ tabindex: { type: (StringConstructor | NumberConstructor)[]; default: number; }; /** * The type of the input * @type String * @default text * @name type */ type: { type: StringConstructor; default: string; }; /** * The aria-label of the clear button * @type String * @default Clear * @name clearAriaLabel */ clearAriaLabel: { type: StringConstructor; default: string; }; }, unknown, unknown, { classes(): Classes; hasError(): boolean; tabIndex(): number | string; isClearable(): boolean; value(): any; }, { onBlur(event: InputElementEvent): void; onInput(event: InputElementEvent): void; onClear(event: InputElementEvent): void; focus(): void; }, import("vue").DefineComponent<{}, {}, {}, { isDisabled(): boolean; isReadonly(): boolean; parent(): any; schema(): any; }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{} & {} & {}>, {}>, import("vue").ComponentOptionsMixin, ("update:modelValue" | "clear")[], "update:modelValue" | "clear", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ color?: unknown; clearable?: unknown; disabled?: unknown; error?: unknown; id?: unknown; modelValue?: unknown; name?: unknown; plaintext?: unknown; readonly?: unknown; size?: unknown; tabindex?: unknown; type?: unknown; clearAriaLabel?: unknown; } & { error: boolean | unknown[]; name: string | number; color: string; size: string; modelValue: string | number; type: string; disabled: boolean; tabindex: string | number; readonly: boolean; plaintext: boolean; clearable: boolean; clearAriaLabel: string; } & { id?: string | undefined; }> & { "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; onClear?: ((...args: any[]) => any) | undefined; }, { error: boolean | unknown[]; name: string | number; color: string; size: string; modelValue: string | number; type: string; disabled: boolean; id: string; tabindex: string | number; readonly: boolean; plaintext: boolean; clearable: boolean; clearAriaLabel: string; }>; export default _default;