export type IdsBaseConstructor = new (...args: any[]) => IdsElement; export type IdsConstructor = new (...args: any[]) => T & IdsElement; /** * IDS Base Element */ export default class IdsElement extends HTMLElement { #private; args?: { noShadowRoot?: boolean; noStyles?: boolean; } | undefined; name: string; /** State object for current states */ state: Record | any; /** Nonce used for scripts, links */ cachedNonce: string; /** Component's first child element */ container?: HTMLElement | null; /** Styles Flag */ hasStyles: boolean; constructor(args?: { noShadowRoot?: boolean; noStyles?: boolean; } | undefined); /** Base connected call back */ connectedCallback(): void; /** Lifecycle event for after loaded */ mountedCallback(): void; /** * Handle Setting changes of the value has changed by calling the getter * in the extending class. * @param {string} name The property name * @param {string} oldValue The property old value * @param {string} newValue The property new value */ attributeChangedCallback(name: string, oldValue: string, newValue: string): void; /** * Release events and cleanup, if implementing disconnectedCallback * in a component you can just call super. */ disconnectedCallback(): void; /** * Handle Changes on Properties, this is part of the web component spec. * @type {Array} */ static get observedAttributes(): string[]; /** * @returns {Array} this component's observable properties */ static get attributes(): Array; /** * Render the component using the defined template. * @param {string} force force to (re)render the component * @returns {object} The object for chaining. */ render(force?: boolean): this; /** * @returns {string} containing this component's HTML Template */ template(): string; private static cachedNonce; /** * @returns {string} gets the nonce from the meta tag */ get nonce(): string; /** * Append Styles if present using adoptedStyleSheets for performance * @private */ appendStyles(): void; /** * Append theme css * @param {string} theme name of the theme * @private */ set theme(theme: string); lastTheme: string; /** * Get the theme and load it * @param {string} theme name of the theme */ loadTheme(theme: string): Promise; /** * Switch the theme in 4.x components * @param {string} value The theme value for example: default-light */ loadLegacyTheme(value: string): void; /** * Gets the element that should be used as the alignment target for popup positioning * NOTE: This method can be overridden in concrete classes to provide custom alignment targets * @returns {HTMLElement} The element to align popups against, defaults to the component itself */ elementToAlignPopup(): HTMLElement; }