UNPKG

primeng

Version:

PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeB

166 lines (161 loc) 5.07 kB
import * as i0 from '@angular/core'; import { TemplateRef, AfterContentInit, EventEmitter, QueryList, SimpleChanges } from '@angular/core'; import * as i1 from 'primeng/api'; import { PrimeTemplate } from 'primeng/api'; import { BaseComponent } from 'primeng/basecomponent'; import * as _primeuix_styled from '@primeuix/styled'; import { BaseStyle } from 'primeng/base'; /** * Defines valid templates in Chip. * @group Templates */ interface ChipTemplates { /** * Custom template of content. */ content(): TemplateRef<any>; /** * Custom template of remove icon. */ removeicon(): TemplateRef<any>; } interface ChipProps { label?: string; icon?: string | undefined; image?: string | undefined; alt?: string | undefined; style?: { [klass: string]: any; } | null | undefined; styleClass?: string | undefined; removable?: boolean | undefined; removeIcon?: string | undefined; } /** * * Chip represents people using icons, labels and images. * * [Live Demo](https://www.primeng.org/chip) * * @module chipstyle * */ declare enum ChipClasses { /** * Class name of the root element */ root = "p-chip", /** * Class name of the image element */ image = "p-chip-image", /** * Class name of the icon element */ icon = "p-chip-icon", /** * Class name of the label element */ label = "p-chip-label", /** * Class name of the remove icon element */ removeIcon = "p-chip-remove-icon" } declare class ChipStyle extends BaseStyle { name: string; theme: _primeuix_styled.StyleType; classes: { root: () => string[]; image: string; icon: string; label: string; removeIcon: string; }; static ɵfac: i0.ɵɵFactoryDeclaration<ChipStyle, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ChipStyle>; } interface ChipStyle extends BaseStyle { } /** * Chip represents people using icons, labels and images. * @group Components */ declare class Chip extends BaseComponent implements AfterContentInit { /** * Defines the text to display. * @group Props */ label: string | undefined; /** * Defines the icon to display. * @group Props */ icon: string | undefined; /** * Defines the image to display. * @group Props */ image: string | undefined; /** * Alt attribute of the image. * @group Props */ alt: string | undefined; /** * Class of the element. * @deprecated since v20.0.0, use `class` instead. * @group Props */ styleClass: string | undefined; /** * Whether to display a remove icon. * @group Props */ removable: boolean | undefined; /** * Icon of the remove element. * @group Props */ removeIcon: string | undefined; /** * Callback to invoke when a chip is removed. * @param {MouseEvent} event - Mouse event. * @group Emits */ onRemove: EventEmitter<MouseEvent>; /** * This event is triggered if an error occurs while loading an image file. * @param {Event} event - Browser event. * @group Emits */ onImageError: EventEmitter<Event>; visible: boolean; get removeAriaLabel(): any; /** * Used to pass all properties of the chipProps to the Chip component. * @group Props */ get chipProps(): ChipProps; set chipProps(val: ChipProps | undefined); _chipProps: ChipProps; _componentStyle: ChipStyle; removeIconTemplate: TemplateRef<any> | undefined; templates: QueryList<PrimeTemplate> | undefined; _removeIconTemplate: TemplateRef<any> | undefined; ngAfterContentInit(): void; ngOnChanges(simpleChanges: SimpleChanges): void; close(event: MouseEvent): void; onKeydown(event: any): void; imageError(event: Event): void; static ɵfac: i0.ɵɵFactoryDeclaration<Chip, never>; static ɵcmp: i0.ɵɵComponentDeclaration<Chip, "p-chip", never, { "label": { "alias": "label"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "image": { "alias": "image"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "removeIcon": { "alias": "removeIcon"; "required": false; }; "chipProps": { "alias": "chipProps"; "required": false; }; }, { "onRemove": "onRemove"; "onImageError": "onImageError"; }, ["removeIconTemplate", "templates"], ["*"], true, never>; static ngAcceptInputType_removable: unknown; } declare class ChipModule { static ɵfac: i0.ɵɵFactoryDeclaration<ChipModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<ChipModule, never, [typeof Chip, typeof i1.SharedModule], [typeof Chip, typeof i1.SharedModule]>; static ɵinj: i0.ɵɵInjectorDeclaration<ChipModule>; } export { Chip, ChipClasses, ChipModule, ChipStyle }; export type { ChipProps, ChipTemplates };