import { KbqPopoverModule } from '@koobiq/components/popover';

KbqPopoverComponent

componentCopy link to KbqPopoverComponent
@Component({ selector: 'kbq-popover-component' })
class KbqPopoverComponent extends KbqPopUp {
    readonly cdkTrapFocus: Signal<CdkTrapFocus>;
    prefix: string;
    header: string | TemplateRef<any>;
    footer: string | TemplateRef<any>;
    trigger: KbqPopoverTrigger | undefined;
    isTrapFocus: boolean;
    hasCloseButton: boolean;
    panelId: string | undefined;
    ariaLabel: string | undefined;
    get elementRef(): ElementRef<HTMLElement>;
    get headerId(): string;
    readonly destroyRef: DestroyRef;
    readonly hovered: Signal<boolean>;
    content: string | TemplateRef<unknown>;
    context: { $implicit: unknown } | null;
    arrow: boolean;
    arrowCentered: boolean;
    defaultPaddings: boolean;
    offset: number | null;
    visibleChange: EventEmitter<boolean>;
    classMap: {};
    visibility: PopUpVisibility;
    updateClassMap(
        placement: string,
        customClass: string,
        size: KbqPopUpSizeValues
    ): void;
    updateTrapFocus(isTrapFocus: boolean): void;
    onEscape(event?: Event): void;
    isTemplateRef<C>(value: unknown): value is TemplateRef<C>;
    show(delay: number): void;
    hide(delay: number): void;
    isVisible(): boolean;
    afterHidden(): Observable<void>;
    detectChanges(): void;
}
triggerCopy link to triggerKbqPopoverTrigger | undefined

The trigger that opened the panel; a panel rendered on its own has none.

panelIdCopy link to panelIdstring | undefined

Id of the panel element, referenced by the trigger's aria-controls. Written by the trigger.

ariaLabelCopy link to ariaLabelstring | undefined

Accessible name of the panel, used when there is no header to label it. Written by the trigger.

elementRefCopy link to elementRefElementRef<HTMLElement>

Panel element (.kbq-popover), not the component host.

Deliberately shadows the injected KbqPopUp.elementRef: the base measures and decorates the visible panel, so both applyPopupMargins here and setStickPosition/addEventListenerForHide in the base must resolve to the same element. The confirm template carries the matching #popover reference.

headerIdCopy link to headerIdstring

Id of the header text node, referenced by the panel's aria-labelledby.

hoveredCopy link to hoveredSignal<boolean>

Whether the pointer is over the pop-up.

arrowCenteredCopy link to arrowCenteredboolean

Whether the arrow points at the origin center while the panel keeps its placement. Defaults to false.

classMapCopy link to classMap{}

CSS classes of the pop-up element: the placement, the custom class and the modifiers of the subclass.

visibilityCopy link to visibilityPopUpVisibility

Stage of the pop-up's life: not shown yet, visible, or hidden.

onEscape()Copy link to onEscape()void

Closes the panel on Escape inside it, unless a control there spent the key closing a popup of its own.

hide()Copy link to hide()void

Hides the popup after a specified delay.

The hide timeout triggers the hiding of the popup by updating visibility and emitting relevant events.

Parameters
delaynumber

The delay in milliseconds before hiding the popup.

afterHidden()Copy link to afterHidden()Observable<void>

Returns an observable that notifies when the tooltip has been hidden from view.

KbqPopoverConfirmComponent

componentCopy link to KbqPopoverConfirmComponent
@Component({ selector: 'kbq-popover-confirm-component' })
class KbqPopoverConfirmComponent extends KbqPopoverComponent {
    confirmButtonText: string;
    confirmText: string;
    readonly cdkTrapFocus: Signal<CdkTrapFocus>;
    prefix: string;
    header: string | TemplateRef<any>;
    footer: string | TemplateRef<any>;
    trigger: KbqPopoverTrigger | undefined;
    isTrapFocus: boolean;
    hasCloseButton: boolean;
    panelId: string | undefined;
    ariaLabel: string | undefined;
    get elementRef(): ElementRef<HTMLElement>;
    get headerId(): string;
    readonly destroyRef: DestroyRef;
    readonly hovered: Signal<boolean>;
    content: string | TemplateRef<unknown>;
    context: { $implicit: unknown } | null;
    arrow: boolean;
    arrowCentered: boolean;
    defaultPaddings: boolean;
    offset: number | null;
    visibleChange: EventEmitter<boolean>;
    classMap: {};
    visibility: PopUpVisibility;
    updateClassMap(
        placement: string,
        customClass: string,
        size: KbqPopUpSizeValues
    ): void;
    updateTrapFocus(isTrapFocus: boolean): void;
    onEscape(event?: Event): void;
    isTemplateRef<C>(value: unknown): value is TemplateRef<C>;
    show(delay: number): void;
    hide(delay: number): void;
    isVisible(): boolean;
    afterHidden(): Observable<void>;
    detectChanges(): void;
}
confirmButtonTextCopy link to confirmButtonTextstring

Caption of the confirm button. Written by the trigger.

confirmTextCopy link to confirmTextstring

Question rendered in the panel. Written by the trigger.

triggerCopy link to triggerKbqPopoverTrigger | undefined

The trigger that opened the panel; a panel rendered on its own has none.

panelIdCopy link to panelIdstring | undefined

Id of the panel element, referenced by the trigger's aria-controls. Written by the trigger.

ariaLabelCopy link to ariaLabelstring | undefined

Accessible name of the panel, used when there is no header to label it. Written by the trigger.

elementRefCopy link to elementRefElementRef<HTMLElement>

Panel element (.kbq-popover), not the component host.

Deliberately shadows the injected KbqPopUp.elementRef: the base measures and decorates the visible panel, so both applyPopupMargins here and setStickPosition/addEventListenerForHide in the base must resolve to the same element. The confirm template carries the matching #popover reference.

headerIdCopy link to headerIdstring

Id of the header text node, referenced by the panel's aria-labelledby.

hoveredCopy link to hoveredSignal<boolean>

Whether the pointer is over the pop-up.

arrowCenteredCopy link to arrowCenteredboolean

Whether the arrow points at the origin center while the panel keeps its placement. Defaults to false.

classMapCopy link to classMap{}

CSS classes of the pop-up element: the placement, the custom class and the modifiers of the subclass.

visibilityCopy link to visibilityPopUpVisibility

Stage of the pop-up's life: not shown yet, visible, or hidden.

onEscape()Copy link to onEscape()void

Closes the panel on Escape inside it, unless a control there spent the key closing a popup of its own.

hide()Copy link to hide()void

Hides the popup after a specified delay.

The hide timeout triggers the hiding of the popup by updating visibility and emitting relevant events.

Parameters
delaynumber

The delay in milliseconds before hiding the popup.

afterHidden()Copy link to afterHidden()Observable<void>

Returns an observable that notifies when the tooltip has been hidden from view.

KbqPopoverConfirmTrigger

directiveCopy link to KbqPopoverConfirmTrigger
@Directive({ selector: '[kbqPopoverConfirm]', exportAs: 'kbqPopoverConfirm' })
class KbqPopoverConfirmTrigger extends KbqPopoverTrigger {
    readonly popoverHideIfNotInViewPort = input<boolean>(true, {
        alias: 'kbqPopoverHideIfNotInViewPort'
    });
    readonly confirm = output<void>();
    confirmText: string;
    confirmButtonText: string;
    readonly placementChange: EventEmitter<KbqPopUpPlacementValues>;
    readonly visibleChange: EventEmitter<boolean>;
    readonly panelId: string;
    preventClose: boolean;
    defaultPaddings: boolean;
    stickToWindow: KbqStickToWindowPlacementValues | undefined;
    container: HTMLElement | undefined;
    arrow: boolean;
    arrowCentered: boolean;
    offset: number | null;
    autoFocus: boolean;
    relativeToPointer: boolean;
    enterDelay: number;
    set popoverDefaultPaddings(value: boolean);
    popoverVisible: boolean;
    popoverPlacement: KbqPopUpPlacementValues;
    popoverPlacementPriority: string | string[] | null;
    set popoverContainer(value: HTMLElement | undefined);
    hasBackdrop: boolean;
    set popoverHasBackdrop(value: boolean);
    header: string | TemplateRef<any>;
    content: string | TemplateRef<any>;
    footer: string | TemplateRef<any>;
    disabled: boolean;
    trigger: string;
    size: KbqPopUpSizeValues;
    customClass: string;
    context: unknown;
    ariaLabel: string | undefined;
    hasCloseButton: boolean;
    set popoverHasCloseButton(value: boolean);
    closeOnScroll: boolean | null;
    set popoverCloseOnScroll(value: boolean);
    get hasClickTrigger(): boolean;
    get capturesFocusOnOpen(): boolean;
    backdropClass: string;
    set popoverBackdropClass(value: string);
    popoverOrigin: KbqOverlayOrigin | null;
    set kbqLeaveDelay(value: number);
    isOpen: boolean;
    get isAttached(): boolean;
    get openedChange(): Observable<boolean>;
    updatePosition(reapplyPosition?: boolean): void;
    restoreFocus(): void;
    close(): void;
    updateOrigin(origin: KbqOverlayOrigin | null): void;
}
kbqPopoverHideIfNotInViewPortinputCopy link to kbqPopoverHideIfNotInViewPortboolean

Input (kbqPopoverHideIfNotInViewPort) — whether the popover closes once its trigger scrolls out of the nearest scrollable ancestor. A bound null or undefined restores the default, true.

confirmoutputCopy link to confirmvoid

Emits when the user confirms the action.

confirmTextCopy link to confirmTextstring

Input (kbqPopoverConfirmText) — question rendered in the panel. Falls back to KBQ_POPOVER_CONFIRM_TEXT and then to the popoverConfirm section of the active locale while unset or undefined.

confirmButtonTextCopy link to confirmButtonTextstring

Input (kbqPopoverConfirmButtonText) — caption of the confirm button. Falls back to KBQ_POPOVER_CONFIRM_BUTTON_TEXT and then to the popoverConfirm section of the active locale while unset or undefined.

placementChangeCopy link to placementChangeEventEmitter<KbqPopUpPlacementValues>

Emits the resolved placement whenever the panel is repositioned.

Declared as string to match the abstract member on KbqPopUpTrigger: EventEmitter is invariant, so a narrower emitter cannot override a wider one. Narrowing both is a change to the shared pop-up base and belongs to the branch that owns it.

visibleChangeCopy link to visibleChangeEventEmitter<boolean>

Emits true when the panel opens and false when it closes.

panelIdCopy link to panelIdstring

Id of the panel this trigger controls, shared with aria-controls.

preventCloseCopy link to preventCloseboolean

prevents closure by any event

defaultPaddingsCopy link to defaultPaddingsboolean

Whether the header, content and footer keep their default paddings. Bound with kbqPopoverDefaultPaddings.

stickToWindowCopy link to stickToWindowKbqStickToWindowPlacementValues | undefined

Additionally positions the element relative to the window side (Top, Right, Bottom and Left). If container is specified, the positioning will be relative to it.

containerCopy link to containerHTMLElement | undefined

Container for additional positioning, used with kbqPopoverStickToWindow. Bound with kbqPopoverContainer.

arrowCopy link to arrowboolean

Input (kbqPopoverArrow) — renders the arrow pointing at the trigger.

arrowCenteredCopy link to arrowCenteredboolean

Input (kbqPopoverArrowCentered) — centers the arrow on the trigger while preserving the panel placement. Defaults to false.

offsetCopy link to offsetnumber | null

Input (kbqPopoverOffset) — distance between the trigger and the panel, in pixels.

autoFocusCopy link to autoFocusboolean

Input (kbqPopoverAutoFocus) — whether opening the popover moves the keyboard focus into the panel. Turn it off for a panel that must not disturb what the reader is doing: taking focus away from a text selection collapses it. Focus then never enters the panel, so its content has to be reachable some other way.

relativeToPointerCopy link to relativeToPointerboolean

Input (kbqRelativeToPointer) — positions a click-opened popover at the click point. Keyboard and programmatic opens stay on the trigger. An explicit kbqPopoverOrigin takes precedence. Defaults to false.

enterDelayCopy link to enterDelaynumber

Input (kbqEnterDelay) — delay before opening, in milliseconds. Defaults to 0.

popoverDefaultPaddingsCopy link to popoverDefaultPaddingsboolean

Input (kbqPopoverDefaultPaddings) — sets defaultPaddings.

popoverVisibleCopy link to popoverVisibleboolean

Input (kbqPopoverVisible) — opens the popover when set to true and closes it when set to false.

popoverPlacementCopy link to popoverPlacementKbqPopUpPlacementValues

Input (kbqPopoverPlacement) — preferred placement of the panel relative to the trigger.

popoverPlacementPriorityCopy link to popoverPlacementPrioritystring | string[] | null

Input (kbqPopoverPlacementPriority) — ordered placements tried before the default strategy.

popoverContainerCopy link to popoverContainerHTMLElement | undefined

Input (kbqPopoverContainer) — sets container.

hasBackdropCopy link to hasBackdropboolean

Whether a backdrop is rendered behind the panel. With a backdrop the popover closes on a backdrop click instead of on any outside pointer event. Bound with kbqPopoverHasBackdrop.

popoverHasBackdropCopy link to popoverHasBackdropboolean

Input (kbqPopoverHasBackdrop) — sets hasBackdrop.

headerCopy link to headerstring | TemplateRef<any>

Input (kbqPopoverHeader) — header of the panel, as a string or a template.

contentCopy link to contentstring | TemplateRef<any>

Input (kbqPopoverContent) — content of the panel, as a string or a template.

disabledCopy link to disabledboolean

Input (kbqPopoverDisabled) — disables the trigger and closes an open popover.

triggerCopy link to triggerstring

Input (kbqTrigger) with the comma-separated trigger events. An empty value resets to click + keydown and rebinds listeners. The alias is shared with kbqTooltip, so binding it on an element that carries both reconfigures both.

sizeCopy link to sizeKbqPopUpSizeValues

Input (kbqPopoverSize) — preset width of the panel. An unknown value falls back to medium.

customClassCopy link to customClassstring

Input (kbqPopoverClass) with extra CSS classes applied to the panel.

contextCopy link to contextunknown

Context for popover templates (kbqPopoverHeader, kbqPopoverContent and kbqPopoverFooter).

ariaLabelCopy link to ariaLabelstring | undefined

Accessible name of the panel. Ignored while a string kbqPopoverHeader is set — the header labels the dialog then — and recommended for every header-less popover.

hasCloseButtonCopy link to hasCloseButtonboolean

Renders the icon-only close button in the top corner of the panel. Bound with kbqPopoverHasCloseButton.

popoverHasCloseButtonCopy link to popoverHasCloseButtonboolean

Input (kbqPopoverHasCloseButton) — sets hasCloseButton.

closeOnScrollCopy link to closeOnScrollboolean | null

Controls the behavior of closing the component on scroll. Bound with kbqPopoverCloseOnScroll. Three states:

  • null (default) — the popover survives a scroll, except when it scrolls out of a .kbq-hide-nested-popup container, which closes it;
  • true — any scroll closes the popover;
  • false — no scroll closes the popover, not even a .kbq-hide-nested-popup one.

Use CloseScrollStrategy as alternative

popoverCloseOnScrollCopy link to popoverCloseOnScrollboolean

Input (kbqPopoverCloseOnScroll) — sets closeOnScroll.

hasClickTriggerCopy link to hasClickTriggerboolean

Whether the trigger opens the popover on click, which is also what makes it a labelled dialog opener.

capturesFocusOnOpenCopy link to capturesFocusOnOpenboolean

Whether opening the popover should move the keyboard focus into the panel. Only deliberate opens (click, keyboard, programmatic) do — a hover- or focus-triggered popover must not steal focus.

backdropClassCopy link to backdropClassstring

CSS class applied to the backdrop, when there is one. Bound with kbqPopoverBackdropClass.

popoverBackdropClassCopy link to popoverBackdropClassstring

Input (kbqPopoverBackdropClass) — sets backdropClass.

popoverOriginCopy link to popoverOriginKbqOverlayOrigin | null

Input (kbqPopoverOrigin) — what the panel is positioned against: an element, or a rectangle in viewport coordinates such as the one kbqCreateCaretOrigin keeps on the caret. null anchors it to the trigger.

Bind it before kbqPopoverVisible, which opens the panel as it is written.

kbqLeaveDelayCopy link to kbqLeaveDelaynumber

Input (kbqLeaveDelay) — delay before closing, in milliseconds. Defaults to 0, and to defaultHoverLeaveDelay when kbqTrigger includes hover.

isOpenCopy link to isOpenboolean

Whether the pop-up overlay is currently open.

isAttachedCopy link to isAttachedboolean

Whether the pop-up overlay is currently attached.

Unlike isOpen, which follows the visibility of the pop-up component and therefore lags a task behind show()/hide(), this flips synchronously — it is the window during which the overlay (and its backdrop) is present in the DOM. Part of the KbqSiblingPopup contract.

openedChangeCopy link to openedChangeObservable<boolean>

Emits true when the pop-up opens and false when it closes. Part of the KbqSiblingPopup contract.

updatePosition()Copy link to updatePosition()void

Re-applies the overlay position.

Deliberately narrower than the inherited one, which also rebuilds the closing-action subscription: that stream carries a delay(0), so a reposition coalesced into the same task as an outside click — which is the task in which that click's change detection writes a popover input — would drop the close the click had already scheduled.

restoreFocus()Copy link to restoreFocus()void

Returns focus to the trigger when the popover is closed while focus is still inside its panel.

Goes through FocusMonitor rather than a native focus() call: the kbq focus ring is only rendered for a monitored origin, and a program origin keeps a tooltip on the same element from re-opening.

close()Copy link to close()void

Closes the popover on a deliberate action — the panel's close button, or Escape inside the panel.

hide() keeps a hover popover open while the pointer rests on the panel, so that the pointer can travel from the trigger to the content; that is exactly where the pointer is when the close button is clicked, so a deliberate close answers to kbqPopoverPreventClose and to nothing else.

updateOrigin()Copy link to updateOrigin()void

Positions the pop-up against origin — an element, or a rectangle in viewport coordinates such as the one kbqCreateCaretOrigin keeps on the caret — instead of the host element; null restores the host element. An open pop-up moves to the new origin at once.

This moves the position origin only. setExternalNativeElement moves the host itself, and with it the trigger's event listeners, its focus target and the scroll containers the pop-up follows.

KbqPopoverTrigger

directiveCopy link to KbqPopoverTrigger
@Directive({ selector: '[kbqPopover]', exportAs: 'kbqPopover' })
class KbqPopoverTrigger extends KbqPopUpTrigger<KbqPopoverComponent> {
    readonly popoverHideIfNotInViewPort = input<boolean>(true, {
        alias: 'kbqPopoverHideIfNotInViewPort'
    });
    readonly placementChange: EventEmitter<KbqPopUpPlacementValues>;
    readonly visibleChange: EventEmitter<boolean>;
    readonly panelId: string;
    preventClose: boolean;
    defaultPaddings: boolean;
    stickToWindow: KbqStickToWindowPlacementValues | undefined;
    container: HTMLElement | undefined;
    arrow: boolean;
    arrowCentered: boolean;
    offset: number | null;
    autoFocus: boolean;
    relativeToPointer: boolean;
    enterDelay: number;
    set popoverDefaultPaddings(value: boolean);
    popoverVisible: boolean;
    popoverPlacement: KbqPopUpPlacementValues;
    popoverPlacementPriority: string | string[] | null;
    set popoverContainer(value: HTMLElement | undefined);
    hasBackdrop: boolean;
    set popoverHasBackdrop(value: boolean);
    header: string | TemplateRef<any>;
    content: string | TemplateRef<any>;
    footer: string | TemplateRef<any>;
    disabled: boolean;
    trigger: string;
    size: KbqPopUpSizeValues;
    customClass: string;
    context: unknown;
    ariaLabel: string | undefined;
    hasCloseButton: boolean;
    set popoverHasCloseButton(value: boolean);
    closeOnScroll: boolean | null;
    set popoverCloseOnScroll(value: boolean);
    get hasClickTrigger(): boolean;
    get capturesFocusOnOpen(): boolean;
    backdropClass: string;
    set popoverBackdropClass(value: string);
    popoverOrigin: KbqOverlayOrigin | null;
    set kbqLeaveDelay(value: number);
    isOpen: boolean;
    get isAttached(): boolean;
    get openedChange(): Observable<boolean>;
    updatePosition(reapplyPosition?: boolean): void;
    restoreFocus(): void;
    close(): void;
    updateOrigin(origin: KbqOverlayOrigin | null): void;
}
kbqPopoverHideIfNotInViewPortinputCopy link to kbqPopoverHideIfNotInViewPortboolean

Input (kbqPopoverHideIfNotInViewPort) — whether the popover closes once its trigger scrolls out of the nearest scrollable ancestor. A bound null or undefined restores the default, true.

placementChangeCopy link to placementChangeEventEmitter<KbqPopUpPlacementValues>

Emits the resolved placement whenever the panel is repositioned.

Declared as string to match the abstract member on KbqPopUpTrigger: EventEmitter is invariant, so a narrower emitter cannot override a wider one. Narrowing both is a change to the shared pop-up base and belongs to the branch that owns it.

visibleChangeCopy link to visibleChangeEventEmitter<boolean>

Emits true when the panel opens and false when it closes.

panelIdCopy link to panelIdstring

Id of the panel this trigger controls, shared with aria-controls.

preventCloseCopy link to preventCloseboolean

prevents closure by any event

defaultPaddingsCopy link to defaultPaddingsboolean

Whether the header, content and footer keep their default paddings. Bound with kbqPopoverDefaultPaddings.

stickToWindowCopy link to stickToWindowKbqStickToWindowPlacementValues | undefined

Additionally positions the element relative to the window side (Top, Right, Bottom and Left). If container is specified, the positioning will be relative to it.

containerCopy link to containerHTMLElement | undefined

Container for additional positioning, used with kbqPopoverStickToWindow. Bound with kbqPopoverContainer.

arrowCopy link to arrowboolean

Input (kbqPopoverArrow) — renders the arrow pointing at the trigger.

arrowCenteredCopy link to arrowCenteredboolean

Input (kbqPopoverArrowCentered) — centers the arrow on the trigger while preserving the panel placement. Defaults to false.

offsetCopy link to offsetnumber | null

Input (kbqPopoverOffset) — distance between the trigger and the panel, in pixels.

autoFocusCopy link to autoFocusboolean

Input (kbqPopoverAutoFocus) — whether opening the popover moves the keyboard focus into the panel. Turn it off for a panel that must not disturb what the reader is doing: taking focus away from a text selection collapses it. Focus then never enters the panel, so its content has to be reachable some other way.

relativeToPointerCopy link to relativeToPointerboolean

Input (kbqRelativeToPointer) — positions a click-opened popover at the click point. Keyboard and programmatic opens stay on the trigger. An explicit kbqPopoverOrigin takes precedence. Defaults to false.

enterDelayCopy link to enterDelaynumber

Input (kbqEnterDelay) — delay before opening, in milliseconds. Defaults to 0.

popoverDefaultPaddingsCopy link to popoverDefaultPaddingsboolean

Input (kbqPopoverDefaultPaddings) — sets defaultPaddings.

popoverVisibleCopy link to popoverVisibleboolean

Input (kbqPopoverVisible) — opens the popover when set to true and closes it when set to false.

popoverPlacementCopy link to popoverPlacementKbqPopUpPlacementValues

Input (kbqPopoverPlacement) — preferred placement of the panel relative to the trigger.

popoverPlacementPriorityCopy link to popoverPlacementPrioritystring | string[] | null

Input (kbqPopoverPlacementPriority) — ordered placements tried before the default strategy.

popoverContainerCopy link to popoverContainerHTMLElement | undefined

Input (kbqPopoverContainer) — sets container.

hasBackdropCopy link to hasBackdropboolean

Whether a backdrop is rendered behind the panel. With a backdrop the popover closes on a backdrop click instead of on any outside pointer event. Bound with kbqPopoverHasBackdrop.

popoverHasBackdropCopy link to popoverHasBackdropboolean

Input (kbqPopoverHasBackdrop) — sets hasBackdrop.

headerCopy link to headerstring | TemplateRef<any>

Input (kbqPopoverHeader) — header of the panel, as a string or a template.

contentCopy link to contentstring | TemplateRef<any>

Input (kbqPopoverContent) — content of the panel, as a string or a template.

disabledCopy link to disabledboolean

Input (kbqPopoverDisabled) — disables the trigger and closes an open popover.

triggerCopy link to triggerstring

Input (kbqTrigger) with the comma-separated trigger events. An empty value resets to click + keydown and rebinds listeners. The alias is shared with kbqTooltip, so binding it on an element that carries both reconfigures both.

sizeCopy link to sizeKbqPopUpSizeValues

Input (kbqPopoverSize) — preset width of the panel. An unknown value falls back to medium.

customClassCopy link to customClassstring

Input (kbqPopoverClass) with extra CSS classes applied to the panel.

contextCopy link to contextunknown

Context for popover templates (kbqPopoverHeader, kbqPopoverContent and kbqPopoverFooter).

ariaLabelCopy link to ariaLabelstring | undefined

Accessible name of the panel. Ignored while a string kbqPopoverHeader is set — the header labels the dialog then — and recommended for every header-less popover.

hasCloseButtonCopy link to hasCloseButtonboolean

Renders the icon-only close button in the top corner of the panel. Bound with kbqPopoverHasCloseButton.

popoverHasCloseButtonCopy link to popoverHasCloseButtonboolean

Input (kbqPopoverHasCloseButton) — sets hasCloseButton.

closeOnScrollCopy link to closeOnScrollboolean | null

Controls the behavior of closing the component on scroll. Bound with kbqPopoverCloseOnScroll. Three states:

  • null (default) — the popover survives a scroll, except when it scrolls out of a .kbq-hide-nested-popup container, which closes it;
  • true — any scroll closes the popover;
  • false — no scroll closes the popover, not even a .kbq-hide-nested-popup one.

Use CloseScrollStrategy as alternative

popoverCloseOnScrollCopy link to popoverCloseOnScrollboolean

Input (kbqPopoverCloseOnScroll) — sets closeOnScroll.

hasClickTriggerCopy link to hasClickTriggerboolean

Whether the trigger opens the popover on click, which is also what makes it a labelled dialog opener.

capturesFocusOnOpenCopy link to capturesFocusOnOpenboolean

Whether opening the popover should move the keyboard focus into the panel. Only deliberate opens (click, keyboard, programmatic) do — a hover- or focus-triggered popover must not steal focus.

backdropClassCopy link to backdropClassstring

CSS class applied to the backdrop, when there is one. Bound with kbqPopoverBackdropClass.

popoverBackdropClassCopy link to popoverBackdropClassstring

Input (kbqPopoverBackdropClass) — sets backdropClass.

popoverOriginCopy link to popoverOriginKbqOverlayOrigin | null

Input (kbqPopoverOrigin) — what the panel is positioned against: an element, or a rectangle in viewport coordinates such as the one kbqCreateCaretOrigin keeps on the caret. null anchors it to the trigger.

Bind it before kbqPopoverVisible, which opens the panel as it is written.

kbqLeaveDelayCopy link to kbqLeaveDelaynumber

Input (kbqLeaveDelay) — delay before closing, in milliseconds. Defaults to 0, and to defaultHoverLeaveDelay when kbqTrigger includes hover.

isOpenCopy link to isOpenboolean

Whether the pop-up overlay is currently open.

isAttachedCopy link to isAttachedboolean

Whether the pop-up overlay is currently attached.

Unlike isOpen, which follows the visibility of the pop-up component and therefore lags a task behind show()/hide(), this flips synchronously — it is the window during which the overlay (and its backdrop) is present in the DOM. Part of the KbqSiblingPopup contract.

openedChangeCopy link to openedChangeObservable<boolean>

Emits true when the pop-up opens and false when it closes. Part of the KbqSiblingPopup contract.

updatePosition()Copy link to updatePosition()void

Re-applies the overlay position.

Deliberately narrower than the inherited one, which also rebuilds the closing-action subscription: that stream carries a delay(0), so a reposition coalesced into the same task as an outside click — which is the task in which that click's change detection writes a popover input — would drop the close the click had already scheduled.

restoreFocus()Copy link to restoreFocus()void

Returns focus to the trigger when the popover is closed while focus is still inside its panel.

Goes through FocusMonitor rather than a native focus() call: the kbq focus ring is only rendered for a monitored origin, and a program origin keeps a tooltip on the same element from re-opening.

close()Copy link to close()void

Closes the popover on a deliberate action — the panel's close button, or Escape inside the panel.

hide() keeps a hover popover open while the pointer rests on the panel, so that the pointer can travel from the trigger to the content; that is exactly where the pointer is when the close button is clicked, so a deliberate close answers to kbqPopoverPreventClose and to nothing else.

updateOrigin()Copy link to updateOrigin()void

Positions the pop-up against origin — an element, or a rectangle in viewport coordinates such as the one kbqCreateCaretOrigin keeps on the caret — instead of the host element; null restores the host element. An open pop-up moves to the new origin at once.

This moves the position origin only. setExternalNativeElement moves the host itself, and with it the trigger's event listeners, its focus target and the scroll containers the pop-up follows.

defaultHoverLeaveDelay

constCopy link to defaultHoverLeaveDelay

Leave delay applied to a hover-triggered popover when kbqLeaveDelay is not bound.

const defaultHoverLeaveDelay: number;

defaultOffsetYWithArrow

constCopy link to defaultOffsetYWithArrow
const defaultOffsetYWithArrow: number;

KBQ_POPOVER_CONFIRM_BUTTON_TEXT

constCopy link to KBQ_POPOVER_CONFIRM_BUTTON_TEXT

Overrides the confirm-button caption of every confirmation popover in the injector scope. Takes precedence over the locale, but not over the kbqPopoverConfirmButtonText input.

const KBQ_POPOVER_CONFIRM_BUTTON_TEXT: InjectionToken<string>;

KBQ_POPOVER_CONFIRM_TEXT

constCopy link to KBQ_POPOVER_CONFIRM_TEXT

Overrides the question of every confirmation popover in the injector scope. Takes precedence over the locale, but not over the kbqPopoverConfirmText input.

const KBQ_POPOVER_CONFIRM_TEXT: InjectionToken<string>;

KBQ_POPOVER_SCROLL_STRATEGY

constCopy link to KBQ_POPOVER_SCROLL_STRATEGY
const KBQ_POPOVER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
Suggestions for improvement
If you found a mistake or want to improve the article, create an issue on GitHub.