import type { IconResolver } from './IconManager.js'; import { LitElement } from 'lit'; /** * Icons are used to provide additional meaning or in places where text label doesn’t fit. * Icon component allows you to display an icon from the Nordicons library. * * @status ready * @category image * @slot - The default slot used for placing a custom SVG icon. */ export default class Icon extends LitElement { static styles: import("lit").CSSResult[]; private static manager; /** * Register a custom icon resolver, which accepts the icon name as an parameter, and returns an SVG string. * Can return a string synchronously, or a promise of a string. * By default, will load icons from the Nord CDN. * @param resolver The resolver function to register. */ static registerResolver(resolver: IconResolver): void; /** * Register an individual icon so it can be rendered synchronously, to avoid loading over the network. * @param icon An object representing the icon to be registered, where "title" is the icon's name, and "default" is the SVG string. * This is intended to be used in cases where you import an icon's entire ES module and register it directly. */ static registerIcon(icon: { title: string; default: string; }): void; /** * Register an individual icon so it can be rendered synchronously, to avoid loading over the network. * @param name The name of the icon to be registered. * @param icon The SVG string for the icon. */ static registerIcon(name: string, icon: string): void; /** * The name of the icon to display, as defined by [nordicons](/nordicons/). */ name: string; /** * The size of the icon. * @default "m" */ size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'; /** * The color of the icon. * Can accept any valid CSS color value, including custom properties. */ color?: string; /** * An accessible label for the icon. * If no label is supplied, the icon is hidden from assistive technology. */ label?: string; private svg; render(): import("lit").TemplateResult<1>; protected handleNameChange(): void; } declare global { interface HTMLElementTagNameMap { 'nord-icon': Icon; } }