import { DuetColor, DuetIconColor, DuetIconName, DuetLanguage, DuetLinkVariation, DuetMargin, DuetPadding, DuetTheme } from "../../common-types"; import { ThemeableComponent } from "../../common/themeable-component"; import { DuetLangObject } from "../../utils/language-utils"; /** * @part duet-link - piercing selector for styling the link * @part duet-link-content - piercing selector for styling the link content wrapper * @part block-chevron - piercing selector for styling the block chevron */ export declare class DuetLink implements ThemeableComponent { private nativeLink; private resolvedDownload; private mutationObserver; element: HTMLElement; /** * Style variation of the link. */ variation: DuetLinkVariation; /** * Adds accessible label for the link that is only shown for screen readers. * Typically, this label text replaces the visible text on the link for users * who use assistive technology. */ accessibleLabel: string; /** * The currently active language. This setting changes the external link * accessible label to match the chosen language. * @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing * @default "fi" */ language: DuetLanguage; /** * Defaults for accessibleLabelExternal * @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"} */ accessibleLabelExternalDefaults: DuetLangObject | string; /** * Adds accessible label for tooltip that is shown in external link (url & external have both been set) * @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"} */ accessibleLabelExternal: string; /** * Defaults for accessibleLabelDownload * @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"} */ accessibleLabelDownloadDefaults: DuetLangObject | string; /** * Adds accessible label for tooltip that is shown in external link (url & external have both been set) * @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"} */ accessibleLabelDownload: string; /** * If a button expands or collapses adjacent content, then use the ariaExpanded * prop to add the aria-expanded attribute to the button. Set the value to convey * the current expanded (true) or collapsed (false) state of the content. * Only works with empty url. */ accessibleExpanded: boolean; /** * Use this property to add an aria-haspopup attribute to a button. Only works with empty url. */ accessiblePopup: string; /** * Adds a unique identifier for the link. Please note that with this particular * component this id is added inside Shadow DOM. If you need an id on the html * element, use regular id attribute instead. */ identifier: string; /** * Theme of the button. */ theme: DuetTheme; /** * A destination to link to, rendered in the href attribute of a link. */ url: string; /** * Forces URL to open in a new browser tab. Used together with URL prop. */ external: boolean; /** * Causes the browser to treat the linked URL as a download. Can be used with or without a filename value. * With a value, it will be used as the name for the downloaded file. Without a value, the browser will suggest a name. * NOTE: this attribute only works for same-origin URLs, or the blob: and data: schemes. */ download: string; /** * Initially visually hidden link, which is shown on focus. */ tabToLink: boolean; /** * Icon to display on the left side of the link text (only with "block" and "button" variations) */ icon: DuetIconName; /** * Color of the icon to display (only with "block" and "button" variations) */ iconColor: DuetIconColor; /** * Color of the icon to display (with "button" variation) or color of the bullet (with "article-list" * variation). Not used for other variations. */ iconBackground: DuetColor; /** * Whether the icon changes its size responsively (only with "block" variation) */ iconResponsive: boolean; /** * Controls the margin of the component (only with "button" variation) */ margin: DuetMargin; /** * Controls the padding of the component (only with "block" variation) */ padding: DuetPadding; /** * Stores the */ isMediumScreen: boolean; ariaLabel: string; /** * Component lifecycle events. */ componentWillLoad(): void; connectedCallback(): void; disconnectedCallback(): void; /** * Sets focus on the specified `duet-link`. Use this method instead of the global * `link.focus()`. */ setFocus(options?: FocusOptions): Promise; private setAriaLabel; private resolveDownload; private renderDefaultContent; private renderBlockContent; private renderButtonCardContent; private renderArticleListContent; private renderContent; /** * render() function * Always the last one in the class. */ render(): any; }