import type { CSSResultGroup } from 'lit'; import SynergyElement from '../../internal/synergy-element.js'; import SynIcon from '../icon/icon.js'; import type SynSideNav from '../side-nav/side-nav.component.js'; /** * @summary The element provides a generic application header * that can be used to add applications name, toolbar and primary navigation. * * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-header--docs * @status stable * @since 1.10.0 * * @slot label - The label for the header * @slot logo - The logo that should be displayed. Will fall back to the SICK logo if not provided * @slot meta-navigation - The meta-navigation is used to add various application toolbar icons * Best used with `` and `` * @slot navigation - This slot can be used to add an optional horizontal navigation * @slot open-burger-menu-icon - An icon to use in lieu of the default burger-menu=open state. * The default close icon is a 'x'. * @slot closed-burger-menu-icon - An icon to use in lieu of the default burger-menu=closed state. * The default open icon is a burger menu. * * @event syn-burger-menu-closed - Emitted when the burger menu is toggled to closed * @event syn-burger-menu-hidden - Emitted when the burger menu is toggled to hidden * @event syn-burger-menu-open - Emitted when the burger menu is toggled to open * * @csspart base - The component's base wrapper * @csspart content - The wrapper most content items reside * @csspart logo - The wrapper the application logo resides in * @csspart label - The element wrapping the application name * @csspart meta-navigation - The Item wrapping the optional application menu * @csspart navigation - The wrapper that is holding the optional top navigation section * @csspart burger-menu-toggle-button - The button that toggles the burger menu * * @cssproperty --sticky-position - The position of the sticky header from the top of the viewport. Defaults to the top of the screen. * @cssproperty --metanavigation-item-size - The size of the items in the meta navigation. Also used for the height of dividers in the meta navigation. Defaults to var(--syn-font-size-x-large) */ export default class SynHeader extends SynergyElement { static styles: CSSResultGroup; static dependencies: { 'syn-icon': typeof SynIcon; }; private readonly hasSlotController; private readonly localize; /** * Internal mutation observer */ private mutationObserver; private isSideNavAnimating; private metaNavigationSlot; /** * The headers label. If you need to display HTML, use the `label` slot instead. */ label: string; /** * Defines the current visibility and icon of the burger-menu icon. * The menu button is added automatically if the component finds a syn-side-nav in * variant="default". * The following values can be used: * - hidden: The burger menu is not visible * - open: The burger menu is visible and shows the close icon * - closed: The burger menu is visible and shows the open icon */ burgerMenu: 'hidden' | 'open' | 'closed'; /** * Makes the header stick to the top of the viewport when scrolling. * Also applies a shadow to the header when scrolling. */ sticky: boolean; /** * The side nav */ private sideNav; private toggleBurgerMenu; private handleBurgerMenuToggle; /** * Automatically update the burger menu icon based * on the state of the side-nav, if one is connected. */ private updateBurgerMenuBasedOnSideNav; /** * #1130: Automatically set the correct styles for vertical syn-dividers in the meta navigation. * Dividers may be slotted directly in the meta navigation or be nested in another element, e.g. a wrapper for the meta navigation. * Horizontal dividers are not supported in the meta navigation and we don't want to override any styles for them that might be set by the user. */ private updateMetaNavigation; handleBurgerMenu(): void; connectedCallback(): void; firstUpdated(): void; disconnectedCallback(): void; /** * Connect a `syn-side-nav` to add automatic interaction of the header with the side navigation * like showing the burger menu icon and open / close handling. * * If no side navigation is connected, the header will use the first `syn-side-nav` element it * finds. * * @param sideNav The side navigation to connect to the header */ connectSideNavigation(sideNav: SynSideNav | null): void; render(): import("lit").TemplateResult; }