@datametria/vue-components
Version:
DATAMETRIA Vue.js 3 Component Library with Multi-Brand Theming - 51 components + 10 composables with theming support, WCAG 2.2 AA, dark mode, responsive system
78 lines (77 loc) • 2.55 kB
TypeScript
/**
* DatametriaInput - Input de texto com validação e slots
*
* @component
* @example
* <DatametriaInput v-model="value" placeholder="Digite algo" />
*/
interface Props {
/** Valor do input */
modelValue: string | number;
/** Tipo do input */
type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
/** Placeholder */
placeholder?: string;
/** Input desabilitado */
disabled?: boolean;
/** Input somente leitura */
readonly?: boolean;
/** Botão de limpar */
clearable?: boolean;
/** Comprimento máximo */
maxlength?: number;
/** Ícone prefixo */
prefixIcon?: string;
/** Ícone sufixo */
suffixIcon?: string;
/** Tamanho */
size?: 'small' | 'default' | 'large';
}
declare function __VLS_template(): {
attrs: Partial<{}>;
slots: {
prepend?(_: {}): any;
prefix?(_: {}): any;
suffix?(_: {}): any;
append?(_: {}): any;
};
refs: {
inputRef: HTMLInputElement;
};
rootEl: HTMLDivElement;
};
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
declare const __VLS_component: import('vue').DefineComponent<Props, {
focus: () => void | undefined;
blur: () => void | undefined;
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
input: (value: string | number) => any;
"update:modelValue": (value: string | number) => any;
change: (value: string | number) => any;
focus: (event: FocusEvent) => any;
blur: (event: FocusEvent) => any;
clear: () => any;
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
onInput?: ((value: string | number) => any) | undefined;
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
onChange?: ((value: string | number) => any) | undefined;
onFocus?: ((event: FocusEvent) => any) | undefined;
onBlur?: ((event: FocusEvent) => any) | undefined;
onClear?: (() => any) | undefined;
}>, {
size: "small" | "default" | "large";
disabled: boolean;
type: "text" | "password" | "email" | "number" | "tel" | "url";
placeholder: string;
readonly: boolean;
clearable: boolean;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
inputRef: HTMLInputElement;
}, HTMLDivElement>;
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
export default _default;
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};