UNPKG

@aurodesignsystem/auro-hyperlink

Version:
57 lines 2.24 kB
/** * `<auro-hyperlink>` is a component that wraps an HTML `<a>` element, providing additional styling and behavior. * * @csspart link - Allows styling to be applied to the `a` element. * @csspart targetIcon - Allows styling to be applied to the icon that appears next to the hyperlink. */ export class AuroHyperlink extends ComponentBase { static get styles(): import("lit").CSSResult[]; static get shadowRootOptions(): { delegatesFocus: boolean; mode: ShadowRootMode; serializable?: boolean; slotAssignment?: SlotAssignmentMode; }; /** * This will register this element with the browser. * @param {string} [name="auro-hyperlink"] - The name of element that you want to register to. * * @example * AuroHyperlink.register("custom-hyperlink") // this will register this element to <custom-hyperlink/> * */ static register(name?: string): void; /** * @private */ private iconTag; /** * Renders the default layout for the hyperlink. * @returns {TemplateResult} * @private */ private renderLayoutDefault; /** * Renders the cta layout for the hyperlink. * @returns {TemplateResult} * @private */ private renderLayoutCTA; /** * Generates an object containing CSS classes based on the properties of the component. * * @example * // Assuming this.safeUri = 'http://example.com', this.role = 'button', this.type = 'cta' * this.getMarkup(); // Returns { 'hyperlink': true, 'hyperlink--nav': false, 'hyperlink--ondark': false, 'hyperlink--button': true, 'hyperlink--cta': true, 'hyperlink--secondary': false } * * @example * // Assuming this.safeUri = '', this.role = '', this.type = 'nav', this.ondark = true, this.variant = 'secondary' * this.getMarkup(); // Returns { 'hyperlink': false, 'hyperlink--nav': true, 'hyperlink--ondark': true, 'hyperlink--button': false, 'hyperlink--cta': false, 'hyperlink--secondary': true } * * @private * @returns {object} An object containing CSS classes. */ private getMarkup; } import ComponentBase from './component-base.mjs'; //# sourceMappingURL=auro-hyperlink.d.ts.map