UNPKG

3.29 kBTypeScriptView Raw
1import { OnChanges, SimpleChanges } from '@angular/core';
2import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
3import { FaSymbol, FlipProp, IconDefinition as CoreIconDefinition, IconParams, PullProp, RotateProp, SizeProp, Transform } from '@fortawesome/fontawesome-svg-core';
4import { FaConfig } from '../config';
5import { FaIconLibrary } from '../icon-library';
6import { AnimationProp } from '../shared/models/props.model';
7import { FaStackItemSizeDirective } from '../stack/stack-item-size.directive';
8import { FaStackComponent } from '../stack/stack.component';
9import { IconDefinition, IconProp } from '../types';
10import * as i0 from "@angular/core";
11export declare class FaIconComponent implements OnChanges {
12 private sanitizer;
13 private config;
14 private iconLibrary;
15 private stackItem;
16 icon: IconProp;
17 /**
18 * Specify a title for the icon.
19 *
20 * This text will be displayed in a tooltip on hover and presented to the
21 * screen readers.
22 */
23 title?: string;
24 /**
25 * Icon animation.
26 *
27 * Most of the animations are only available when using Font Awesome 6. With
28 * Font Awesome 5, only 'spin' and 'spin-pulse' are supported.
29 */
30 animation?: AnimationProp;
31 mask?: IconProp;
32 flip?: FlipProp;
33 size?: SizeProp;
34 pull?: PullProp;
35 border?: boolean;
36 inverse?: boolean;
37 symbol?: FaSymbol;
38 rotate?: RotateProp | string;
39 fixedWidth?: boolean;
40 transform?: string | Transform;
41 /**
42 * Specify the `role` attribute for the rendered <svg> element.
43 *
44 * @default 'img'
45 */
46 a11yRole: string;
47 renderedIconHTML: SafeHtml;
48 private document;
49 constructor(sanitizer: DomSanitizer, config: FaConfig, iconLibrary: FaIconLibrary, stackItem: FaStackItemSizeDirective, stack: FaStackComponent);
50 ngOnChanges(changes: SimpleChanges): void;
51 /**
52 * Programmatically trigger rendering of the icon.
53 *
54 * This method is useful, when creating {@link FaIconComponent} dynamically or
55 * changing its inputs programmatically as in these cases icon won't be
56 * re-rendered automatically.
57 */
58 render(): void;
59 protected findIconDefinition(i: IconProp | IconDefinition): CoreIconDefinition | null;
60 protected buildParams(): IconParams;
61 static ɵfac: i0.ɵɵFactoryDeclaration<FaIconComponent, [null, null, null, { optional: true; }, { optional: true; }]>;
62 static ɵcmp: i0.ɵɵComponentDeclaration<FaIconComponent, "fa-icon", never, { "icon": { "alias": "icon"; "required": false; }; "title": { "alias": "title"; "required": false; }; "animation": { "alias": "animation"; "required": false; }; "mask": { "alias": "mask"; "required": false; }; "flip": { "alias": "flip"; "required": false; }; "size": { "alias": "size"; "required": false; }; "pull": { "alias": "pull"; "required": false; }; "border": { "alias": "border"; "required": false; }; "inverse": { "alias": "inverse"; "required": false; }; "symbol": { "alias": "symbol"; "required": false; }; "rotate": { "alias": "rotate"; "required": false; }; "fixedWidth": { "alias": "fixedWidth"; "required": false; }; "transform": { "alias": "transform"; "required": false; }; "a11yRole": { "alias": "a11yRole"; "required": false; }; }, {}, never, never, true, never>;
63}