vueless
Version:
Vue Styleless UI Component Library, powered by Tailwind CSS.
143 lines (115 loc) • 2.33 kB
text/typescript
import defaultConfig from "./config";
import type { Option } from "../ui.form-listbox/types";
import type { ComponentConfig, UnknownObject } from "../types";
export type Config = typeof defaultConfig;
export interface Props {
/**
* Selected link.
*/
modelValue?: string | number | UnknownObject | (string | number | UnknownObject)[];
/**
* Link label.
*/
label?: string;
/**
* Determines how many selected option labels are shown in the label.
*/
labelDisplayCount?: number;
/**
* Options list.
*/
options?: Option[];
/**
* Label key in the item object of options.
*/
labelKey?: string;
/**
* Value key in the item object of options.
*/
valueKey?: string;
/**
* Set a name of the property containing the group label.
*/
groupLabelKey?: string;
/**
* Set a name of the property containing the group values.
*/
groupValueKey?: string;
/**
* Number of options displayed in the dropdown.
*/
optionsLimit?: number;
/**
* Number of options you can see without a scroll.
*/
visibleOptions?: number;
/**
* Link color.
*/
color?:
| "primary"
| "secondary"
| "error"
| "warning"
| "success"
| "info"
| "notice"
| "neutral"
| "grayscale";
/**
* Link size.
*/
size?: "sm" | "md" | "lg";
/**
* Dropdown toggle icon.
*/
toggleIcon?: boolean | string;
/**
* Shows input to search value in a list.
*/
searchable?: boolean;
/**
* Search input model value for the dropdown list.
*/
search?: string;
/**
* Close dropdown on option select.
*/
closeOnSelect?: boolean;
/**
* Allows multiple selection.
*/
multiple?: boolean;
/**
* Add underline.
*/
underlined?: boolean;
/**
* Set dashed underline style.
*/
dashed?: boolean;
/**
* Disable the link.
*/
disabled?: boolean;
/**
* The position of a dropdown list on the x-axis.
*/
xPosition?: "left" | "right";
/**
* The position of a dropdown list on the y-axis.
*/
yPosition?: "top" | "bottom";
/**
* Unique element id.
*/
id?: string;
/**
* Component config object.
*/
config?: ComponentConfig<Config>;
/**
* Data-test attribute for automated testing.
*/
dataTest?: string | null;
}