@nextcloud/vue
Version:
Nextcloud vue components
118 lines (117 loc) • 3.19 kB
TypeScript
export interface IUserData {
id: string;
/**
* Main display name
*/
displayName: string;
/**
* The user id.
* Will be used to fetch the user status if not disabled.
*/
user?: string;
/**
* The secondary displayname (e.g. the email address).
*/
subname?: string;
/**
* Optional icon to use as the avatar.
* Setting this will disable the automatic avatar loading.
*/
iconSvg?: string;
/**
* Accessible name for the icon.
*/
iconName?: string;
/**
* If this is a guest user.
* Needed as guest users have a different API endpoint for avatar loading.
*/
isGuest?: boolean;
/**
* Set if this is not a regular user.
* This will disable user status and avatar loading.
*/
isNoUser?: boolean;
}
type __VLS_Props = {
/**
* `aria-label` for the clear input button.
*
* @default 'Clear selected'
*/
ariaLabelClearSelected?: string;
/**
* `aria-label` for the listbox element.
*
* @default 'Options'
*/
ariaLabelListbox?: string;
/**
* Allows to customize the `aria-label` for the deselect-option button.
*
* @default (label) => `Deselect ${label}`
*/
ariaLabelDeselectOption?: (label: string) => string;
/**
* Disable the component.
*/
disabled?: boolean;
/**
* Input element id.
*
* @default random generated id
*/
inputId?: string;
/**
* Visible label for the input element
*
* @default 'Select account'
*/
inputLabel?: string;
/**
* Pass true if you are using an external label.
* In this case make sure you set the `for` attribute of your `<label>` to the `inputId` of this component.
*/
labelOutside?: boolean;
/**
* Keep the dropdown open after selecting an entry.
*/
keepOpen?: boolean;
/**
* Show a loading icon.
*/
loading?: boolean;
/**
* Allow selection of multiple options
*/
multiple?: boolean;
/**
* Disable automatic wrapping when selected options overflow the width.
*/
noWrap?: boolean;
/**
* Array of users or similar object (e.g. groups or guest users).
*/
options: IUserData[];
/**
* Placeholder text.
*
* @default ''
*/
placeholder?: string;
/**
* Enable if a value is required for native form validation.
*/
required?: boolean;
};
type __VLS_PublicProps = {
'modelValue'?: IUserData | IUserData[];
} & __VLS_Props;
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
search: (args_0: string) => any;
"update:modelValue": (value: IUserData | IUserData[]) => any;
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
onSearch?: ((args_0: string) => any) | undefined;
"onUpdate:modelValue"?: ((value: IUserData | IUserData[]) => any) | undefined;
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
export default _default;