/** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import "../button/Button"; import "../icon/Icon"; import "../popover/Popover"; import { PlacementType } from "../popover/Popover.types"; import { LitElement, PropertyValues } from "lit"; export declare namespace CoachmarkPopover { /** * @fires coach-create - Fired when the coachmark is created. * @fires primary-button-action - Fired when the primary button is clicked. * @fires secondary-button-action - Fired when the secondary button is clicked. * @fires link-action - Fired when the link is clicked. * @fires coachmark-close - Fired when the coachmark is closed. */ class ELEMENT extends LitElement { /** * The placement of the coachmark popover. * This property determines where the popover will be positioned relative to the reference element. * Possible values include "auto", "top", "right", "bottom", "left", etc. * * @type {PlacementType} */ placement: PlacementType; triggerID: string; /** * The name of the icon to be displayed before the title in the header. * If set, the specified icon will be rendered before the title. * If not set, no icon will be rendered. * * @type {string | undefined} */ headerIconName?: string; /** * The title to be displayed in the header * If both neither header nor headerIconName is set, no header will be rendered. * * * @type {string | undefined} */ header?: string; /** * The message to be displayed in the body of the coachmark. * This property is used to set the content of the coachmark. * If this is not defined the coachmark content slot will be used for the body * * @type {string | undefined} */ message?: string; /** * Indicates whether the coachmark is visible. * If true, the coachmark will be shown. If false, it will be hidden. * * @type {boolean} */ show: boolean; /** * Indicates whether the close button should be hidden. * If true, the close button will not be rendered. If false, it will be rendered. * * @type {boolean} */ hideCloseButton: boolean; /** * The label for the primary button. * If set, the primary button will be rendered with the specified label. * If not set, no primary button will be rendered. * * @type {string | undefined} */ primaryButton?: string; /** * The label for the secondary button. * If set, the secondary button will be rendered with the specified label. * If not set, no secondary button will be rendered. * * @type {string | undefined} */ secondaryButton?: string; /** * The text for the link. * If set, the link will be rendered with the specified text. * If not set, no link will be rendered. * * @type {string | undefined} */ linkText?: string; /** * The URL for the link. * This property is used to set the href attribute of the link. * * @type {string} */ href: string; triggerComponent: HTMLSlotElement; popper: HTMLDivElement; /** * The content of the slot. * This property is used to store the assigned elements of the slot. * This is used for the body if message is not set * * @type {Element[] | null} */ private slotContent; /** * Returns the styles for the component. * This method is used to define the CSS styles for the component. * * @returns {CSSResult[]} The styles for the component. */ static get styles(): import("lit").CSSResult[]; connectedCallback(): void; /** * Dispatches a custom event with the specified event name. * The event includes the placement, reference, and popper elements in its detail. * The event bubbles up through the DOM and is composed, meaning it can cross shadow DOM boundaries. * * @param {string} eventName - The name of the custom event to dispatch. */ private notifyCustomEvent; /** * Dispatches a custom event to notify that the coachmark has been created. * The event is named "coach-create" and includes the placement, reference, and popper elements in its detail. * The event bubbles up through the DOM and is composed, meaning it can cross shadow DOM boundaries. */ notifyCoachCreate(): void; /** * Dispatches a custom event to notify that the primary button has been clicked. * The event is named "primary-button-action" and includes the placement, reference, and popper elements in its detail. * The event bubbles up through the DOM and is composed, meaning it can cross shadow DOM boundaries. */ notifyPrimaryButtonAction(): void; /** * Dispatches a custom event to notify that the secondary button has been clicked. * The event is named "secondary-button-action" and includes the placement, reference, and popper elements in its detail. * The event bubbles up through the DOM and is composed, meaning it can cross shadow DOM boundaries. */ notifySecondaryButtonAction(): void; /** * Dispatches a custom event to notify that the link has been clicked. * The event is named "link-action" and includes the placement, reference, and popper elements in its detail. * The event bubbles up through the DOM and is composed, meaning it can cross shadow DOM boundaries. */ notifyLinkAction(): void; /** * Dispatches a custom event to notify that the coachmark has been closed. * The event is named "coachmark-close" and includes the placement, reference, and popper elements in its detail. * The event bubbles up through the DOM and is composed, meaning it can cross shadow DOM boundaries. */ notifyCoachClose(): void; /** * Handles the slot change event. * This method is triggered when the content of a slot changes. * It updates the `slotContent` property with the assigned elements of the slot. * * @param {Event} event - The slot change event. */ private handleSlotChange; /** * Called when the element's properties are updated. * This method is triggered whenever one or more properties change. * if the `show` property hss changed it calls `notifyCoachCreate` if `show` property is true, otherwise it calls `notifyCoachClose`. * * @param {PropertyValues} changedProperties - The properties that changed. */ protected updated(changedProperties: PropertyValues): void; /** * Returns the template for the coachmark content. * This method is used to define the HTML structure for the coachmark content. * * @returns {TemplateResult} The template for the coachmark content. */ private coachmarkContentTemplate; /** * Returns the template for the header. * This method is used to define the HTML structure for the header. * * @returns {TemplateResult} The template for the header. */ private renderHeader; /** * Returns the template for the body. * This method is used to define the HTML structure for the body. * * @returns {TemplateResult} The template for the body. */ private renderBody; /** * Returns the template for the footer. * This method is used to define the HTML structure for the footer. * * @returns {TemplateResult} The template for the footer. */ private renderFooter; /** * Renders the HTML template for the component. * This method defines the structure and content of the component's shadow DOM. * * @returns {TemplateResult} The HTML template for the component. */ render(): import("lit-html").TemplateResult<1>; } } declare global { interface HTMLElementTagNameMap { "md-coachmark-popover": CoachmarkPopover.ELEMENT; } }