UNPKG

@exadel/esl

Version:

Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components

58 lines (57 loc) 2.49 kB
import { ESLBaseTrigger } from '../../esl-trigger/core'; import type { ESLToggleable } from '../../esl-toggleable/core/esl-toggleable'; import type { ESLSharePopupActionParams } from './esl-share-popup'; export type { ESLShareTagShape } from './esl-share.shape'; /** * ESLShare * @author Dmytro Shovchko * * ESLShare is a component that allows triggering {@link ESLSharePopup} instance state changes. */ export declare class ESLShare extends ESLBaseTrigger { static is: string; static observedAttributes: string[]; /** Register {@link ESLShare} component and dependent {@link ESLSharePopup} */ static register(): void; /** Event to dispatch on {@link ESLShare} ready state */ SHARE_READY_EVENT: string; /** * List of social networks or groups of them to display (all by default). * The value - a string containing the names of the buttons or groups (specified with * the prefix `group:`) separated by spaces. * @example "facebook reddit group:default" * */ list: string; /** Hover event tracking media query. Default: `all` */ trackHover: string; /** Action params to pass into the popup */ popupParams: ESLSharePopupActionParams; /** @readonly Ready state marker */ ready: boolean; /** Target observable Toggleable */ get $target(): ESLToggleable | null; /** Checks that the target is in active state */ get isTargetActive(): boolean; /** The text writing directionality of the element */ protected get currentDir(): string; /** The base language of the element */ protected get currentLang(): string; /** Container element that defines bounds of popups visibility */ protected get $containerEl(): HTMLElement | undefined; protected connectedCallback(): void; protected attributeChangedCallback(attrName: string, oldValue: string | null, newValue: string | null): void; /** Updates the component and related popup */ protected update(): void; /** Gets attribute value from the closest element with group behavior settings */ protected getClosestRelatedAttr(attrName: string): string | null; /** Merges params to pass to the toggleable */ protected mergeToggleableParams(this: ESLShare, ...params: ESLSharePopupActionParams[]): ESLSharePopupActionParams; } declare global { export interface ESLLibrary { Share: typeof ESLShare; } export interface HTMLElementTagNameMap { 'esl-share': ESLShare; } }