@eslamdevui/ui
Version:
A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
61 lines (60 loc) • 2.12 kB
TypeScript
import type { AppConfig } from '@nuxt/schema';
import type { TextareaProps, TextareaSlots, ComponentConfig } from '../types';
import theme from '#build/ui/chat-prompt';
type ChatPrompt = ComponentConfig<typeof theme, AppConfig, 'chatPrompt', 'ui'>;
export interface ChatPromptProps extends /** @vue-ignore */ Pick<TextareaProps, 'autofocusDelay' | 'autoresizeDelay' | 'maxrows' | 'icon' | 'avatar' | 'loading' | 'loadingIcon'> {
/**
* The element or component this component should render as.
* @defaultValue 'form'
*/
as?: any;
/**
* The placeholder text for the textarea.
* @defaultValue t('chatPrompt.placeholder')
*/
placeholder?: string;
autofocus?: TextareaProps['autofocus'];
autoresize?: TextareaProps['autoresize'];
rows?: TextareaProps['rows'];
/**
* @defaultValue 'outline'
*/
variant?: ChatPrompt['variants']['variant'];
error?: Error;
class?: any;
ui?: ChatPrompt['slots'] & TextareaProps['ui'];
}
export interface ChatPromptEmits {
(e: 'submit' | 'close', event: Event): void;
}
export interface ChatPromptSlots extends TextareaSlots {
header(props?: {}): any;
footer(props?: {}): any;
}
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ChatPromptProps & {
modelValue?: string;
}, {
textareaRef: any;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
"update:modelValue": (value: string) => any;
} & {
close: (event: Event) => any;
submit: (event: Event) => any;
}, string, import("vue").PublicProps, Readonly<ChatPromptProps & {
modelValue?: string;
}> & Readonly<{
onClose?: ((event: Event) => any) | undefined;
onSubmit?: ((event: Event) => any) | undefined;
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
}>, {
as: any;
autofocus: boolean;
autoresize: boolean;
rows: number;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ChatPromptSlots>;
export default _default;
type __VLS_WithSlots<T, S> = T & {
new (): {
$slots: S;
};
};