import { CSSResultGroup } from 'lit'; import { LitElement } from 'lit'; import { TemplateResult } from 'lit'; /** * `` is an optional badge that can be displayed by a ``. * It can show a hint, a button with text/icon, and/or a countdown. */ export declare class FlowBadge extends FlowElement { #private; private _active; private _hintVisible; private _hintHiding; private _buttonVisible; private _buttonHiding; private _buttonCountDownText; private _parent; /** * Positioning properties for the badge. */ badgeTop: string; badgeLeft: string; badgeBottom: string; badgeRight: string; /** * The z-index for the badge and hint. */ badgeZIndex: string; hintAriaLabel: string; /** * Optional text for the hint bubble. */ hintText: string | null; /** * Duration (in ms) for which the hint remains visible. */ hintDuration: number; hintColor: string; hintBackgroundColor: string; hintFontSize: string; hintWidth: string; hintBorder: string; hintBorderRadius: string; hintBoxShadow: string; hintPadding: string; hintSpacing: string; hintShowAnimation: string; hintShowAnimationDuration: string; hintHideAnimation: string; hintHideAnimationDuration: string; buttonAriaLabel: string; /** * A keyword (e.g. "bell", "gift") or image URL for the badge icon. */ buttonIcon: string | null; buttonText: string | null; /** * Format string to format the remaining time (using date-fns). */ buttonCountDownFormat: string | null; buttonColor: string; buttonBackgroundColor: string; buttonFontSize: string; buttonSize: string; buttonBorder: string; buttonBorderRadius: string; buttonBoxShadow: string; buttonShowAnimation: string; buttonShowAnimationDuration: string; buttonHideAnimation: string; buttonHideAnimationDuration: string; connectedCallback(): void; disconnectedCallback(): void; /** * Returns whether the badge is active. */ get active(): boolean; /** * Returns whether the badge (hint or button) is visible. */ get visible(): boolean; protected render(): TemplateResult; protected firstUpdated(): void; private hintClickedHandler; private buttonClickedHandler; /** * Lock the slot attribute to "badge" so that this element can only be used * in the ’s 'badge' slot. */ protected static forcedSlotName: string; static styles: CSSResultGroup[]; } /** * Dispatched when a FlowBadge is activated. */ export declare class FlowBadgeActivatedEvent extends CustomEvent { static type: string; constructor(detail: FlowBadgeActivatedEventDetail); } /** * The event detail for FlowBadgeActivatedEvent. */ export declare type FlowBadgeActivatedEventDetail = { initial: boolean; }; /** * Dispatched when a FlowBadge detects a click. */ export declare class FlowBadgeClickedEvent extends CustomEvent { static type: string; constructor(detail: FlowBadgeClickedEventDetail); } /** * The event detail for FlowBadgeClickedEvent. */ export declare type FlowBadgeClickedEventDetail = { area: string; }; /** * Dispatched when a FlowBadge is deactivated. */ export declare class FlowBadgeDeactivatedEvent extends CustomEvent { static type: string; constructor(); } /** * Dispatched when a FlowBadge becomes hidden. */ export declare class FlowBadgeHiddenEvent extends CustomEvent { static type: string; constructor(); } /** * Dispatched when a FlowBadge becomes shown. */ export declare class FlowBadgeShownEvent extends CustomEvent { static type: string; constructor(); } /** * Abstract base class for FlowModal elements. * It enforces a locked slot attribute if required and contains shared styles/animations. */ declare abstract class FlowElement extends LitElement { /** * Subclasses may override this property to lock the `slot` attribute. */ protected static forcedSlotName: string | null; /** * Observe the `slot` attribute if `forcedSlotName` is set. */ static get observedAttributes(): string[]; constructor(); /** * Whenever an observed attribute changes, if it's `slot` and we've specified a forcedSlotName, * we override it back to that forcedSlotName. This effectively locks the slot. */ attributeChangedCallback(name: string, oldVal: string, newVal: string): void; static styles: CSSResultGroup; } /** * `` orchestrates multiple `` components. * It manages storage persistence, timeouts, and activation order. */ export declare class FlowModal extends FlowElement { #private; private _flowSteps; /** * When `true`, prevents activating any steps. */ deactivated: boolean; /** * Comma‑separated list of storages to use with CascadeStorage. */ storages: string[]; /** * Namespace for storing flow state. */ storageNamespace: string; /** * How long to persist flow state in storage. */ storageDuration: number; constructor(); connectedCallback(): void; disconnectedCallback(): void; /** * Force-refreshes (or resets) the flow state. */ refreshState(force?: boolean): void; /** * Indicates whether any `` is currently active. */ get active(): boolean; /** * Indicates whether the currently activated `` is visible. */ get visible(): boolean; /** * Returns the index of the currently activated ``. * If no step is active, returns null. */ get activatedStepIndex(): number | null; protected render(): TemplateResult; protected willUpdate(changedProperties: Map): void; protected firstUpdated(): void; static styles: CSSResultGroup[]; } /** * A specialized Error class used within FlowModal operations. */ export declare class FlowModalError extends Error { static type: string; constructor(message?: string); } /** * Dispatched when a FlowModal is started. */ export declare class FlowModalStartedEvent extends CustomEvent { static type: string; constructor(detail: FlowModalStartedEventDetail); } /** * The event detail for FlowModalStartedEvent, indicating whether the * flow is starting initially or being reactivated. */ export declare type FlowModalStartedEventDetail = { initial: boolean; }; /** * Dispatched when the FlowModal times out. */ export declare class FlowModalTimedOutEvent extends CustomEvent { static type: string; constructor(); } /** * `` represents a single step in a flow. * It can show a modal dialog and/or a badge. */ export declare class FlowStep extends FlowElement { #private; private _active; private _visible; private _hiding; private _parent; private _flowBadges; /** * Indicates if this step is ready to activate. */ ready: boolean; /** * Indicates if this step can be skipped if a subsequent step is also ready. */ skippable: boolean; /** * The timeout duration (in ms) for this step. */ timeoutDuration: number | null; /** * Whether to show a backdrop behind the modal content. */ backdrop: boolean; backdropBackgroundColor: string; backdropShowAnimation: string; backdropShowAnimationDuration: string; backdropHideAnimation: string; backdropHideAnimationDuration: string; modalAriaLabel: string; modalBackgroundColor: string; modalBoxShadow: string; modalBorder: string; modalBorderRadius: string; modalAlignItems: string; modalPadding: string; modalSpacing: string; modalMaxWidth: string; modalShowAnimation: string; modalShowAnimationDuration: string; modalHideAnimation: string; modalHideAnimationDuration: string; hideButtonAriaLabel: string; hideButtonSize: string; hideButtonPadding: string; hideButtonIcon: string | null; hideButtonColor: string; stepZIndex: string; constructor(); connectedCallback(): void; disconnectedCallback(): void; /** * Returns whether this step is currently active. */ get active(): boolean; /** * Returns whether the modal content is currently visible. */ get visible(): boolean; /** * Hides the modal content programmatically. */ hideModal(): void; /** * Show the modal content programmatically. */ showModal(): void; protected render(): TemplateResult; protected firstUpdated(): void; protected willUpdate(changedProps: Map): void; private backdropClickedHandler; private contentClickedHandler; private hideIconClickedHandler; /** * Lock the slot attribute to "step" so that this element can only be used * in the ’s 'step' slot. */ protected static forcedSlotName: string; static styles: CSSResultGroup[]; } /** * Dispatched when a FlowStep is activated. */ export declare class FlowStepActivatedEvent extends CustomEvent { static type: string; constructor(detail: FlowStepActivatedEventDetail); } /** * The event detail for FlowStepActivatedEvent. */ export declare type FlowStepActivatedEventDetail = { initial: boolean; }; /** * Dispatched when a FlowStep detects a click event. */ export declare class FlowStepClickedEvent extends CustomEvent { static type: string; constructor(detail: FlowStepClickedEventDetail); } /** * The event detail for FlowStepClickedEvent. */ export declare type FlowStepClickedEventDetail = { area: string; }; /** * Dispatched when a FlowStep is deactivated. */ export declare class FlowStepDeactivatedEvent extends CustomEvent { static type: string; constructor(); } /** * Dispatched when a FlowStep's modal content becomes hidden. */ export declare class FlowStepHiddenEvent extends CustomEvent { static type: string; constructor(); } /** * Dispatched when a FlowStep's modal content becomes shown. */ export declare class FlowStepShownEvent extends CustomEvent { static type: string; constructor(); } /** * Dispatched when a FlowStep is formally started. */ export declare class FlowStepStartedEvent extends CustomEvent { static type: string; constructor(detail: FlowStepStartedEventDetail); } /** * The event detail for FlowStepStartedEvent. */ export declare type FlowStepStartedEventDetail = { startedAt: number; }; export { } declare global { interface HTMLElementTagNameMap { 'flow-badge': FlowBadge; } } declare global { interface HTMLElementTagNameMap { 'flow-modal': FlowModal; } } declare global { interface HTMLElementTagNameMap { 'flow-step': FlowStep; } } declare global { interface HTMLElementTagNameMap { 'storybook-button': StorybookButton; } }