@coreui/vue
Version:
UI Components Library for Vue.js
146 lines (145 loc) • 4.83 kB
TypeScript
import { PropType } from 'vue';
import { type CChipSetItem } from './buildChips';
export type { CChipSetItem };
declare const CChipSet: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
/**
* Component used for the root node. Either a string to use a HTML element or a component.
*/
as: {
type: StringConstructor;
default: string;
};
/**
* Renders chips from data instead of the default slot. Each item is a string or an object with a `value`, an optional `label`, and any `CChip` props. The slot is used when this is omitted.
*/
chips: {
type: PropType<(string | CChipSetItem)[]>;
default: undefined;
};
/**
* Disables every chip rendered by the component.
*/
disabled: BooleanConstructor;
/**
* Turns the chips into filter chips, each showing a leading check icon while selected.
*/
filter: BooleanConstructor;
/**
* Displays a remove button on every chip rendered by the component.
*/
removable: BooleanConstructor;
/**
* Replaces the default remove icon on every chip with a custom icon node.
*/
removeIcon: {
type: (StringConstructor | ObjectConstructor)[];
default: undefined;
};
/**
* Enables selection behavior for the chips rendered by the component.
*/
selectable: BooleanConstructor;
/**
* The selected chip values passed using `v-model:selected`.
*/
selected: {
type: PropType<string[]>;
default: undefined;
};
/**
* Replaces the default selected icon shown by filter chips with a custom icon node.
*/
selectedIcon: {
type: (StringConstructor | ObjectConstructor)[];
default: undefined;
};
/**
* Sets how many chips can be selected at once.
*
* @values 'single', 'multiple'
*/
selectionMode: {
type: PropType<"single" | "multiple">;
default: string;
};
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "remove" | "update:chips" | "update:selected")[], "select" | "remove" | "update:chips" | "update:selected", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/**
* Component used for the root node. Either a string to use a HTML element or a component.
*/
as: {
type: StringConstructor;
default: string;
};
/**
* Renders chips from data instead of the default slot. Each item is a string or an object with a `value`, an optional `label`, and any `CChip` props. The slot is used when this is omitted.
*/
chips: {
type: PropType<(string | CChipSetItem)[]>;
default: undefined;
};
/**
* Disables every chip rendered by the component.
*/
disabled: BooleanConstructor;
/**
* Turns the chips into filter chips, each showing a leading check icon while selected.
*/
filter: BooleanConstructor;
/**
* Displays a remove button on every chip rendered by the component.
*/
removable: BooleanConstructor;
/**
* Replaces the default remove icon on every chip with a custom icon node.
*/
removeIcon: {
type: (StringConstructor | ObjectConstructor)[];
default: undefined;
};
/**
* Enables selection behavior for the chips rendered by the component.
*/
selectable: BooleanConstructor;
/**
* The selected chip values passed using `v-model:selected`.
*/
selected: {
type: PropType<string[]>;
default: undefined;
};
/**
* Replaces the default selected icon shown by filter chips with a custom icon node.
*/
selectedIcon: {
type: (StringConstructor | ObjectConstructor)[];
default: undefined;
};
/**
* Sets how many chips can be selected at once.
*
* @values 'single', 'multiple'
*/
selectionMode: {
type: PropType<"single" | "multiple">;
default: string;
};
}>> & Readonly<{
onSelect?: ((...args: any[]) => any) | undefined;
onRemove?: ((...args: any[]) => any) | undefined;
"onUpdate:chips"?: ((...args: any[]) => any) | undefined;
"onUpdate:selected"?: ((...args: any[]) => any) | undefined;
}>, {
filter: boolean;
disabled: boolean;
as: string;
selected: string[];
selectionMode: "single" | "multiple";
removable: boolean;
removeIcon: string | Record<string, any>;
selectable: boolean;
selectedIcon: string | Record<string, any>;
chips: (string | CChipSetItem)[];
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export { CChipSet };