@lion/ui
Version:
A package of extendable web components
76 lines • 2.52 kB
TypeScript
/**
* Custom element for rendering SVG icons
*
* @customElement lion-icon
*/
export class LionIcon extends LitElement {
static get properties(): {
/**
* @desc When icons are not loaded as part of an iconset defined on iconManager,
* it's possible to directly load an svg.
*/
svg: {
attribute: boolean;
};
/**
* @desc The iconId allows to access icons that are registered to the IconManager
* For instance, "lion:space:alienSpaceship"
*/
ariaLabel: {
type: StringConstructor;
attribute: string;
reflect: boolean;
};
/**
* @desc The iconId allows to access icons that are registered to the IconManager
* For instance, "lion:space:alienSpaceship"
*/
iconId: {
type: StringConstructor;
attribute: string;
};
};
static get styles(): import("lit").CSSResult[];
/**
* TODO: check if this is a false positive or if we can improve
* @configure ReactiveElement
*/
static enabledWarnings: import("lit").WarningKind[];
ariaLabel: string;
iconId: string;
/**
* @private
* @type {TemplateResult|nothing|TagFunction}
*/
private __svg;
render(): import("lit-html").TemplateResult<1>;
/**
* On IE11, svgs without focusable false appear in the tab order
* so make sure to have <svg focusable="false"> in svg files
* @param {TemplateResult|nothing|TagFunction} svg
*/
set svg(arg: typeof nothing | import("lit-html").TemplateResult<1 | 2 | 3> | TagFunction);
/**
* @type {TemplateResult|nothing|TagFunction}
*/
get svg(): typeof nothing | import("lit-html").TemplateResult<1 | 2 | 3> | TagFunction;
/** @protected */
protected _onLabelChanged(): void;
/**
* @param {TemplateResult | nothing} svgObject
* @protected
*/
protected _renderSvg(svgObject: TemplateResult | typeof nothing): void;
/** @protected */
protected get _iconManager(): any;
/**
* @param {string} prevIconId
* @protected
*/
protected _onIconIdChanged(prevIconId: string): Promise<void>;
}
export type TemplateResult = import('lit').TemplateResult;
export type TagFunction = (tag: (strings: TemplateStringsArray, ...expr: string[]) => string) => string;
import { LitElement } from "lit";
import { nothing } from "lit-html";
//# sourceMappingURL=LionIcon.d.ts.map