@synergy-design-system/components
Version:
This package provides the base of the Synergy Design System as native web components. It uses [lit](https://www.lit.dev) and parts of [shoelace](https://shoelace.style/). Synergy officially supports the latest two versions of all major browsers (as define
31 lines (30 loc) • 1.12 kB
TypeScript
import type SynNavItem from '../nav-item/nav-item.component.js';
/**
* Get a list of all assigned elements for a given slot
* @param slot The slot to query
* @returns Flattened list of assigned elements
*/
export declare const getAssignedElementsForSlot: (slot: HTMLSlotElement) => HTMLElement[];
/**
* Check if an item is a SynNavItem or otherwise an item that has a role of menuitem.
* Note we always treat all items as SynNavItems here
* @param item The item to check for
* @returns True if the item is a SynNavItem, false otherwise
*/
export declare const isNavItem: (item: HTMLElement) => item is SynNavItem;
/**
* Get a list of only SynNavItem elements
* @param items List of items to check for
* @returns New array of all found syn-nav-items
*/
export declare const filterOnlyNavItems: (items: HTMLElement[]) => SynNavItem[];
/**
* Show a navigation item
* @param item The item to show
*/
export declare const showNavigationItem: (item: SynNavItem) => void;
/**
* Hide a navigation item
* @param item The item to hide
*/
export declare const hideNavigationItem: (item: SynNavItem) => void;