UNPKG

@opencloud-eu/design-system

Version:

OpenCloud Design System is used to design OpenCloud UI components

118 lines (117 loc) 3.4 kB
import { ContextualHelper } from '../../helpers'; export interface Props { /** * @docs The element ID of the select. */ id?: string; /** * @docs The filter function for the select. Defaults to searching by label. */ filter?: (items: unknown[], search: string, { label }: { label?: string; }) => unknown[]; /** * @docs Determines if the select is disabled. * @default false */ disabled?: boolean; /** * @docs The label of the select input. */ label: string; /** * @docs Determines if the label is visually hidden. Note that it will still be read by screen readers. * @default false */ labelHidden?: boolean; /** * @docs The contextual helper for the select. Please refer to the component source for the `ContextualHelper` type definition. */ contextualHelper?: ContextualHelper; /** * @docs The label key of the options object. * @default label */ optionLabel?: string; /** * @docs Determines if the options of the select are searchable. * @default true */ searchable?: boolean; /** * @docs Determines if the select is clearable. * @default false */ clearable?: boolean; /** * @docs Determines if the select is in a loading state. * @default false */ loading?: boolean; /** * @docs The error message to be displayed below the select. */ errorMessage?: string; /** * @docs Determines if the message line should be fixed. * @default false */ fixMessageLine?: boolean; /** * @docs The description message to be displayed below the select. */ descriptionMessage?: string; /** * @docs Determines if the select allows multiple selections. * @default false */ multiple?: boolean; /** * @docs Determines if the select is read-only. * @default false */ readOnly?: boolean; /** * @docs Determines if the dropdown menu should be fixed to the viewport. * @default false */ positionFixed?: boolean; /** * @docs Determines if a required mark (*) should be displayed next to the label. * @default false */ requiredMark?: boolean; } export interface Emits { /** * @docs Emitted when the user has typed. */ (e: 'search:input', search: string): void; /** * @docs Emitted when the user has selected an option. */ (e: 'update:modelValue', value: unknown): void; } export interface Slots { /** * @docs Slot for when an option is selected. */ selectedOption?: () => unknown; } declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & { "update:modelValue": (value: unknown) => any; "search:input": (search: string) => any; }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{ "onUpdate:modelValue"?: (value: unknown) => any; "onSearch:input"?: (search: string) => any; }>, {}, {}, { VueSelect: any; }, {}, string, import('vue').ComponentProvideOptions, false, { selectRef: any; }, HTMLDivElement>, Readonly<Slots> & Slots>; export default _default; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; };