@nextcloud/vue
Version:
Nextcloud vue components
89 lines (88 loc) • 2.62 kB
TypeScript
import { VueClassType } from '../../utils/VueTypes.ts';
type __VLS_Props = {
/**
* Disable the text area
*/
disabled?: boolean;
/**
* Toggles the error state of the component.
* Adds an error icon.
*/
error?: boolean;
/**
* Additional helper text message
*
* This will be displayed beneath the input field. In case the field is
* also marked as having an error, the text will be displayed in red.
*/
helperText?: string;
/**
* The id of the textarea element
*/
id?: string;
/**
* Class to add to the `<textarea>` element.
*/
inputClass?: VueClassType;
/**
* The input label, always provide one for accessibility purposes.
* On Nextcloud before version 32 this will also be used as a placeholder
* unless the placeholder prop is populated with a different string.
*/
label?: string;
/**
* Pass in true if you want to use an external label. This is useful
* if you need a label that looks different from the one provided by
* this component
*/
labelOutside?: boolean;
/**
* The placeholder of the input.
* On Nextcloud before 32 this defaults to the value of the `label` prop.
*/
placeholder?: string;
/**
* The resize CSS property sets whether an element is resizable, and if
* so, in which directions.
*/
resize?: 'both' | 'vertical' | 'horizontal' | 'none';
/**
* Toggles the success state of the component.
* Adds a checkmark icon.
*/
success?: boolean;
};
/**
* Focus the input element
*
* @param options - Focus options
* @public
*/
declare function focus(options?: FocusOptions): void;
/**
* Select all the text in the input
*
* @public
*/
declare function select(): void;
type __VLS_PublicProps = {
modelValue: string;
} & __VLS_Props;
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
focus: typeof focus;
select: typeof select;
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
"update:modelValue": (value: string) => any;
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
}>, {
id: string;
label: string;
resize: "both" | "vertical" | "horizontal" | "none";
inputClass: VueClassType;
placeholder: string;
helperText: string;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
input: HTMLTextAreaElement;
}, any>;
export default _default;