import { KbqPopoverModule } from '@koobiq/components/popover';@Component({ selector: 'kbq-popover-component' }) class KbqPopoverComponent extends KbqPopUp { prefix: string; header: string | TemplateRef<any>; footer: string | TemplateRef<any>; trigger: KbqPopoverTrigger; isTrapFocus: boolean; hasCloseButton: boolean; panelId: string; ariaLabel: string | undefined; get elementRef(): ElementRef<HTMLElement>; readonly cdkTrapFocus: Signal<CdkTrapFocus>; get headerId(): string; readonly destroyRef: DestroyRef; readonly hovered: Signal<boolean>; content: string | TemplateRef<unknown>; context: { $implicit: unknown } | null; classMap: {}; arrow: boolean; defaultPaddings: boolean; offset: number | null; visibility: PopUpVisibility; visibleChange: EventEmitter<boolean>; updateClassMap( placement: string, customClass: string, size: KbqPopUpSizeValues ): void; updateTrapFocus(isTrapFocus: boolean): void; onEscape(event?: Event): void; isTemplateRef(value: any): boolean; show(delay: number): void; hide(delay: number): void; isVisible(): boolean; afterHidden(): Observable<void>; detectChanges(): void; }
panelIdstring Id of the panel element, referenced by the trigger's aria-controls. Written by the trigger.
ariaLabelstring | undefined Accessible name of the panel, used when there is no header to label it. Written by the trigger.
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.
headerIdstring Id of the header text node, referenced by the panel's aria-labelledby.
hoveredSignal<boolean> Whether the pointer is over the pop-up.
classMap{} CSS classes of the pop-up element: the placement, the custom class and the modifiers of the subclass.
visibilityPopUpVisibility Stage of the pop-up's life: not shown yet, visible, or hidden.
onEscape()void Closes the panel on Escape inside it, unless a control there spent the key closing a popup of its own.
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.
delaynumber The delay in milliseconds before hiding the popup.
afterHidden()Observable<void> Returns an observable that notifies when the tooltip has been hidden from view.
@Component({ selector: 'kbq-popover-confirm-component' }) class KbqPopoverConfirmComponent extends KbqPopoverComponent { confirmButtonText: string; confirmText: string; prefix: string; header: string | TemplateRef<any>; footer: string | TemplateRef<any>; trigger: KbqPopoverTrigger; isTrapFocus: boolean; hasCloseButton: boolean; panelId: string; ariaLabel: string | undefined; get elementRef(): ElementRef<HTMLElement>; readonly cdkTrapFocus: Signal<CdkTrapFocus>; get headerId(): string; readonly destroyRef: DestroyRef; readonly hovered: Signal<boolean>; content: string | TemplateRef<unknown>; context: { $implicit: unknown } | null; classMap: {}; arrow: boolean; defaultPaddings: boolean; offset: number | null; visibility: PopUpVisibility; visibleChange: EventEmitter<boolean>; updateClassMap( placement: string, customClass: string, size: KbqPopUpSizeValues ): void; updateTrapFocus(isTrapFocus: boolean): void; onEscape(event?: Event): void; isTemplateRef(value: any): boolean; show(delay: number): void; hide(delay: number): void; isVisible(): boolean; afterHidden(): Observable<void>; detectChanges(): void; }
confirmButtonTextstring Caption of the confirm button. Written by the trigger.
confirmTextstring Question rendered in the panel. Written by the trigger.
panelIdstring Id of the panel element, referenced by the trigger's aria-controls. Written by the trigger.
ariaLabelstring | undefined Accessible name of the panel, used when there is no header to label it. Written by the trigger.
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.
headerIdstring Id of the header text node, referenced by the panel's aria-labelledby.
hoveredSignal<boolean> Whether the pointer is over the pop-up.
classMap{} CSS classes of the pop-up element: the placement, the custom class and the modifiers of the subclass.
visibilityPopUpVisibility Stage of the pop-up's life: not shown yet, visible, or hidden.
onEscape()void Closes the panel on Escape inside it, unless a control there spent the key closing a popup of its own.
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.
delaynumber The delay in milliseconds before hiding the popup.
afterHidden()Observable<void> Returns an observable that notifies when the tooltip has been hidden from view.
@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 panelId: string; preventClose: boolean; defaultPaddings: boolean; set popoverDefaultPaddings(value: boolean); popoverVisible: boolean; popoverPlacement: KbqPopUpPlacementValues; popoverPlacementPriority: string | string[] | null; stickToWindow: KbqStickToWindowPlacementValues | undefined; container: HTMLElement | undefined; 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); arrow: boolean; offset: number | null; autoFocus: boolean; popoverOrigin: KbqOverlayOrigin | null; enterDelay: number; set kbqLeaveDelay(value: number); readonly placementChange: EventEmitter<KbqPopUpPlacementValues>; readonly visibleChange: EventEmitter<boolean>; isOpen: boolean; get isAttached(): boolean; get openedChange(): Observable<boolean>; updatePosition(reapplyPosition?: boolean): void; restoreFocus(): void; close(): void; updateOrigin(origin: KbqOverlayOrigin | null): void; }
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.
confirmvoid Emits when the user confirms the action.
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.
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.
panelIdstring Id of the panel this trigger controls, shared with aria-controls.
preventCloseboolean prevents closure by any event
defaultPaddingsboolean Whether the header, content and footer keep their default paddings. Bound with kbqPopoverDefaultPaddings.
popoverDefaultPaddingsboolean Input (kbqPopoverDefaultPaddings) — sets defaultPaddings.
popoverVisibleboolean Input (kbqPopoverVisible) — opens the popover when set to true and closes it when set to false.
popoverPlacementKbqPopUpPlacementValues Input (kbqPopoverPlacement) — preferred placement of the panel relative to the trigger.
popoverPlacementPrioritystring | string[] | null Input (kbqPopoverPlacementPriority) — ordered placements tried before the default strategy.
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.
containerHTMLElement | undefined Container for additional positioning, used with kbqPopoverStickToWindow. Bound with kbqPopoverContainer.
popoverContainerHTMLElement | undefined Input (kbqPopoverContainer) — sets container.
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.
popoverHasBackdropboolean Input (kbqPopoverHasBackdrop) — sets hasBackdrop.
headerstring | TemplateRef<any> Input (kbqPopoverHeader) — header of the panel, as a string or a template.
contentstring | TemplateRef<any> Input (kbqPopoverContent) — content of the panel, as a string or a template.
footerstring | TemplateRef<any> Input (kbqPopoverFooter) — footer of the panel, as a string or a template.
disabledboolean Input (kbqPopoverDisabled) — disables the trigger and closes an open popover.
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.
sizeKbqPopUpSizeValues Input (kbqPopoverSize) — preset width of the panel. An unknown value falls back to medium.
customClassstring Input (kbqPopoverClass) with extra CSS classes applied to the panel.
contextunknown Context for popover templates (kbqPopoverHeader, kbqPopoverContent and kbqPopoverFooter).
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.
hasCloseButtonboolean Renders the icon-only close button in the top corner of the panel. Bound with kbqPopoverHasCloseButton.
popoverHasCloseButtonboolean Input (kbqPopoverHasCloseButton) — sets hasCloseButton.
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
popoverCloseOnScrollboolean Input (kbqPopoverCloseOnScroll) — sets closeOnScroll.
hasClickTriggerboolean Whether the trigger opens the popover on click, which is also what makes it a labelled dialog opener.
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.
backdropClassstring CSS class applied to the backdrop, when there is one. Bound with kbqPopoverBackdropClass.
popoverBackdropClassstring Input (kbqPopoverBackdropClass) — sets backdropClass.
arrowboolean Input (kbqPopoverArrow) — renders the arrow pointing at the trigger.
offsetnumber | null Input (kbqPopoverOffset) — distance between the trigger and the panel, in pixels.
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.
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.
enterDelaynumber Input (kbqEnterDelay) — delay before opening, in milliseconds. Defaults to 0.
kbqLeaveDelaynumber Input (kbqLeaveDelay) — delay before closing, in milliseconds. Defaults to 0, and to
defaultHoverLeaveDelay when kbqTrigger includes hover.
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.
visibleChangeEventEmitter<boolean> Emits true when the panel opens and false when it closes.
isOpenboolean Whether the pop-up overlay is currently open.
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.
openedChangeObservable<boolean> Emits true when the pop-up opens and false when it closes. Part of the KbqSiblingPopup contract.
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()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()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()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.
@Directive({ selector: '[kbqPopover]', exportAs: 'kbqPopover' }) class KbqPopoverTrigger extends KbqPopUpTrigger<KbqPopoverComponent> { readonly popoverHideIfNotInViewPort = input<boolean>(true, { alias: 'kbqPopoverHideIfNotInViewPort' }); readonly panelId: string; preventClose: boolean; defaultPaddings: boolean; set popoverDefaultPaddings(value: boolean); popoverVisible: boolean; popoverPlacement: KbqPopUpPlacementValues; popoverPlacementPriority: string | string[] | null; stickToWindow: KbqStickToWindowPlacementValues | undefined; container: HTMLElement | undefined; 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); arrow: boolean; offset: number | null; autoFocus: boolean; popoverOrigin: KbqOverlayOrigin | null; enterDelay: number; set kbqLeaveDelay(value: number); readonly placementChange: EventEmitter<KbqPopUpPlacementValues>; readonly visibleChange: EventEmitter<boolean>; isOpen: boolean; get isAttached(): boolean; get openedChange(): Observable<boolean>; updatePosition(reapplyPosition?: boolean): void; restoreFocus(): void; close(): void; updateOrigin(origin: KbqOverlayOrigin | null): void; }
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.
panelIdstring Id of the panel this trigger controls, shared with aria-controls.
preventCloseboolean prevents closure by any event
defaultPaddingsboolean Whether the header, content and footer keep their default paddings. Bound with kbqPopoverDefaultPaddings.
popoverDefaultPaddingsboolean Input (kbqPopoverDefaultPaddings) — sets defaultPaddings.
popoverVisibleboolean Input (kbqPopoverVisible) — opens the popover when set to true and closes it when set to false.
popoverPlacementKbqPopUpPlacementValues Input (kbqPopoverPlacement) — preferred placement of the panel relative to the trigger.
popoverPlacementPrioritystring | string[] | null Input (kbqPopoverPlacementPriority) — ordered placements tried before the default strategy.
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.
containerHTMLElement | undefined Container for additional positioning, used with kbqPopoverStickToWindow. Bound with kbqPopoverContainer.
popoverContainerHTMLElement | undefined Input (kbqPopoverContainer) — sets container.
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.
popoverHasBackdropboolean Input (kbqPopoverHasBackdrop) — sets hasBackdrop.
headerstring | TemplateRef<any> Input (kbqPopoverHeader) — header of the panel, as a string or a template.
contentstring | TemplateRef<any> Input (kbqPopoverContent) — content of the panel, as a string or a template.
footerstring | TemplateRef<any> Input (kbqPopoverFooter) — footer of the panel, as a string or a template.
disabledboolean Input (kbqPopoverDisabled) — disables the trigger and closes an open popover.
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.
sizeKbqPopUpSizeValues Input (kbqPopoverSize) — preset width of the panel. An unknown value falls back to medium.
customClassstring Input (kbqPopoverClass) with extra CSS classes applied to the panel.
contextunknown Context for popover templates (kbqPopoverHeader, kbqPopoverContent and kbqPopoverFooter).
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.
hasCloseButtonboolean Renders the icon-only close button in the top corner of the panel. Bound with kbqPopoverHasCloseButton.
popoverHasCloseButtonboolean Input (kbqPopoverHasCloseButton) — sets hasCloseButton.
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
popoverCloseOnScrollboolean Input (kbqPopoverCloseOnScroll) — sets closeOnScroll.
hasClickTriggerboolean Whether the trigger opens the popover on click, which is also what makes it a labelled dialog opener.
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.
backdropClassstring CSS class applied to the backdrop, when there is one. Bound with kbqPopoverBackdropClass.
popoverBackdropClassstring Input (kbqPopoverBackdropClass) — sets backdropClass.
arrowboolean Input (kbqPopoverArrow) — renders the arrow pointing at the trigger.
offsetnumber | null Input (kbqPopoverOffset) — distance between the trigger and the panel, in pixels.
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.
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.
enterDelaynumber Input (kbqEnterDelay) — delay before opening, in milliseconds. Defaults to 0.
kbqLeaveDelaynumber Input (kbqLeaveDelay) — delay before closing, in milliseconds. Defaults to 0, and to
defaultHoverLeaveDelay when kbqTrigger includes hover.
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.
visibleChangeEventEmitter<boolean> Emits true when the panel opens and false when it closes.
isOpenboolean Whether the pop-up overlay is currently open.
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.
openedChangeObservable<boolean> Emits true when the pop-up opens and false when it closes. Part of the KbqSiblingPopup contract.
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()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()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()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.
Leave delay applied to a hover-triggered popover when kbqLeaveDelay is not bound.
const defaultHoverLeaveDelay: number;const defaultOffsetYWithArrow: number;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>;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>;const KBQ_POPOVER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;