@aurodesignsystem/auro-nav
Version:
auro-nav HTML custom element
95 lines • 3.21 kB
TypeScript
/**
* The auro-nav element provides users a way to ... (it would be great if you fill this out).
*
* @attr {Boolean} activeLink - If set, defines the currently active link.
* @attr {String} anchorNavContent - Defines the container that anchor links navigate within.
* @slot Slot for insertion of navigation links.
* @slot mobileToggleExpanded - Slot for button text in mobile when content is expanded.
* @slot mobileToggleCollapsed - Slot for button text in mobile when content is collapsed.
*/
export class AuroNav extends LitElement {
static get properties(): {
activeLink: {
type: ObjectConstructor;
};
anchorNavContent: {
type: StringConstructor;
};
};
static get styles(): import("lit").CSSResult[];
anchorNavContent: any;
/**
* @private
*/
private activeLink;
/**
* @private
*/
private labelHidden;
/**
* @private
*/
private mobileViewCollapsedNumLinks;
/**
* @private
* @returns {void} Sets the labelHidden attribute to true if there is no label slot content.
*/
private handleLabelSlot;
/**
* @private
* @returns {void} Inserts home and chevron-left icons for every breadcrumb.
*/
private handleSlotItems;
/**
* @private
* @returns {void} Inserts home and chevron-left icons for every breadcrumb.
*/
private manageBreadcrumbs;
/**
* Used for the anchorLink version to bind events to all link elements in the slotted content.
* @private
* @returns {void}
*/
private manageAnchorlinks;
anchorlinks: any[];
/**
* Used to toggle visibility of all links after the first 3 when viewed in the mobile layout.
* @private
* @returns {void}
*/
private toggleAnchorLinks;
/**
* Used for the anchorLink version to animate the position and size of the marker used to identify the active link.
* @private
* @returns {void}
*/
private handleAnchorNavAnimation;
/**
* @private
* @param {Object} link - Hyperlink in which the auro-icon is inserted.
* @param {String} category - Category that the auro-icon is classified under.
* @param {String} name - Name of the auro-icon.
* @param {String} size - Height and width of the auro-icon.
* @returns {void} Configures icon to be placed within each hyperlink.
*/
private insertIcon;
/**
* Sets the activeLink attribute based on which linked content section is in view.
* @private
* @returns {void}
*/
private assessActiveAnchorLink;
/**
* Used with the anchorLink version to determine if the designated content is currently viewable in the scrollbox.
* @private
* @param {Object} elem - The element to check if it is currently visible in the scrollContainer.
* @returns {Boolean} If true, the element passed in is visible.
*/
private isScrolledIntoView;
updated(changedProperties: any): void;
firstUpdated(): void;
scrollContainer: any;
render(): import("lit-html").TemplateResult<1>;
}
import { LitElement } from "lit";
//# sourceMappingURL=auro-nav.d.ts.map