@bitrix24/b24ui-nuxt
Version:
Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE
125 lines (124 loc) • 3.39 kB
TypeScript
import type { AppConfig } from '@nuxt/schema';
import theme from '#build/b24ui/textarea';
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
import type { ComponentConfig } from '../types/utils';
type Textarea = ComponentConfig<typeof theme, AppConfig, 'textarea'>;
export interface TextareaProps extends UseComponentIconsProps {
/**
* The element or component this component should render as.
* @defaultValue 'div'
*/
as?: any;
id?: string;
name?: string;
/**
* The placeholder text when the textarea is empty
*/
placeholder?: string;
/**
* @defaultValue 'primary'
*/
color?: Textarea['variants']['color'];
/**
* Removes padding from input
* @defaultValue false
*/
noPadding?: boolean;
/**
* Removes all borders (rings)
* @defaultValue false
*/
noBorder?: boolean;
/**
* Removes all borders (rings) except the bottom one
* @defaultValue false
*/
underline?: boolean;
/**
* Rounds the corners of the button
* @defaultValue false
*/
rounded?: boolean;
/**
* @defaultValue false
*/
required?: boolean;
/**
* @defaultValue false
*/
autofocus?: boolean;
/**
* @defaultValue 0
*/
autofocusDelay?: number;
/**
* @defaultValue false
*/
autoresize?: boolean;
/**
* @defaultValue 0
*/
autoresizeDelay?: number;
/**
* @defaultValue false
*/
disabled?: boolean;
/**
* @defaultValue 3
*/
rows?: number;
/**
* @defaultValue 5
*/
maxrows?: number;
tag?: string;
/**
* @defaultValue 'primary'
*/
tagColor?: Textarea['variants']['tagColor'];
/**
* Highlight the ring color like a focus state
* @defaultValue false
*/
highlight?: boolean;
class?: any;
b24ui?: Textarea['slots'];
}
export interface TextareaEmits {
(e: 'update:modelValue', payload: string | number): void;
(e: 'blur', event: FocusEvent): void;
(e: 'change', event: Event): void;
}
export interface TextareaSlots {
leading(props?: {}): any;
default(props?: {}): any;
trailing(props?: {}): any;
}
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<TextareaProps & {
modelValue?: string | number | null;
}, {
textareaRef: import("vue").Ref<HTMLTextAreaElement | null, HTMLTextAreaElement | null>;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
"update:modelValue": (value: string | number | null | undefined) => any;
} & {
blur: (event: FocusEvent) => any;
change: (event: Event) => any;
"update:modelValue": (payload: string | number) => any;
}, string, import("vue").PublicProps, Readonly<TextareaProps & {
modelValue?: string | number | null;
}> & Readonly<{
onBlur?: ((event: FocusEvent) => any) | undefined;
onChange?: ((event: Event) => any) | undefined;
"onUpdate:modelValue"?: ((payload: string | number) => any) | undefined;
}>, {
autofocusDelay: number;
autoresizeDelay: number;
rows: number;
maxrows: number;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, TextareaSlots>;
export default _default;
type __VLS_WithSlots<T, S> = T & {
new (): {
$slots: S;
};
};