UNPKG

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