@coreui/vue
Version:
UI Components Library for Vue.js
206 lines (205 loc) • 6.05 kB
TypeScript
import { PropType } from 'vue';
type ChipClassName = string | ((value: string) => string);
declare const CChipInput: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
/**
* Adds custom classes to chips rendered by the component. Accepts a static className or a resolver function based on chip value.
*/
chipClassName: {
type: PropType<ChipClassName>;
default: undefined;
};
/**
* Creates a new chip when the component loses focus with a pending value.
*/
createOnBlur: {
type: BooleanConstructor;
default: boolean;
};
/**
* Sets the initial uncontrolled values rendered by the component.
*/
defaultValue: {
type: PropType<string[]>;
default: () => never[];
};
/**
* Toggle the disabled state for the component.
*/
disabled: BooleanConstructor;
/**
* Sets the `id` of the internal text input rendered by the component.
*/
id: StringConstructor;
/**
* Renders an inline label inside the component container.
*/
label: (StringConstructor | ObjectConstructor)[];
/**
* Sets the maximum number of chips that can be created in the component.
*/
maxChips: {
type: NumberConstructor;
default: null;
};
/**
* The default name for a value passed using v-model.
*/
modelValue: {
type: PropType<string[]>;
default: undefined;
};
/**
* Sets the name of the hidden input used by the component for form submission.
*/
name: StringConstructor;
/**
* Sets placeholder text for the internal input of the component.
*/
placeholder: {
type: StringConstructor;
default: string;
};
/**
* Toggle the readonly state for the component.
*/
readOnly: BooleanConstructor;
/**
* Displays remove buttons on chips managed by the component.
*/
removable: {
type: BooleanConstructor;
default: boolean;
};
/**
* Enables chip selection behavior in the component.
*/
selectable: BooleanConstructor;
/**
* Sets the separator character used to create chips while typing or pasting in the component.
*/
separator: {
type: StringConstructor;
default: string;
};
/**
* Size the component small or large.
*
* @values 'sm', 'lg'
*/
size: {
type: StringConstructor;
validator: (value: string) => boolean;
};
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "select" | "change" | "add" | "remove" | "update:modelValue")[], "input" | "select" | "change" | "add" | "remove" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/**
* Adds custom classes to chips rendered by the component. Accepts a static className or a resolver function based on chip value.
*/
chipClassName: {
type: PropType<ChipClassName>;
default: undefined;
};
/**
* Creates a new chip when the component loses focus with a pending value.
*/
createOnBlur: {
type: BooleanConstructor;
default: boolean;
};
/**
* Sets the initial uncontrolled values rendered by the component.
*/
defaultValue: {
type: PropType<string[]>;
default: () => never[];
};
/**
* Toggle the disabled state for the component.
*/
disabled: BooleanConstructor;
/**
* Sets the `id` of the internal text input rendered by the component.
*/
id: StringConstructor;
/**
* Renders an inline label inside the component container.
*/
label: (StringConstructor | ObjectConstructor)[];
/**
* Sets the maximum number of chips that can be created in the component.
*/
maxChips: {
type: NumberConstructor;
default: null;
};
/**
* The default name for a value passed using v-model.
*/
modelValue: {
type: PropType<string[]>;
default: undefined;
};
/**
* Sets the name of the hidden input used by the component for form submission.
*/
name: StringConstructor;
/**
* Sets placeholder text for the internal input of the component.
*/
placeholder: {
type: StringConstructor;
default: string;
};
/**
* Toggle the readonly state for the component.
*/
readOnly: BooleanConstructor;
/**
* Displays remove buttons on chips managed by the component.
*/
removable: {
type: BooleanConstructor;
default: boolean;
};
/**
* Enables chip selection behavior in the component.
*/
selectable: BooleanConstructor;
/**
* Sets the separator character used to create chips while typing or pasting in the component.
*/
separator: {
type: StringConstructor;
default: string;
};
/**
* Size the component small or large.
*
* @values 'sm', 'lg'
*/
size: {
type: StringConstructor;
validator: (value: string) => boolean;
};
}>> & Readonly<{
onInput?: ((...args: any[]) => any) | undefined;
onSelect?: ((...args: any[]) => any) | undefined;
onChange?: ((...args: any[]) => any) | undefined;
onRemove?: ((...args: any[]) => any) | undefined;
onAdd?: ((...args: any[]) => any) | undefined;
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
}>, {
disabled: boolean;
placeholder: string;
removable: boolean;
selectable: boolean;
readOnly: boolean;
chipClassName: ChipClassName;
createOnBlur: boolean;
defaultValue: string[];
maxChips: number;
modelValue: string[];
separator: string;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export { CChipInput };