@engie-group/fluid-design-system-angular
Version:
Fluid Design System Angular
83 lines (82 loc) • 2.69 kB
TypeScript
import { ElementRef, EventEmitter } from '@angular/core';
import { TagProperties, TagScale, TagVariant } from '@engie-group/fluid-types';
import * as i0 from "@angular/core";
export declare class TagComponent implements TagProperties {
private el;
private readonly tagClassName;
/**
* Tag variant
*
* @default `grey`
*/
variant?: TagVariant;
/**
* Tag scale
*/
scale?: TagScale;
/**
* Tag iconName
*/
iconName?: string;
/**
* Tag href. If set, tag renders a link
*/
href?: string;
/**
* target of link tag
*/
target?: string;
/**
* If set, tag renders a button
*/
isClickable?: boolean;
/**
* Whether tag can be closed
*/
isClosable?: boolean;
/**
* Whether tag should remove himself when close is clicked
*/
shouldAutoDestruct: boolean;
/**
* Label for the close button, if present
* @example "Remove [tag name]"
*/
closeLabel?: string;
/**
* Whether tag is disabled
*/
isDisabled?: boolean;
/**
* Whether tag has custom icon
*/
hasCustomIcon?: boolean;
/**
* Output event when clickable tag is clicked
*/
tagClick: EventEmitter<MouseEvent>;
/**
* Output event when tag is closed. Focus must be set to either previous tag, next tag or any relevant element.
*/
closeClick: EventEmitter<MouseEvent>;
constructor(el: ElementRef);
/**
* @ignore
*/
getTagVariantClass(): string;
/**
* @ignore
*/
getTagScaleClass(): string;
/**
* @ignore
*/
getTagDisabledClass(): string;
/**
* @ignore
*/
removeTag(event: MouseEvent): void;
focusIconButton(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<TagComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TagComponent, "nj-tag", never, { "variant": { "alias": "variant"; "required": false; }; "scale": { "alias": "scale"; "required": false; }; "iconName": { "alias": "iconName"; "required": false; }; "href": { "alias": "href"; "required": false; }; "target": { "alias": "target"; "required": false; }; "isClickable": { "alias": "isClickable"; "required": false; }; "isClosable": { "alias": "isClosable"; "required": false; }; "shouldAutoDestruct": { "alias": "shouldAutoDestruct"; "required": false; }; "closeLabel": { "alias": "closeLabel"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "hasCustomIcon": { "alias": "hasCustomIcon"; "required": false; }; }, { "tagClick": "tagClick"; "closeClick": "closeClick"; }, never, ["[njTagIcon]", "*"], true, never>;
}