@cngx/common 0.1.0-rc.6 → 0.1.0-rc.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/chart/README.md +85 -0
  2. package/command/README.md +157 -0
  3. package/data/README.md +23 -0
  4. package/fesm2022/cngx-common-a11y.mjs +247 -85
  5. package/fesm2022/cngx-common-a11y.mjs.map +1 -1
  6. package/fesm2022/cngx-common-audio.mjs +37 -37
  7. package/fesm2022/cngx-common-audio.mjs.map +1 -1
  8. package/fesm2022/cngx-common-card.mjs +13 -9
  9. package/fesm2022/cngx-common-card.mjs.map +1 -1
  10. package/fesm2022/cngx-common-chart.mjs +3404 -1392
  11. package/fesm2022/cngx-common-chart.mjs.map +1 -1
  12. package/fesm2022/cngx-common-command.mjs +144 -0
  13. package/fesm2022/cngx-common-command.mjs.map +1 -0
  14. package/fesm2022/cngx-common-data.mjs +304 -213
  15. package/fesm2022/cngx-common-data.mjs.map +1 -1
  16. package/fesm2022/cngx-common-dialog.mjs +369 -100
  17. package/fesm2022/cngx-common-dialog.mjs.map +1 -1
  18. package/fesm2022/cngx-common-display.mjs +138 -24
  19. package/fesm2022/cngx-common-display.mjs.map +1 -1
  20. package/fesm2022/cngx-common-interactive.mjs +1089 -459
  21. package/fesm2022/cngx-common-interactive.mjs.map +1 -1
  22. package/fesm2022/cngx-common-layout.mjs +113 -61
  23. package/fesm2022/cngx-common-layout.mjs.map +1 -1
  24. package/fesm2022/cngx-common-popover.mjs +430 -54
  25. package/fesm2022/cngx-common-popover.mjs.map +1 -1
  26. package/fesm2022/cngx-common-stepper.mjs +107 -49
  27. package/fesm2022/cngx-common-stepper.mjs.map +1 -1
  28. package/fesm2022/cngx-common-tabs.mjs +1170 -752
  29. package/fesm2022/cngx-common-tabs.mjs.map +1 -1
  30. package/fesm2022/cngx-common-timeline.mjs +1086 -0
  31. package/fesm2022/cngx-common-timeline.mjs.map +1 -0
  32. package/fesm2022/cngx-common.mjs +2 -2
  33. package/fesm2022/cngx-common.mjs.map +1 -1
  34. package/package.json +11 -1
  35. package/stepper/README.md +1 -1
  36. package/theming/components/cngx-accordion.css +3 -0
  37. package/theming/components/cngx-badge.css +22 -0
  38. package/theming/components/cngx-bottom-sheet.css +14 -2
  39. package/theming/components/cngx-breadcrumb.css +8 -0
  40. package/theming/components/cngx-button-toggle.css +44 -2
  41. package/theming/components/cngx-data-grid.css +66 -0
  42. package/theming/components/cngx-dialog.css +12 -0
  43. package/theming/components/cngx-divider.css +12 -0
  44. package/theming/components/cngx-listbox.css +27 -0
  45. package/theming/components/cngx-menu.css +36 -0
  46. package/theming/components/cngx-ripple.css +1 -1
  47. package/theming/components/cngx-tooltip.css +11 -0
  48. package/types/cngx-common-a11y.d.ts +63 -17
  49. package/types/cngx-common-audio.d.ts +32 -32
  50. package/types/cngx-common-card.d.ts +10 -3
  51. package/types/cngx-common-chart.d.ts +1281 -141
  52. package/types/cngx-common-command.d.ts +167 -0
  53. package/types/cngx-common-data.d.ts +264 -98
  54. package/types/cngx-common-dialog.d.ts +214 -25
  55. package/types/cngx-common-display.d.ts +83 -13
  56. package/types/cngx-common-interactive.d.ts +708 -174
  57. package/types/cngx-common-layout.d.ts +48 -1
  58. package/types/cngx-common-popover.d.ts +120 -3
  59. package/types/cngx-common-stepper.d.ts +55 -5
  60. package/types/cngx-common-tabs.d.ts +386 -25
  61. package/types/cngx-common-timeline.d.ts +1059 -0
  62. package/types/cngx-common.d.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"cngx-common-popover.mjs","sources":["../../../projects/common/popover/anchor-positioning.ts","../../../projects/common/popover/popover-arrow-bounds.ts","../../../projects/common/popover/floating-fallback.ts","../../../projects/common/popover/popover.directive.ts","../../../projects/common/popover/popover-trigger.directive.ts","../../../projects/common/popover/tooltip.directive.ts","../../../projects/common/popover/popover-panel.config.ts","../../../projects/common/popover/popover-panel-slots.ts","../../../projects/common/popover/popover-panel.component.ts","../../../projects/common/popover/popover-action.component.ts","../../../projects/common/popover/popover-divider.directive.ts","../../../projects/common/popover/public-api.ts","../../../projects/common/popover/cngx-common-popover.ts"],"sourcesContent":["import type { PopoverPlacement } from './popover.types';\n\n/**\n * @internal\n * Detect CSS Anchor Positioning support.\n *\n * The spec renamed `inset-area` to `position-area` (Chrome 129+, Safari 18.4+).\n * Chrome 125-128 only supports the old `inset-area` name.\n * We detect whichever is available and use it consistently.\n */\nfunction detectAnchorSupport(): { supported: boolean; propertyName: string } {\n if (typeof CSS === 'undefined') {\n return { supported: false, propertyName: 'position-area' };\n }\n if (CSS.supports('position-area', 'bottom')) {\n return { supported: true, propertyName: 'position-area' };\n }\n if (CSS.supports('inset-area', 'bottom')) {\n return { supported: true, propertyName: 'inset-area' };\n }\n return { supported: false, propertyName: 'position-area' };\n}\n\n/** @internal */\nconst ANCHOR_SUPPORT = detectAnchorSupport();\n\n/** @internal `true` when the browser supports CSS Anchor Positioning. */\nexport const SUPPORTS_ANCHOR = ANCHOR_SUPPORT.supported;\n\n/** @internal The CSS property name for anchor area positioning (`position-area` or `inset-area`). */\nexport const ANCHOR_AREA_PROPERTY = ANCHOR_SUPPORT.propertyName;\n\n/**\n * @internal\n * CSS anchor area values mapped from logical placement tokens.\n *\n * Uses physical keywords only - Chrome does not support logical keywords\n * (`start`/`end`/`span-inline-*`) in `position-area` as of Chrome 140.\n *\n * `*-start` and `*-end` resolve to a `<direction> <span-*>` pair, NOT a\n * corner cell (`top right` etc.). Corner-cell values produce diagonal\n * placement relative to the anchor - visually wrong for edge-aligned\n * popovers. The `<direction> <span-*>` form keeps the popover on the\n * named edge while spanning toward the named alignment:\n * `right-start` → `right span-bottom` (right column, anchor's top edge aligned)\n * `right-end` → `right span-top` (right column, anchor's bottom edge aligned)\n * Single-keyword placements (`top`/`bottom`/`left`/`right`) resolve to\n * the edge-centered case (`position-area: right` + default\n * `justify-self: anchor-center`) and need no span keyword.\n */\nexport const POSITION_AREA: Record<PopoverPlacement, string> = {\n top: 'top span-all',\n 'top-start': 'top span-right',\n 'top-end': 'top span-left',\n bottom: 'bottom span-all',\n 'bottom-start': 'bottom span-right',\n 'bottom-end': 'bottom span-left',\n left: 'left span-all',\n 'left-start': 'left span-bottom',\n 'left-end': 'left span-top',\n right: 'right span-all',\n 'right-start': 'right span-bottom',\n 'right-end': 'right span-top',\n};\n","import { InjectionToken } from '@angular/core';\n\n/**\n * Geometry contract for the popover panel's arrow ornament.\n *\n * Provided by `CngxPopoverPanel` (via `useExisting`) so that `CngxPopover`\n * can read panel-side layout constants - primarily the border-radius\n * used to clamp the arrow inside the panel's rounded corners - through a\n * typed contract rather than reaching into the panel's CSS custom\n * properties directly. Inverts the atom -> molecule dependency direction\n * that an earlier `getComputedStyle('--cngx-popover-panel-border-radius')`\n * read had introduced on `CngxPopover`.\n *\n * `CngxPopover` injects the token with `{ optional: true }` so it keeps\n * working when used outside a `CngxPopoverPanel` (e.g. bare `[cngxPopover]`\n * on a `<div>`). The fallback value matches the panel's default\n * border-radius initial value (12 px).\n *\n * @category common/popover\n */\nexport interface CngxPopoverArrowBounds {\n /**\n * Panel border-radius in CSS pixels. Used by `CngxPopover` to clamp\n * the arrow offset inside the panel's rounded-corner extent.\n */\n readonly borderRadius: number;\n}\n\n/**\n * Injection token for the arrow-bounds contract.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-arrow-bounds.ts\n * @since 0.1.0\n */\nexport const CNGX_POPOVER_ARROW_BOUNDS = new InjectionToken<CngxPopoverArrowBounds>(\n 'CngxPopoverArrowBounds',\n);\n","import { InjectionToken, type Provider } from '@angular/core';\n\nimport type { PopoverPlacement } from './popover.types';\n\n/**\n * Signature matching `@floating-ui/dom` `computePosition`.\n * The consumer provides the actual function - the library never imports it directly.\n *\n * @category common/popover\n */\nexport type ComputePositionFn = (\n reference: HTMLElement,\n floating: HTMLElement,\n options?: {\n placement?: string;\n middleware?: unknown[];\n },\n) => Promise<{ x: number; y: number; placement: string }>;\n\n/**\n * Configuration for the Floating UI positioning fallback.\n *\n * @category common/popover\n */\nexport interface FloatingFallbackConfig {\n /** The `computePosition` function from `@floating-ui/dom`. */\n computePosition: ComputePositionFn;\n /** Middleware array (e.g. `[offset(8), flip(), shift()]`). */\n middleware?: unknown[];\n}\n\n/**\n * Injection token for the Floating UI fallback.\n * `null` when not provided - CSS Anchor Positioning is used instead.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/floating-fallback.ts\n * @since 0.1.0\n */\nexport const CNGX_FLOATING_FALLBACK = new InjectionToken<FloatingFallbackConfig | null>(\n 'CngxFloatingFallback',\n { factory: () => null },\n);\n\n/**\n * Provides the Floating UI positioning fallback for browsers without\n * CSS Anchor Positioning support.\n *\n * The consumer must install `@floating-ui/dom` themselves - this library\n * never imports it directly, keeping the bundle at zero cost for modern browsers.\n *\n * ```typescript\n * import { computePosition, flip, offset, shift } from '@floating-ui/dom';\n *\n * // In app.config.ts or component providers:\n * providers: [\n * provideFloatingFallback(computePosition, [offset(8), flip(), shift()]),\n * ]\n * ```\n *\n * @category common/popover\n */\nexport function provideFloatingFallback(\n computePosition: ComputePositionFn,\n middleware?: unknown[],\n): Provider {\n return {\n provide: CNGX_FLOATING_FALLBACK,\n useValue: { computePosition, middleware } satisfies FloatingFallbackConfig,\n };\n}\n\n/** @internal Maps cngx placement tokens to Floating UI placement strings. */\nexport const FLOATING_PLACEMENT: Record<PopoverPlacement, string> = {\n top: 'top',\n 'top-start': 'top-start',\n 'top-end': 'top-end',\n bottom: 'bottom',\n 'bottom-start': 'bottom-start',\n 'bottom-end': 'bottom-end',\n left: 'left',\n 'left-start': 'left-start',\n 'left-end': 'left-end',\n right: 'right',\n 'right-start': 'right-start',\n 'right-end': 'right-end',\n};\n","import { DOCUMENT } from '@angular/common';\nimport {\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n isDevMode,\n signal,\n untracked,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { fromEvent } from 'rxjs';\n\nimport { hasTransition, nextUid, onTransitionDone } from '@cngx/core/utils';\n\nimport { ANCHOR_AREA_PROPERTY, POSITION_AREA, SUPPORTS_ANCHOR } from './anchor-positioning';\nimport { CNGX_POPOVER_ARROW_BOUNDS, type CngxPopoverArrowBounds } from './popover-arrow-bounds';\nimport { CNGX_FLOATING_FALLBACK, FLOATING_PLACEMENT } from './floating-fallback';\nimport type {\n ArrowEdge,\n PopoverHaspopup,\n PopoverMode,\n PopoverPlacement,\n PopoverPositionTryFallback,\n PopoverState,\n} from './popover.types';\n\n/**\n * @internal Module-level registry of open popovers (insertion-ordered).\n */\nconst openPopovers = new Set<CngxPopover>();\n\n/**\n * @internal\n * Derive the panel's actual placement relative to the trigger from the live\n * rects. The arrow always sits on the panel edge that *faces* the trigger,\n * so a `position-try-fallbacks` flip (e.g. requested `bottom`, browser\n * resolved to `top` because there is no room below) routes the arrow to the\n * opposite edge without the consumer touching anything.\n *\n * Returns the requested placement's primary edge when the rects overlap -\n * the only case where no clean side is geometrically correct.\n */\nfunction resolveActualEdge(\n trigger: DOMRect,\n panel: DOMRect,\n requested: PopoverPlacement,\n): ArrowEdge {\n const tolerance = 4;\n if (panel.top >= trigger.bottom - tolerance) {\n return 'bottom';\n }\n if (panel.bottom <= trigger.top + tolerance) {\n return 'top';\n }\n if (panel.right <= trigger.left + tolerance) {\n return 'left';\n }\n if (panel.left >= trigger.right - tolerance) {\n return 'right';\n }\n return requested.split('-')[0] as ArrowEdge;\n}\n\n/** @internal Tracks which Documents already have the global Escape listener. */\nconst escapeListenerDocs = new WeakSet<Document>();\n/** @internal */\nfunction installGlobalEscapeListener(doc: Document): void {\n if (escapeListenerDocs.has(doc)) {\n return;\n }\n escapeListenerDocs.add(doc);\n doc.addEventListener('keydown', (e: KeyboardEvent) => {\n if (e.key !== 'Escape' || openPopovers.size === 0) {\n return;\n }\n // most-recently-opened wins (relies on Set's insertion-order iteration)\n const last = [...openPopovers].at(-1);\n if (last?.closeOnEscape()) {\n e.stopPropagation();\n last.hide();\n }\n });\n}\n\n/** @internal Tracks which Documents already have the global outside-click listener. */\nconst outsideClickListenerDocs = new WeakSet<Document>();\n/** @internal */\nfunction installGlobalOutsideClickListener(doc: Document): void {\n if (outsideClickListenerDocs.has(doc)) {\n return;\n }\n outsideClickListenerDocs.add(doc);\n // Capture phase so the dismiss decision runs before in-popover handlers can\n // stopPropagation. Snapshot the set: hide() mutates `openPopovers` mid-loop.\n doc.addEventListener(\n 'pointerdown',\n (e: PointerEvent) => {\n if (openPopovers.size === 0) {\n return;\n }\n for (const popover of [...openPopovers]) {\n popover.closeIfOutsidePointerDown(e.target);\n }\n },\n true,\n );\n}\n\n/** @internal Tracks which Documents have already warned about missing Popover API. */\nconst popoverApiWarnedDocs = new WeakSet<Document>();\n/** @internal */\nfunction warnMissingPopoverApi(el: HTMLElement): void {\n const doc = el.ownerDocument;\n if (popoverApiWarnedDocs.has(doc) || !isDevMode()) {\n return;\n }\n if (typeof el.showPopover !== 'function') {\n popoverApiWarnedDocs.add(doc);\n console.warn(\n 'CngxPopover: The native Popover API is not supported in this browser. ' +\n 'Install @oddbird/popover-polyfill and import it in your polyfills:\\n\\n' +\n ' npm install @oddbird/popover-polyfill\\n' +\n ' // polyfills.ts\\n' +\n \" import '@oddbird/popover-polyfill';\\n\",\n );\n }\n}\n\n/** @internal Tracks which Documents have already warned about missing Floating-UI middleware. */\nconst floatingMiddlewareWarnedDocs = new WeakSet<Document>();\n\n/**\n * @internal - test hook. Resets the per-Document warning suppression so\n * specs can exercise the warning path against a shared jsdom Document.\n * Do not call from production code.\n */\nexport function __resetFloatingMiddlewareWarnings(doc: Document): void {\n floatingMiddlewareWarnedDocs.delete(doc);\n}\n/** @internal */\nfunction warnMissingFloatingMiddleware(doc: Document): void {\n if (floatingMiddlewareWarnedDocs.has(doc) || !isDevMode()) {\n return;\n }\n floatingMiddlewareWarnedDocs.add(doc);\n console.warn(\n 'CngxPopover: provideFloatingFallback(computePosition) was registered without middleware. ' +\n 'Popovers in browsers without CSS Anchor Positioning will clip against the viewport edge ' +\n 'because no flip/shift recovery is configured. Pass middleware on registration:\\n\\n' +\n \" import { computePosition, flip, offset, shift } from '@floating-ui/dom';\\n\\n\" +\n ' providers: [\\n' +\n ' provideFloatingFallback(computePosition, [offset(8), flip(), shift()]),\\n' +\n ' ],\\n',\n );\n}\n\n/**\n * Signal-driven state machine for the native Popover API.\n *\n * Wraps the browser's `popover` attribute with reactive state,\n * CSS-transition-aware lifecycle, and CSS Anchor Positioning.\n * Pure state machine - contains no trigger logic, no delays.\n *\n * State lifecycle: `closed` → `opening` → `open` → `closing` → `closed`.\n * CSS classes `cngx-popover--opening`, `cngx-popover--open`, and\n * `cngx-popover--closing` are applied to the host for transition hooks.\n *\n * ### Declarative click popover\n * ```html\n * <button [cngxPopoverTrigger]=\"pop\" (click)=\"pop.toggle()\">Menu</button>\n * <div cngxPopover #pop=\"cngxPopover\" placement=\"bottom-start\">\n * <menu><li>Edit</li><li>Delete</li></menu>\n * </div>\n * ```\n *\n * ### Controlled open state\n * ```html\n * <div cngxPopover [cngxPopoverOpen]=\"showErrors()\" role=\"alert\">\n * {{ errorSummary() }}\n * </div>\n * ```\n * <example-url>http://localhost:4200/#/common/interactive/listbox/trigger/select-dropdown</example-url>\n * <example-url>http://localhost:4200/#/common/popover/click-popover</example-url>\n * <example-url>http://localhost:4200/#/common/popover/controlled-open</example-url>\n * <example-url>http://localhost:4200/#/common/popover/escape-mode</example-url>\n * <example-url>http://localhost:4200/#/common/popover/placement-variants</example-url>\n *\n * ### Collision recovery with `<try-tactic>` fallbacks\n * Apply CSS Anchor Positioning's `position-try-fallbacks` declaratively\n * by binding the new `positionTryFallbacks` input. Each entry is a CSS\n * `<try-tactic>` keyword (or composed pair) written verbatim into the\n * host's `position-try-fallbacks` property. Mirrors the precedent in\n * `@cngx/forms/select` panels.\n *\n * ```html\n * <div cngxPopover\n * placement=\"right-start\"\n * [positionTryFallbacks]=\"['flip-inline', 'flip-block', 'flip-block flip-inline']\">\n * <!-- popover content -->\n * </div>\n * ```\n *\n * When the array is empty (default), the host does not write a\n * `position-try-fallbacks` style - the browser positions the popover at\n * the declared `placement` regardless of viewport clipping.\n *\n * @category common/popover\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover.directive.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverTrigger, CngxPopoverPanel, CngxTooltip\n */\n@Directive({\n selector: '[cngxPopover]',\n exportAs: 'cngxPopover',\n standalone: true,\n host: {\n '[attr.popover]': 'mode()',\n '[id]': 'id()',\n '[attr.aria-hidden]': '!isVisible()',\n '[attr.data-arrow-placement]': 'resolvedEdge()',\n '[class.cngx-popover--opening]': 'isOpening()',\n '[class.cngx-popover--open]': 'isOpen()',\n '[class.cngx-popover--closing]': 'isClosing()',\n '[style.position-anchor]': 'cssAnchorRef()',\n '[style.position-try-fallbacks]': 'cssPositionTryFallbacks()',\n '[style.margin]': 'cssMargin()',\n '[style.--cngx-popover-arrow-offset]': 'arrowOffset()',\n '(toggle)': 'handleToggle($event)',\n },\n})\nexport class CngxPopover {\n /**\n * Host ElementRef. Public for consumers that need to pass the\n * popover's native element to APIs expecting an `ElementRef`\n * (scroll observers, intersection observers, focus managers, …).\n * Notable consumer: `injectRecycler({ scrollElement: pop.elementRef })`\n * for `@cngx/forms/select` virtualisation - the popover IS the\n * scroll container when `select-base.css`'s `max-height + overflow-y`\n * rules apply.\n */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly elRef = this.elementRef;\n private readonly destroyRef = inject(DestroyRef);\n private readonly doc = inject(DOCUMENT);\n private readonly floatingFallback = inject(CNGX_FLOATING_FALLBACK, { optional: true });\n private readonly _injector = inject(Injector);\n /**\n * Arrow-bounds contract resolved lazily on first use.\n * Eager inject() would loop: CngxPopover (host directive on the panel)\n * is constructed BEFORE the panel itself, so `useExisting: CngxPopoverPanel`\n * cannot resolve at directive-construction time.\n */\n private _arrowBounds: CngxPopoverArrowBounds | null | undefined = undefined;\n private getArrowBounds(): CngxPopoverArrowBounds | null {\n if (this._arrowBounds === undefined) {\n this._arrowBounds = this._injector.get(CNGX_POPOVER_ARROW_BOUNDS, null);\n }\n return this._arrowBounds;\n }\n\n /** Anchor-relative placement. */\n readonly placement = input<PopoverPlacement>('bottom');\n\n /**\n * CSS `<try-tactic>` fallbacks for `position-try-fallbacks`. Empty\n * array (default) means the host does not write the property at all.\n * Non-empty entries are written verbatim, comma-joined, in declaration\n * order. Spec-compatible vocabulary only (no cngx placement tokens).\n */\n readonly positionTryFallbacks = input<readonly PopoverPositionTryFallback[]>([]);\n\n /** Gap between anchor and popover in px. */\n readonly offset = input(8);\n\n /** Whether Escape key dismisses the popover. */\n readonly closeOnEscape = input(true);\n\n /**\n * Whether a `pointerdown` outside both the popover and its anchor (trigger)\n * dismisses it - menu / listbox light-dismiss. Opt-in (default `false`) so\n * existing manual-mode popovers keep full control; the anchor is excluded so\n * a click on the trigger toggles via the trigger's own handler instead of\n * being closed here and immediately reopened.\n */\n readonly closeOnOutsideClick = input(false);\n\n /** Native popover mode. `'manual'` for full control, `'auto'` for browser light dismiss. */\n readonly mode = input<PopoverMode>('manual');\n\n /**\n * Controlled open state. When set, drives the popover reactively.\n * `undefined` = uncontrolled (default).\n */\n readonly controlledOpen = input<boolean | undefined>(undefined, {\n alias: 'cngxPopoverOpen',\n });\n\n /**\n * When `true` (default), opening this popover closes any other open\n * `CngxPopover` instance. Set to `false` to allow multiple popovers\n * open simultaneously.\n */\n readonly exclusive = input(true);\n\n private readonly stateSignal = signal<PopoverState>('closed');\n private readonly idSignal = signal(nextUid('cngx-popover'));\n\n /** Current lifecycle state. */\n readonly state = this.stateSignal.asReadonly();\n\n /** Unique auto-generated ID for this popover instance. */\n readonly id = this.idSignal.asReadonly();\n\n /**\n * The anchor element for Floating UI fallback positioning.\n * Set by `CngxPopoverTrigger` or `CngxTooltip`.\n */\n readonly anchorElement = signal<HTMLElement | null>(null);\n\n /**\n * Inline-axis position the arrow ornament should sit at, expressed as\n * a CSS length pinned to the trigger's centre. Computed from\n * `anchorElement()` + the panel's own bounding box on every show /\n * reposition / window resize.\n *\n * Why a JS-computed CSS variable instead of `anchor(center)` in the\n * arrow's stylesheet: CSS Anchor Positioning's `anchor()` function does\n * not resolve from descendants of a top-layer element back to anchors\n * in the regular document flow. The panel itself can anchor to the\n * trigger, but the arrow inside the panel cannot. Writing the offset\n * from JS sidesteps that limitation and works identically in the\n * CSS-Anchor path and the Floating-UI fallback path.\n */\n private readonly _arrowOffset = signal<string | null>(null);\n\n /**\n * Public read-only view of the arrow's inline-axis offset (`<px>` or\n * `null` before the first geometry read). Consumers projecting a\n * `cngxPopoverArrow` template use this to render their own glyph at\n * the same coordinate the default arrow ornament would.\n */\n readonly arrowOffset = this._arrowOffset.asReadonly();\n\n /**\n * Hint for the `CngxPopoverTrigger`'s `aria-haspopup` value. Composers\n * such as `CngxPopoverPanel` write this signal so any trigger pointing\n * at the popover defaults to the right role without the consumer\n * having to set `haspopup` on every trigger element. Consumer-supplied\n * `haspopup` on the trigger still wins.\n */\n readonly haspopup = signal<PopoverHaspopup | undefined>(undefined);\n\n protected readonly isOpening = computed(() => this.stateSignal() === 'opening');\n protected readonly isOpen = computed(() => this.stateSignal() === 'open');\n protected readonly isClosing = computed(() => this.stateSignal() === 'closing');\n readonly isVisible = computed(() => this.stateSignal() !== 'closed');\n\n protected readonly cssAnchorRef = computed(() =>\n SUPPORTS_ANCHOR ? `--cngx-pop-${this.idSignal()}` : null,\n );\n\n /**\n * Primary edge of the placement, written from the live trigger and panel\n * rects so the arrow lands on the side that actually faces the trigger.\n * Falls back to the requested placement's edge before the first geometry\n * read so the arrow CSS rules still match on the very first paint.\n * Browsers normalise compound `position-area` values to a\n * non-deterministic keyword order; an explicit attribute is the stable\n * hook for the arrow stylesheet.\n */\n private readonly resolvedEdgeSignal = signal<ArrowEdge | null>(null);\n\n /**\n * Primary edge of the panel facing the trigger after browser-driven\n * shift / flip recovery. `top` | `bottom` | `left` | `right`. Public\n * so consumers projecting a `cngxPopoverArrow` template can rotate\n * their own glyph to match the rendered placement.\n */\n readonly resolvedEdge = computed<ArrowEdge>(\n () => this.resolvedEdgeSignal() ?? (this.placement().split('-')[0] as ArrowEdge),\n );\n\n protected readonly cssMargin = computed(() => (SUPPORTS_ANCHOR ? `${this.offset()}px` : null));\n\n /**\n * Comma-joined `position-try-fallbacks` value, or `null` to skip the\n * style write. Bound via host binding so empty / cleared lists drop the\n * property cleanly. Unsupported browsers ignore the unknown property -\n * gating on `SUPPORTS_ANCHOR` would only suppress a harmless write.\n */\n protected readonly cssPositionTryFallbacks = computed(() => {\n const list = this.positionTryFallbacks();\n return list.length > 0 ? list.join(', ') : null;\n });\n\n constructor() {\n // Host binding needs a static property name; position-area/inset-area name flips per browser.\n if (SUPPORTS_ANCHOR) {\n effect(() => {\n this.elRef.nativeElement.style.setProperty(\n ANCHOR_AREA_PROPERTY,\n POSITION_AREA[this.placement()],\n );\n });\n }\n effect(() => {\n const desired = this.controlledOpen();\n if (desired === undefined) {\n return;\n }\n const current = untracked(() => this.stateSignal());\n if (desired && current === 'closed') {\n this.show();\n }\n if (!desired && (current === 'open' || current === 'opening')) {\n this.hide();\n }\n });\n\n this.destroyRef.onDestroy(() => {\n if (this.stateSignal() !== 'closed') {\n this.finalize();\n }\n });\n\n // Recompute arrow offset on viewport resize while the popover is open.\n // takeUntilDestroyed handles teardown so finalize() does not need an\n // explicit removeEventListener pair.\n const view = this.doc.defaultView;\n if (view) {\n fromEvent(view, 'resize')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n if (this.stateSignal() !== 'closed') {\n this.updateArrowOffset();\n }\n });\n }\n }\n\n /** Open the popover. No-op if not `closed`. */\n show(): void {\n warnMissingPopoverApi(this.elRef.nativeElement);\n if (this.stateSignal() !== 'closed') {\n return;\n }\n if (this.exclusive()) {\n for (const other of openPopovers) {\n if (other !== this) {\n other.hide();\n }\n }\n }\n openPopovers.add(this);\n this.stateSignal.set('opening');\n this.elRef.nativeElement.showPopover();\n installGlobalEscapeListener(this.doc);\n installGlobalOutsideClickListener(this.doc);\n this.applyFloatingPosition();\n requestAnimationFrame(() => {\n if (this.stateSignal() === 'opening') {\n this.stateSignal.set('open');\n }\n // After layout settles the browser's anchor / shift recovery has\n // already placed the panel; reading its rect now reflects the\n // final position the arrow needs to point at. The panel-side\n // border-radius arrives through CNGX_POPOVER_ARROW_BOUNDS - no\n // getComputedStyle read on this directive's side.\n this.updateArrowOffset();\n });\n }\n\n /** Close the popover. No-op if already `closed` or `closing`. */\n hide(): void {\n if (this.stateSignal() === 'closed' || this.stateSignal() === 'closing') {\n return;\n }\n this.startClosing();\n }\n\n /** Toggle between open and closed. */\n toggle(): void {\n if (this.stateSignal() === 'closed') {\n this.show();\n } else {\n this.hide();\n }\n }\n\n protected handleToggle(e: ToggleEvent): void {\n // Sync with browser when it closes the popover (e.g. popover=\"auto\" light dismiss)\n if (e.newState === 'closed' && this.stateSignal() !== 'closed') {\n this.stateSignal.set('closed');\n }\n }\n\n /**\n * @internal Called by the global outside-click listener for every open\n * popover. Hides this one when it opted into `closeOnOutsideClick` and the\n * pointerdown landed outside both its panel and its anchor (trigger).\n */\n closeIfOutsidePointerDown(target: EventTarget | null): void {\n if (!this.closeOnOutsideClick()) {\n return;\n }\n const node = target as Node | null;\n const panel = this.popoverElement;\n const anchor = this.anchorElement();\n if (panel.contains(node) || anchor?.contains(node)) {\n return;\n }\n this.hide();\n }\n\n /**\n * Apply Floating UI positioning when CSS Anchor is not supported\n * and the consumer has provided the fallback via `provideFloatingFallback()`.\n */\n private applyFloatingPosition(): void {\n if (SUPPORTS_ANCHOR || !this.floatingFallback) {\n return;\n }\n const anchor = this.anchorElement();\n if (!anchor) {\n return;\n }\n\n const fb = this.floatingFallback;\n const el = this.popoverElement;\n const placement = FLOATING_PLACEMENT[this.placement()];\n const offsetVal = this.offset();\n\n const middleware = fb.middleware ?? [];\n if (middleware.length === 0) {\n warnMissingFloatingMiddleware(el.ownerDocument);\n }\n\n void fb.computePosition(anchor, el, { placement, middleware }).then(({ x, y }) => {\n el.style.left = `${x}px`;\n el.style.top = `${y}px`;\n el.style.margin = `${offsetVal}px`;\n this.updateArrowOffset();\n });\n }\n\n /**\n * Recompute the arrow's edge and inline offset from the live trigger and\n * panel rects. The resolved edge captures any browser-driven flip; the\n * offset is clamped inside the panel's rounded-corner bounds so the\n * arrow's base stays flush with the panel's straight edge even when the\n * trigger sits outside the panel's inline extent.\n */\n private updateArrowOffset(): void {\n const anchor = this.anchorElement();\n if (!anchor) {\n this._arrowOffset.set(null);\n this.resolvedEdgeSignal.set(null);\n return;\n }\n const panel = this.elRef.nativeElement;\n const panelRect = panel.getBoundingClientRect();\n if (panelRect.width === 0 || panelRect.height === 0) {\n this._arrowOffset.set(null);\n this.resolvedEdgeSignal.set(null);\n return;\n }\n const triggerRect = anchor.getBoundingClientRect();\n const edge = resolveActualEdge(triggerRect, panelRect, this.placement());\n this.resolvedEdgeSignal.set(edge);\n const horizontal = edge === 'top' || edge === 'bottom';\n const triggerCentre = horizontal\n ? triggerRect.left + triggerRect.width / 2\n : triggerRect.top + triggerRect.height / 2;\n const panelStart = horizontal ? panelRect.left : panelRect.top;\n const panelDim = horizontal ? panelRect.width : panelRect.height;\n const radius = this.getArrowBounds()?.borderRadius ?? 12;\n const raw = triggerCentre - panelStart;\n const clamped = Math.max(radius, Math.min(raw, panelDim - radius));\n this._arrowOffset.set(`${clamped}px`);\n }\n\n private get popoverElement(): HTMLElement {\n return this.elRef.nativeElement;\n }\n\n private startClosing(): void {\n if (hasTransition(this.popoverElement)) {\n this.stateSignal.set('closing');\n onTransitionDone(this.popoverElement, () => this.finalize());\n } else {\n this.finalize();\n }\n }\n\n private finalize(): void {\n openPopovers.delete(this);\n this._arrowOffset.set(null);\n this.resolvedEdgeSignal.set(null);\n const el = this.popoverElement;\n try {\n el.hidePopover();\n } catch {\n // Element may already be hidden or disconnected\n }\n this.stateSignal.set('closed');\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { computed, Directive, effect, ElementRef, inject, input, untracked } from '@angular/core';\n\nimport { SUPPORTS_ANCHOR } from './anchor-positioning';\nimport { type CngxPopover } from './popover.directive';\nimport type { PopoverHaspopup } from './popover.types';\n\n/**\n * ARIA wiring atom for elements that trigger a `CngxPopover`.\n *\n * Sets `aria-expanded`, `aria-controls`, and `aria-haspopup` based on the\n * referenced popover's state. Also sets `anchor-name` for CSS Anchor\n * Positioning and registers the anchor element on the popover for fallback\n * positioning.\n *\n * Contains **no event handlers** - the consumer binds interactions directly:\n *\n * ```html\n * <button [cngxPopoverTrigger]=\"pop\" (click)=\"pop.toggle()\">Menu</button>\n * <div cngxPopover #pop=\"cngxPopover\" placement=\"bottom-start\">…</div>\n * ```\n *\n * ### Focus restoration\n * Opt in with `[restoreFocus]=\"true\"` to capture the active element when\n * the popover opens and restore focus to it on close. Useful for menus,\n * confirm panels, and dialogs that steal focus from the trigger.\n *\n * @category common/popover\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-trigger.directive.ts\n * @since 0.1.0\n * @relatedTo CngxPopover, CngxPopoverPanel, CngxTooltip\n * <example-url>http://localhost:4200/#/common/popover/click-popover</example-url>\n * <example-url>http://localhost:4200/#/common/popover/controlled-open</example-url>\n * <example-url>http://localhost:4200/#/common/popover/escape-mode</example-url>\n * <example-url>http://localhost:4200/#/common/popover/placement-variants</example-url>\n */\n@Directive({\n selector: '[cngxPopoverTrigger]',\n exportAs: 'cngxPopoverTrigger',\n standalone: true,\n host: {\n '[attr.aria-expanded]': 'popoverRef().isVisible()',\n '[attr.aria-controls]': 'popoverRef().id()',\n '[attr.aria-haspopup]': 'haspopup()',\n '[style.anchor-name]': 'cssAnchorName()',\n },\n})\nexport class CngxPopoverTrigger {\n private readonly elRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly doc = inject(DOCUMENT);\n\n /** Explicit reference to the popover this trigger controls. */\n readonly popoverRef = input.required<CngxPopover>({\n alias: 'cngxPopoverTrigger',\n });\n\n /**\n * ARIA haspopup override. When set, wins over the popover-supplied\n * hint (`popoverRef().haspopup()`, populated by composers such as\n * `CngxPopoverPanel`). Final fallback when neither is set is `'true'`.\n * Accepts the W3C-spec values for supported popup-container roles:\n * `'dialog'`, `'listbox'`, `'menu'`, `'tree'`, or `'true'`.\n *\n * Pass `'none'` to emit no `aria-haspopup` at all - correct for a\n * disclosure whose popup is not one of the recognised widget types\n * (e.g. a list of links), where `aria-expanded` alone describes the\n * trigger. `'none'` wins over the composer hint, so it also cancels a\n * `CngxPopoverPanel`'s `'dialog'` default.\n */\n readonly haspopupInput = input<PopoverHaspopup | 'none' | undefined>(undefined, {\n alias: 'haspopup',\n });\n\n /**\n * When `true`, captures `document.activeElement` the moment the\n * popover transitions to a visible state and restores focus to that\n * element when the popover closes. Defaults to `false` so the trigger\n * stays a passive ARIA atom; opt in for menus, confirm panels, and\n * dialogs that move focus away from the trigger.\n */\n readonly restoreFocus = input(false);\n\n /**\n * Resolved `aria-haspopup`. Consumer override (`haspopup` on the\n * trigger element) wins; otherwise the popover's `haspopup` signal\n * (set by composers like `CngxPopoverPanel`) decides; final fallback\n * is `'true'`. The `'none'` sentinel resolves to `null` so the host\n * binding drops the attribute entirely.\n */\n protected readonly haspopup = computed<PopoverHaspopup | null>(() => {\n const resolved = this.haspopupInput() ?? this.popoverRef().haspopup() ?? 'true';\n return resolved === 'none' ? null : resolved;\n });\n\n protected readonly cssAnchorName = computed(() =>\n SUPPORTS_ANCHOR ? `--cngx-pop-${this.popoverRef().id()}` : null,\n );\n\n private savedFocus: HTMLElement | null = null;\n\n constructor() {\n // Register this element as the anchor for fallback positioning.\n effect(() => {\n const pop = this.popoverRef();\n untracked(() => pop.anchorElement.set(this.elRef.nativeElement));\n });\n\n // Focus restoration: capture on open, restore on close. Inert until\n // `restoreFocus` is opted into.\n effect(() => {\n if (!this.restoreFocus()) {\n return;\n }\n const visible = this.popoverRef().isVisible();\n if (visible) {\n untracked(() => {\n const active = this.doc.activeElement as HTMLElement | null;\n this.savedFocus = active ?? this.elRef.nativeElement;\n });\n } else if (this.savedFocus) {\n const target = this.savedFocus;\n this.savedFocus = null;\n untracked(() => {\n if (typeof target.focus === 'function' && target.isConnected) {\n target.focus();\n }\n });\n }\n });\n }\n}\n","import {\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n Renderer2,\n signal,\n untracked,\n} from '@angular/core';\n\nimport { CngxReducedMotion } from '@cngx/common/a11y';\nimport { nextUid } from '@cngx/core/utils';\n\nimport { ANCHOR_AREA_PROPERTY, POSITION_AREA, SUPPORTS_ANCHOR } from './anchor-positioning';\nimport { CNGX_FLOATING_FALLBACK, FLOATING_PLACEMENT } from './floating-fallback';\nimport type {\n PopoverPlacement,\n PopoverPositionTryFallback,\n PopoverState,\n TooltipTriggerMode,\n} from './popover.types';\n\n/** @internal Small debounce to prevent SR announcement storms during rapid Tab navigation. */\nconst FOCUS_DEBOUNCE_MS = 50;\n\n/**\n * String-input tooltip directive applied to the trigger element.\n *\n * Creates the tooltip popover element internally via `Renderer2` and manages\n * the full lifecycle: hover/focus triggers, open/close delays, Escape dismiss,\n * CSS Anchor Positioning, and ARIA wiring (`aria-describedby` + `role=\"tooltip\"`).\n *\n * The consumer sees only the attribute - no extra elements in the template.\n *\n * ### Basic\n * ```html\n * <button cngxTooltip=\"Ctrl+S\">Save</button>\n * ```\n *\n * ### With configuration\n * ```html\n * <button cngxTooltip=\"Ctrl+S\" tooltipPlacement=\"top\" [tooltipDelay]=\"500\">\n * Save\n * </button>\n * ```\n *\n * @category common/popover\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/tooltip.directive.ts\n * @since 0.1.0\n * @relatedTo CngxPopover, CngxPopoverTrigger\n * <example-url>http://localhost:4200/#/common/popover/tooltip/basic-tooltip</example-url>\n * <example-url>http://localhost:4200/#/common/popover/tooltip/custom-delay</example-url>\n * <example-url>http://localhost:4200/#/common/popover/tooltip/disabled-state</example-url>\n * <example-url>http://localhost:4200/#/common/popover/tooltip/keyboard-navigation</example-url>\n * <example-url>http://localhost:4200/#/common/popover/tooltip/placement</example-url>\n * <example-url>http://localhost:4200/#/common/popover/tooltip/programmatic-control</example-url>\n */\n@Directive({\n selector: '[cngxTooltip]',\n exportAs: 'cngxTooltip',\n standalone: true,\n hostDirectives: [CngxReducedMotion],\n host: {\n '[attr.aria-describedby]': 'ariaDescribedBy()',\n '[style.anchor-name]': 'cssAnchorName()',\n '(mouseenter)': 'handleMouseEnter()',\n '(mouseleave)': 'handleMouseLeave()',\n '(focus)': 'handleFocus()',\n '(blur)': 'handleBlur()',\n '(keydown.escape)': 'handleEscape($event)',\n },\n})\nexport class CngxTooltip {\n private readonly renderer = inject(Renderer2);\n private readonly elRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly floatingFallback = inject(CNGX_FLOATING_FALLBACK, { optional: true });\n\n /** Tooltip text content. */\n readonly text = input.required<string>({ alias: 'cngxTooltip' });\n\n /** Anchor-relative placement. */\n readonly placement = input<PopoverPlacement>('top', { alias: 'tooltipPlacement' });\n\n /** Gap between trigger and tooltip in px. */\n readonly offset = input(8, { alias: 'tooltipOffset' });\n\n /** Delay in ms before opening on mouseenter. */\n readonly openDelay = input(300, { alias: 'tooltipDelay' });\n\n /** Delay in ms before closing on mouseleave. */\n readonly closeDelay = input(100);\n\n /** Whether the tooltip is active. When `false`, no tooltip appears and ARIA is cleared. */\n readonly enabled = input(true);\n\n /**\n * Trigger mode. `'auto'` (default) opens on hover/focus with the\n * configured delays; `'manual'` opts the host out of the hover/focus\n * listeners so only `show()` / `hide()` open or close the tooltip.\n * Escape still dismisses an open tooltip in either mode.\n */\n readonly triggers = input<TooltipTriggerMode>('auto');\n\n /**\n * CSS `<try-tactic>` fallbacks for `position-try-fallbacks`. Empty array\n * (default) means no fallback CSS is written; the tooltip stays at the\n * declared `tooltipPlacement` regardless of viewport clipping. Tooltips\n * are decorative - collision recovery is opt-in per-tooltip.\n */\n readonly positionTryFallbacks = input<readonly PopoverPositionTryFallback[]>([], {\n alias: 'tooltipPositionTryFallbacks',\n });\n\n private readonly stateSignal = signal<PopoverState>('closed');\n private readonly idSignal = signal(nextUid('cngx-tooltip'));\n\n /** Current lifecycle state. */\n readonly state = this.stateSignal.asReadonly();\n\n private tooltipEl: HTMLElement | null = null;\n private openTimer: ReturnType<typeof setTimeout> | null = null;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n\n protected readonly ariaDescribedBy = computed(() => (this.enabled() ? this.idSignal() : null));\n\n protected readonly cssAnchorName = computed(() =>\n SUPPORTS_ANCHOR ? `--cngx-tip-${this.idSignal()}` : null,\n );\n\n constructor() {\n this.createTooltipElement();\n\n effect(() => {\n const text = this.text();\n const el = untracked(() => this.tooltipEl);\n if (el) {\n el.textContent = text;\n }\n });\n\n effect(() => {\n const placement = this.placement();\n const offset = this.offset();\n const el = untracked(() => this.tooltipEl);\n if (!el) {\n return;\n }\n\n if (SUPPORTS_ANCHOR) {\n el.style.setProperty('position-anchor', `--cngx-tip-${this.idSignal()}`);\n el.style.setProperty(ANCHOR_AREA_PROPERTY, POSITION_AREA[placement]);\n el.style.setProperty('margin', `${offset}px`);\n }\n });\n\n // position-try-fallbacks is written unconditionally - unsupported\n // browsers ignore the unknown property, and the write keeps a uniform\n // test surface across jsdom + real browsers.\n effect(() => {\n const fallbacks = this.positionTryFallbacks();\n const el = untracked(() => this.tooltipEl);\n if (!el) {\n return;\n }\n if (fallbacks.length > 0) {\n el.style.setProperty('position-try-fallbacks', fallbacks.join(', '));\n } else {\n el.style.removeProperty('position-try-fallbacks');\n }\n });\n\n effect(() => {\n const enabled = this.enabled();\n if (!enabled) {\n const current = untracked(() => this.stateSignal());\n if (current !== 'closed') {\n this.hide();\n }\n }\n });\n\n this.destroyRef.onDestroy(() => {\n this.clearTimers();\n this.tooltipEl?.remove();\n });\n }\n\n /** Show the tooltip immediately (bypassing delay). */\n show(): void {\n if (!this.enabled() || this.stateSignal() !== 'closed') {\n return;\n }\n this.stateSignal.set('opening');\n this.tooltipEl!.showPopover();\n this.applyFloatingPosition();\n requestAnimationFrame(() => {\n if (this.stateSignal() === 'opening') {\n this.stateSignal.set('open');\n }\n });\n }\n\n /** Hide the tooltip immediately (bypassing delay). */\n hide(): void {\n if (this.stateSignal() === 'closed' || this.stateSignal() === 'closing') {\n return;\n }\n this.clearTimers();\n this.finalize();\n }\n\n protected handleMouseEnter(): void {\n if (this.triggers() !== 'auto' || !this.enabled()) {\n return;\n }\n this.clearCloseTimer();\n const delay = this.openDelay();\n if (delay > 0) {\n this.openTimer = setTimeout(() => this.show(), delay);\n } else {\n this.show();\n }\n }\n\n protected handleMouseLeave(): void {\n if (this.triggers() !== 'auto') {\n return;\n }\n this.clearOpenTimer();\n const delay = this.closeDelay();\n if (delay > 0) {\n this.closeTimer = setTimeout(() => this.hide(), delay);\n } else {\n this.hide();\n }\n }\n\n protected handleFocus(): void {\n if (this.triggers() !== 'auto' || !this.enabled()) {\n return;\n }\n // Debounce prevents SR announcement storm when user rapidly Tabs\n // through a toolbar of tooltipped buttons.\n this.clearTimers();\n this.openTimer = setTimeout(() => this.show(), FOCUS_DEBOUNCE_MS);\n }\n\n protected handleBlur(): void {\n if (this.triggers() !== 'auto') {\n return;\n }\n this.clearTimers();\n this.hide();\n }\n\n protected handleEscape(event: Event): void {\n if (this.stateSignal() !== 'closed') {\n // Prevent Escape from bubbling to parent overlays (e.g. dialog)\n event.stopPropagation();\n this.hide();\n }\n }\n\n private applyFloatingPosition(): void {\n if (SUPPORTS_ANCHOR || !this.floatingFallback || !this.tooltipEl) {\n return;\n }\n\n const fb = this.floatingFallback;\n const trigger = this.elRef.nativeElement;\n const tooltip = this.tooltipEl;\n const placement = FLOATING_PLACEMENT[this.placement()];\n const middleware = fb.middleware ?? [];\n\n void fb.computePosition(trigger, tooltip, { placement, middleware }).then(({ x, y }) => {\n tooltip.style.left = `${x}px`;\n tooltip.style.top = `${y}px`;\n });\n }\n\n private createTooltipElement(): void {\n const el = this.renderer.createElement('div') as HTMLElement;\n el.setAttribute('popover', 'manual');\n el.setAttribute('role', 'tooltip');\n el.id = this.idSignal();\n el.setAttribute('aria-hidden', 'true');\n el.classList.add('cngx-tooltip');\n\n const trigger = this.elRef.nativeElement;\n if (trigger.parentElement) {\n this.renderer.insertBefore(trigger.parentElement, el, trigger.nextSibling);\n } else {\n this.renderer.appendChild(trigger, el);\n }\n\n this.tooltipEl = el;\n }\n\n private finalize(): void {\n if (this.tooltipEl) {\n try {\n this.tooltipEl.hidePopover();\n } catch {\n // May already be hidden or disconnected\n }\n this.tooltipEl.setAttribute('aria-hidden', 'true');\n }\n this.stateSignal.set('closed');\n }\n\n private clearTimers(): void {\n this.clearOpenTimer();\n this.clearCloseTimer();\n }\n\n private clearOpenTimer(): void {\n if (this.openTimer) {\n clearTimeout(this.openTimer);\n this.openTimer = null;\n }\n }\n\n private clearCloseTimer(): void {\n if (this.closeTimer) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n}\n","import { InjectionToken, type Provider, type TemplateRef } from '@angular/core';\n\nimport type { CngxPopoverArrowContext } from './popover-panel-slots';\nimport type { CngxPopoverPanelConfig, PopoverPanelFeature } from './popover-panel.types';\n\n/** @internal Default configuration - no auto-dismiss, no close-on-success, variant='default'. */\nconst DEFAULT_CONFIG: CngxPopoverPanelConfig = {\n defaultVariant: 'default',\n};\n\n/**\n * Injection token for popover panel configuration.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel.config.ts\n * @since 0.1.0\n */\nexport const CNGX_POPOVER_PANEL_CONFIG = new InjectionToken<CngxPopoverPanelConfig>(\n 'CngxPopoverPanelConfig',\n { factory: () => DEFAULT_CONFIG },\n);\n\n/**\n * Provides configuration for `CngxPopoverPanel` instances.\n *\n * ```typescript\n * providers: [\n * providePopoverPanel(\n * withAutoDismiss({ info: 5000, success: 3000 }),\n * withCloseOnSuccess(300),\n * ),\n * ]\n * ```\n *\n * @category common/popover\n */\nexport function providePopoverPanel(...features: PopoverPanelFeature[]): Provider {\n const config = features.reduce((acc, f) => f(acc), { ...DEFAULT_CONFIG });\n return { provide: CNGX_POPOVER_PANEL_CONFIG, useValue: config };\n}\n\n/**\n * Auto-dismiss the panel after a timeout, per variant.\n *\n * @param timing - Map of variant name to dismiss duration in ms.\n * ```typescript\n * withAutoDismiss({ info: 5000, success: 3000 })\n * ```\n *\n * @category common/popover\n */\nexport function withAutoDismiss(timing: Record<string, number>): PopoverPanelFeature {\n return (config) => ({ ...config, autoDismiss: { ...config.autoDismiss, ...timing } });\n}\n\n/**\n * Auto-close the panel after an async action in the footer succeeds.\n *\n * @param delay - Delay in ms before closing. Defaults to `300`.\n *\n * @category common/popover\n */\nexport function withCloseOnSuccess(delay = 300): PopoverPanelFeature {\n return (config) => ({ ...config, closeOnSuccessDelay: delay });\n}\n\n/**\n * Set the default variant applied when no `variant` input is set.\n *\n * @category common/popover\n */\nexport function withDefaultVariant(variant: string): PopoverPanelFeature {\n return (config) => ({ ...config, defaultVariant: variant });\n}\n\n/**\n * Show the close button on all panels by default.\n *\n * @category common/popover\n */\nexport function withCloseButton(show = true): PopoverPanelFeature {\n return (config) => ({ ...config, showClose: show });\n}\n\n/**\n * Show the arrow on all panels by default.\n *\n * @category common/popover\n */\nexport function withArrow(show = true): PopoverPanelFeature {\n return (config) => ({ ...config, showArrow: show });\n}\n\n/**\n * Register an app-wide default template for the panel's arrow ornament.\n * The template receives a `CngxPopoverArrowContext` with `edge` and\n * `offsetPx` so the consumer's glyph can match the resolved placement.\n *\n * Per-instance `*cngxPopoverArrow` still wins over this default; the\n * library's rotated-diamond fallback only renders when neither tier is\n * set.\n *\n * ```typescript\n * providers: [\n * providePopoverPanel(withArrowTemplate(brandArrowTpl)),\n * ]\n * ```\n *\n * @category common/popover\n */\nexport function withArrowTemplate(tpl: TemplateRef<CngxPopoverArrowContext>): PopoverPanelFeature {\n return (config) => ({ ...config, templates: { ...config.templates, arrow: tpl } });\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { ArrowEdge } from './popover.types';\n\n/**\n * Context object passed to a `*cngxPopoverArrow` template.\n *\n * The consumer's glyph receives the resolved panel edge (`top` / `bottom` /\n * `left` / `right`) and the inline-axis offset in CSS pixels that the\n * library would have placed the default diamond at. Either can be used to\n * rotate, translate, or theme the custom glyph so it tracks the trigger.\n *\n * @category common/popover\n */\nexport interface CngxPopoverArrowContext {\n /** Primary edge of the panel facing the trigger. */\n readonly edge: ArrowEdge;\n /**\n * Inline-axis offset from the panel edge to the trigger's centre, in\n * CSS pixels. `null` before the first geometry read (the consumer\n * should treat `null` as \"centre the glyph\" - the default diamond\n * falls back to `50%` in the same case).\n */\n readonly offsetPx: number | null;\n}\n\n/**\n * Marks the header content inside `cngx-popover-panel`.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxPopoverBody, CngxPopoverFooter\n */\n@Directive({ selector: '[cngxPopoverHeader]', standalone: true })\nexport class CngxPopoverHeader {}\n\n/**\n * Marks the body content inside `cngx-popover-panel`.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxPopoverHeader, CngxPopoverFooter\n */\n@Directive({ selector: '[cngxPopoverBody]', standalone: true })\nexport class CngxPopoverBody {}\n\n/**\n * Marks the footer content inside `cngx-popover-panel`.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxPopoverHeader, CngxPopoverBody, CngxPopoverAction\n */\n@Directive({ selector: '[cngxPopoverFooter]', standalone: true })\nexport class CngxPopoverFooter {}\n\n/**\n * Custom close button template. Overrides the default close button.\n *\n * ```html\n * <ng-template cngxPopoverClose>\n * <button mat-icon-button (click)=\"panel.popover.hide()\">\n * <mat-icon>close</mat-icon>\n * </button>\n * </ng-template>\n * ```\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel\n */\n@Directive({ selector: 'ng-template[cngxPopoverClose]', standalone: true })\nexport class CngxPopoverClose {\n readonly templateRef = inject(TemplateRef);\n}\n\n/**\n * Template shown while panel content is loading.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxPopoverEmpty, CngxPopoverError\n */\n@Directive({ selector: 'ng-template[cngxPopoverLoading]', standalone: true })\nexport class CngxPopoverLoading {\n readonly templateRef = inject(TemplateRef);\n}\n\n/**\n * Template shown when panel content is empty.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxPopoverLoading, CngxPopoverError\n */\n@Directive({ selector: 'ng-template[cngxPopoverEmpty]', standalone: true })\nexport class CngxPopoverEmpty {\n readonly templateRef = inject(TemplateRef);\n}\n\n/**\n * Template shown when panel content failed to load. Context: `$implicit` = error.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxPopoverLoading, CngxPopoverEmpty\n */\n@Directive({ selector: 'ng-template[cngxPopoverError]', standalone: true })\nexport class CngxPopoverError {\n readonly templateRef = inject(TemplateRef);\n}\n\n/**\n * Custom arrow ornament template. Overrides the default rotated-diamond\n * arrow when projected as a child of `<cngx-popover-panel>`. The library\n * routes the resolved panel edge and the live inline-axis offset to the\n * template via `CngxPopoverArrowContext`.\n *\n * ```html\n * <cngx-popover-panel #pop [showArrow]=\"true\">\n * <ng-template cngxPopoverArrow let-edge=\"edge\" let-offsetPx=\"offsetPx\">\n * <svg class=\"brand-arrow\" [attr.data-edge]=\"edge\"\n * [style.--offset]=\"offsetPx ? offsetPx + 'px' : '50%'\">\n * <use href=\"#arrow-glyph\" />\n * </svg>\n * </ng-template>\n * </cngx-popover-panel>\n * ```\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxPopover\n */\n@Directive({ selector: 'ng-template[cngxPopoverArrow]', standalone: true })\nexport class CngxPopoverArrow {\n readonly templateRef = inject<TemplateRef<CngxPopoverArrowContext>>(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { CngxCloseButton } from '@cngx/common/interactive';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n DestroyRef,\n ElementRef,\n effect,\n inject,\n input,\n untracked,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { CngxAsyncState } from '@cngx/core/utils';\nimport { nextUid } from '@cngx/core/utils';\n\nimport { CNGX_POPOVER_ARROW_BOUNDS, type CngxPopoverArrowBounds } from './popover-arrow-bounds';\nimport { CNGX_POPOVER_PANEL_CONFIG } from './popover-panel.config';\nimport {\n CngxPopoverArrow,\n type CngxPopoverArrowContext,\n CngxPopoverClose,\n CngxPopoverEmpty,\n CngxPopoverError,\n CngxPopoverFooter,\n CngxPopoverHeader,\n CngxPopoverLoading,\n} from './popover-panel-slots';\nimport { CngxPopover } from './popover.directive';\nimport type { PopoverPanelRole } from './popover.types';\n\n/**\n * Rich popover panel molecule with header/body/footer slots, variant\n * styling, arrow, close button, and content state templates.\n *\n * Composes `CngxPopover` via `hostDirectives` - all popover inputs\n * (`placement`, `offset`, `closeOnEscape`, `mode`, `exclusive`,\n * `cngxPopoverOpen`) are forwarded.\n *\n * The `variant` input is a free-form string mapped to a CSS class\n * (`cngx-popover-panel--{variant}`). Five variants are pre-themed\n * in `popover-panel-theme.scss`: `default`, `info`, `warning`,\n * `danger`, `success`. Add custom variants via CSS.\n *\n * ### Basic with header/body/footer\n * ```html\n * <button [cngxPopoverTrigger]=\"panel\" (click)=\"panel.popover.toggle()\">Menu</button>\n * <cngx-popover-panel #panel variant=\"danger\" [showClose]=\"true\" [showArrow]=\"true\">\n * <span cngxPopoverHeader>Delete Item?</span>\n * <p cngxPopoverBody>This action cannot be undone.</p>\n * <div cngxPopoverFooter>\n * <cngx-popover-action role=\"dismiss\">Cancel</cngx-popover-action>\n * <cngx-popover-action role=\"confirm\" [action]=\"delete\" variant=\"danger\">\n * Delete\n * </cngx-popover-action>\n * </div>\n * </cngx-popover-panel>\n * ```\n *\n * ### With loading state\n * ```html\n * <cngx-popover-panel [loading]=\"isLoading()\" [error]=\"loadError()\">\n * <p cngxPopoverBody>Loaded content here</p>\n * <ng-template cngxPopoverLoading>Loading...</ng-template>\n * <ng-template cngxPopoverError let-err>Failed: {{ err }}</ng-template>\n * </cngx-popover-panel>\n * ```\n *\n * @category common/popover\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel.component.ts\n * @since 0.1.0\n * @relatedTo CngxPopover, CngxPopoverAction, CngxPopoverHeader, CngxPopoverBody, CngxPopoverFooter\n * <example-url>http://localhost:4200/#/common/popover/popover-panel/content-states</example-url>\n * <example-url>http://localhost:4200/#/common/popover/popover-panel/variants</example-url>\n * <example-url>http://localhost:4200/#/common/popover/popover-panel/with-footer-actions</example-url>\n */\n@Component({\n selector: 'cngx-popover-panel',\n standalone: true,\n imports: [NgTemplateOutlet, CngxCloseButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'cngxPopoverPanel',\n providers: [{ provide: CNGX_POPOVER_ARROW_BOUNDS, useExisting: CngxPopoverPanel }],\n hostDirectives: [\n {\n directive: CngxPopover,\n inputs: [\n 'placement',\n 'positionTryFallbacks',\n 'offset',\n 'closeOnEscape',\n 'mode',\n 'exclusive',\n 'cngxPopoverOpen',\n ],\n },\n ],\n host: {\n '[class]': 'hostClass()',\n '[attr.role]': 'role()',\n '[attr.aria-labelledby]': 'headerId',\n '[attr.aria-describedby]': 'ariaDescribedBy()',\n '[attr.aria-busy]': 'effectiveLoading() || null',\n },\n template: `\n @if (showArrow()) {\n @if (arrowTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: arrowContext()\" />\n } @else {\n <div class=\"cngx-popover-panel__arrow\"></div>\n }\n }\n\n @if (effectiveLoading()) {\n @if (loadingTpl(); as tpl) {\n <div class=\"cngx-popover-panel__loading\">\n <ng-container *ngTemplateOutlet=\"tpl.templateRef\" />\n </div>\n }\n } @else if (effectiveError(); as err) {\n @if (errorTpl(); as tpl) {\n <div class=\"cngx-popover-panel__error\">\n <ng-container *ngTemplateOutlet=\"tpl.templateRef; context: { $implicit: err }\" />\n </div>\n }\n } @else if (effectiveEmpty()) {\n @if (emptyTpl(); as tpl) {\n <div class=\"cngx-popover-panel__empty\">\n <ng-container *ngTemplateOutlet=\"tpl.templateRef\" />\n </div>\n }\n } @else {\n @if (hasHeader() || showClose()) {\n <div class=\"cngx-popover-panel__header-row\">\n <div class=\"cngx-popover-panel__header\" [id]=\"headerId\">\n <ng-content select=\"[cngxPopoverHeader]\" />\n </div>\n @if (showClose()) {\n @if (closeTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl.templateRef\" />\n } @else {\n <cngx-close-button\n label=\"Close\"\n class=\"cngx-popover-panel__close\"\n (click)=\"popover.hide()\"\n />\n }\n }\n </div>\n }\n <div class=\"cngx-popover-panel__body\" [id]=\"bodyId\">\n <ng-content select=\"[cngxPopoverBody]\" />\n <ng-content />\n </div>\n @if (hasFooter()) {\n <div class=\"cngx-popover-panel__footer\">\n <ng-content select=\"[cngxPopoverFooter]\" />\n </div>\n }\n }\n `,\n styleUrls: ['./popover-panel.component.css'],\n})\nexport class CngxPopoverPanel implements CngxPopoverArrowBounds {\n /** The underlying popover state machine. */\n readonly popover = inject(CngxPopover, { self: true });\n private readonly config = inject(CNGX_POPOVER_PANEL_CONFIG);\n private readonly destroyRef = inject(DestroyRef);\n private readonly hostRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Cached panel border-radius. Read lazily from the host's computed\n * style on first access so `CngxPopover` can consume it via\n * `CNGX_POPOVER_ARROW_BOUNDS` without forcing a layout flush per\n * resize tick. The custom property is declared on `:scope` so the\n * value is valid from instantiation onward.\n */\n private _cachedBorderRadius: number | null = null;\n\n /** @internal - implements `CngxPopoverArrowBounds`. */\n get borderRadius(): number {\n if (this._cachedBorderRadius === null) {\n const raw = getComputedStyle(this.hostRef.nativeElement).getPropertyValue(\n '--cngx-popover-panel-border-radius',\n );\n this._cachedBorderRadius = Number.parseFloat(raw) || 12;\n }\n return this._cachedBorderRadius;\n }\n\n /**\n * Variant string - mapped to CSS class `cngx-popover-panel--{variant}`.\n * Pre-themed: `default`, `info`, `warning`, `danger`, `success`.\n * Add custom variants via CSS.\n */\n readonly variant = input<string | undefined>(undefined);\n\n /**\n * ARIA role applied to the panel host. Defaults to `'dialog'` because\n * the panel pairs `aria-labelledby` (header) with `aria-describedby`\n * (body) - the standard dialog pattern. Override with `'alertdialog'`\n * for irrecoverable confirmations, `'tooltip'` for passive callouts,\n * or `'menu'` when the panel hosts a menu.\n *\n * The trigger's `aria-haspopup` is hinted to `'dialog'` in tandem via\n * the popover's `haspopup` signal; consumers overriding `role` here\n * should also override `haspopup` on the trigger to match.\n */\n readonly role = input<PopoverPanelRole>('dialog');\n\n /** Show a close button. Falls back to global config from `providePopoverPanel(withCloseButton())`. */\n readonly showCloseInput = input<boolean | undefined>(undefined, { alias: 'showClose' });\n\n /** Show an arrow. Falls back to global config from `providePopoverPanel(withArrow())`. */\n readonly showArrowInput = input<boolean | undefined>(undefined, { alias: 'showArrow' });\n\n /** Resolved showClose - input takes precedence over config. */\n readonly showClose = computed(() => this.showCloseInput() ?? this.config.showClose ?? false);\n\n /** Resolved showArrow - input takes precedence over config. */\n readonly showArrow = computed(() => this.showArrowInput() ?? this.config.showArrow ?? false);\n\n /**\n * Bind an async state - drives loading, error, and empty slots from a single source.\n * When set, takes precedence over individual `[loading]`, `[error]`, `[empty]` inputs.\n */\n readonly state = input<CngxAsyncState<unknown> | undefined>(undefined);\n\n /** Whether the panel content is in a loading state. Fallback when `[state]` is not set. */\n readonly loading = input(false);\n\n /** Error value when content loading failed. Fallback when `[state]` is not set. */\n readonly error = input<unknown>(undefined);\n\n /** Whether the panel content is empty. Fallback when `[state]` is not set. */\n readonly empty = input(false);\n\n /** @internal Resolved loading - state takes precedence over boolean input. */\n protected readonly effectiveLoading = computed(\n () => this.state()?.isFirstLoad() ?? this.loading(),\n );\n\n /** @internal Resolved error - state takes precedence over direct input. */\n protected readonly effectiveError = computed(() => this.state()?.error() ?? this.error());\n\n /** @internal Resolved empty - state takes precedence over boolean input. */\n protected readonly effectiveEmpty = computed(() => this.state()?.isEmpty() ?? this.empty());\n\n protected readonly headerSlot = contentChild(CngxPopoverHeader);\n protected readonly footerSlot = contentChild(CngxPopoverFooter);\n protected readonly closeTpl = contentChild(CngxPopoverClose);\n protected readonly loadingTpl = contentChild(CngxPopoverLoading);\n protected readonly emptyTpl = contentChild(CngxPopoverEmpty);\n protected readonly errorTpl = contentChild(CngxPopoverError);\n protected readonly arrowTplDirective = contentChild(CngxPopoverArrow);\n\n /**\n * Three-stage cascade for the arrow ornament:\n * 1. Per-instance `*cngxPopoverArrow` template (contentChild).\n * 2. App-wide `CNGX_POPOVER_PANEL_CONFIG.templates.arrow`\n * (via `providePopoverPanel(withArrowTemplate(...))`).\n * 3. `null` -> the panel renders the default rotated-diamond markup.\n */\n protected readonly arrowTpl = computed(\n () => this.arrowTplDirective()?.templateRef ?? this.config.templates?.arrow ?? null,\n );\n\n /**\n * Context surface for projected `*cngxPopoverArrow` templates.\n * `equal` keeps the reference stable across re-evaluations whose\n * inputs round-trip to the same `{ edge, offsetPx }` - required for\n * any object-returning computed per the Equality discipline rule.\n */\n protected readonly arrowContext = computed<CngxPopoverArrowContext>(\n () => {\n const raw = this.popover.arrowOffset();\n const parsed = raw === null ? null : Number.parseFloat(raw);\n return {\n edge: this.popover.resolvedEdge(),\n offsetPx: parsed !== null && Number.isFinite(parsed) ? parsed : null,\n };\n },\n { equal: (a, b) => a.edge === b.edge && a.offsetPx === b.offsetPx },\n );\n\n /** Auto-detected from projected `[cngxPopoverHeader]` content. */\n protected readonly hasHeader = computed(() => !!this.headerSlot());\n\n /** Auto-detected from projected `[cngxPopoverFooter]` content. */\n protected readonly hasFooter = computed(() => !!this.footerSlot());\n\n private readonly uid = nextUid('cngx-pp');\n protected readonly headerId = `${this.uid}-header`;\n protected readonly bodyId = `${this.uid}-body`;\n\n /** Only point to body when default content is showing (not loading/error/empty). */\n protected readonly ariaDescribedBy = computed(() =>\n this.effectiveLoading() || this.effectiveError() || this.effectiveEmpty() ? null : this.bodyId,\n );\n\n protected readonly hostClass = computed(() => {\n const v = this.variant() ?? this.config.defaultVariant ?? 'default';\n let cls = `cngx-popover-panel cngx-popover-panel--${v}`;\n if (this.showArrow()) {\n cls += ' cngx-popover-panel--arrow';\n }\n return cls;\n });\n\n private autoDismissTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n // Hint any CngxPopoverTrigger pointing at this popover to default\n // `aria-haspopup=\"dialog\"`. Consumer override on the trigger wins.\n this.popover.haspopup.set('dialog');\n\n effect(() => {\n const isVisible = this.popover.isVisible();\n const v = this.variant() ?? untracked(() => this.config.defaultVariant) ?? 'default';\n const timing = untracked(() => this.config.autoDismiss);\n\n if (this.autoDismissTimer) {\n clearTimeout(this.autoDismissTimer);\n this.autoDismissTimer = null;\n }\n if (isVisible && timing?.[v]) {\n this.autoDismissTimer = setTimeout(() => this.popover.hide(), timing[v]);\n } else if (!isVisible && this.autoDismissTimer) {\n clearTimeout(this.autoDismissTimer);\n this.autoDismissTimer = null;\n }\n });\n\n this.destroyRef.onDestroy(() => {\n if (this.autoDismissTimer) {\n clearTimeout(this.autoDismissTimer);\n }\n });\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n contentChild,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n CngxAsyncClick,\n CngxFailed,\n CngxPending,\n CngxSucceeded,\n type AsyncAction,\n} from '@cngx/common/interactive';\n\nimport { CngxPopover } from './popover.directive';\n\n/**\n * Visual variant for the action button.\n *\n * @category common/popover\n */\nexport type PopoverActionVariant = 'primary' | 'secondary' | 'danger' | 'ghost';\n\n/**\n * Action button for use inside `cngx-popover-panel` footer.\n *\n * Two roles:\n * - `'dismiss'` - closes the panel on click (no async action).\n * - `'confirm'` - executes an async action, shows status templates,\n * optionally auto-closes the panel on success.\n *\n * Supports the same `cngxPending`/`cngxSucceeded`/`cngxFailed` templates\n * as `CngxActionButton`, or use `status()` + `@switch` for full control.\n *\n * ### Dismiss button\n * ```html\n * <cngx-popover-action role=\"dismiss\">Cancel</cngx-popover-action>\n * ```\n *\n * ### Confirm with templates\n * ```html\n * <cngx-popover-action role=\"confirm\" [action]=\"save\" variant=\"primary\">\n * Save\n * <ng-template cngxPending>Saving...</ng-template>\n * <ng-template cngxSucceeded>Saved!</ng-template>\n * <ng-template cngxFailed let-err>{{ err }}</ng-template>\n * </cngx-popover-action>\n * ```\n *\n * ### With @switch\n * ```html\n * <cngx-popover-action role=\"confirm\" [action]=\"save\" #act=\"cngxPopoverAction\">\n * @switch (act.status()) {\n * @case ('pending') { Saving... }\n * @case ('success') { Done }\n * @default { Save }\n * }\n * </cngx-popover-action>\n * ```\n *\n * @category common/popover\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-action.component.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxPopoverFooter\n * <example-url>http://localhost:4200/#/common/popover/popover-panel/content-states</example-url>\n * <example-url>http://localhost:4200/#/common/popover/popover-panel/variants</example-url>\n * <example-url>http://localhost:4200/#/common/popover/popover-panel/with-footer-actions</example-url>\n */\n@Component({\n selector: 'cngx-popover-action',\n standalone: true,\n imports: [NgTemplateOutlet, CngxAsyncClick],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'cngxPopoverAction',\n host: { style: 'display: contents' },\n template: `\n <ng-template #idle><ng-content /></ng-template>\n\n @if (role() === 'dismiss') {\n <button\n type=\"button\"\n [class]=\"'cngx-popover-action cngx-popover-action--' + variant()\"\n (click)=\"handleDismiss()\"\n >\n <ng-container *ngTemplateOutlet=\"idle\" />\n </button>\n } @else {\n <button\n type=\"button\"\n [cngxAsyncClick]=\"action()!\"\n #btn=\"cngxAsyncClick\"\n [feedbackDuration]=\"feedbackDuration()\"\n [class]=\"'cngx-popover-action cngx-popover-action--' + variant()\"\n >\n @switch (btn.status()) {\n @case ('pending') {\n @if (pendingTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl.templateRef\" />\n } @else {\n <ng-container *ngTemplateOutlet=\"idle\" />\n }\n }\n @case ('success') {\n @if (succeededTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl.templateRef\" />\n } @else {\n <ng-container *ngTemplateOutlet=\"idle\" />\n }\n }\n @case ('error') {\n @if (failedTpl(); as tpl) {\n <ng-container\n *ngTemplateOutlet=\"tpl.templateRef; context: { $implicit: btn.error() }\"\n />\n } @else {\n <ng-container *ngTemplateOutlet=\"idle\" />\n }\n }\n @default {\n <ng-container *ngTemplateOutlet=\"idle\" />\n }\n }\n </button>\n <span aria-live=\"polite\" aria-atomic=\"true\" class=\"cngx-popover-action__sr-only\">\n {{ btn.announcement() }}\n </span>\n }\n `,\n styleUrls: ['./popover-action.component.css'],\n})\nexport class CngxPopoverAction {\n private readonly popover = inject(CngxPopover, { optional: true });\n\n /** Button role: `'dismiss'` closes immediately, `'confirm'` runs an async action. */\n readonly role = input<'dismiss' | 'confirm'>('confirm');\n\n /** The async action to execute (only for `role=\"confirm\"`). */\n readonly action = input<AsyncAction | undefined>(undefined);\n\n /** Visual variant for the button. */\n readonly variant = input<PopoverActionVariant>('secondary');\n\n /** Duration in ms to show success/error feedback. */\n readonly feedbackDuration = input(2000);\n\n protected readonly pendingTpl = contentChild(CngxPending);\n protected readonly succeededTpl = contentChild(CngxSucceeded);\n protected readonly failedTpl = contentChild(CngxFailed);\n\n protected handleDismiss(): void {\n this.popover?.hide();\n }\n}\n","import { Directive } from '@angular/core';\n\nimport { CngxDivider } from '@cngx/common/display';\n\n/**\n * Separator for use inside `cngx-popover-panel` (or a bare `[cngxPopover]`).\n *\n * Composes `CngxDivider` via `hostDirectives` so the popover-context\n * separator carries proper `role=\"separator\"` + `aria-orientation`\n * semantics without the consumer having to remember the ARIA wiring.\n * The `orientation` and `inset` inputs forward to the underlying\n * `CngxDivider` host directive.\n *\n * Project anywhere inside the panel content - typically between menu\n * item groups (destructive vs non-destructive), between body sections,\n * or between footer action groups.\n *\n * ### Menu item group separator (horizontal)\n * ```html\n * <menu>\n * <li><button (click)=\"pop.hide()\">Edit</button></li>\n * <li><button (click)=\"pop.hide()\">Duplicate</button></li>\n * <li cngxPopoverDivider></li>\n * <li><button (click)=\"pop.hide()\">Delete</button></li>\n * </menu>\n * ```\n *\n * ### Vertical separator between footer action groups\n * ```html\n * <div cngxPopoverFooter>\n * <cngx-popover-action role=\"dismiss\">Cancel</cngx-popover-action>\n * <span cngxPopoverDivider orientation=\"vertical\"></span>\n * <cngx-popover-action role=\"confirm\" [action]=\"save\">Save</cngx-popover-action>\n * </div>\n * ```\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-divider.directive.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxDivider\n */\n@Directive({\n selector: '[cngxPopoverDivider]',\n exportAs: 'cngxPopoverDivider',\n standalone: true,\n hostDirectives: [\n {\n directive: CngxDivider,\n inputs: ['orientation', 'inset'],\n },\n ],\n host: {\n class: 'cngx-popover-divider',\n },\n})\nexport class CngxPopoverDivider {}\n","/**\n * @module @cngx/common/popover\n */\n\n// Atoms\nexport type {\n ArrowEdge,\n PopoverPlacement,\n PopoverPositionTryFallback,\n PopoverState,\n PopoverMode,\n PopoverHaspopup,\n PopoverPanelRole,\n TooltipTriggerMode,\n} from './popover.types';\nexport { CngxPopover } from './popover.directive';\nexport { CngxPopoverTrigger } from './popover-trigger.directive';\nexport { CngxTooltip } from './tooltip.directive';\n\n// Floating UI fallback (opt-in)\nexport {\n CNGX_FLOATING_FALLBACK,\n provideFloatingFallback,\n type ComputePositionFn,\n type FloatingFallbackConfig,\n} from './floating-fallback';\n\n// Panel molecule\nexport type { CngxPopoverPanelConfig, PopoverPanelFeature } from './popover-panel.types';\nexport {\n CNGX_POPOVER_PANEL_CONFIG,\n providePopoverPanel,\n withAutoDismiss,\n withCloseOnSuccess,\n withDefaultVariant,\n withCloseButton,\n withArrow,\n withArrowTemplate,\n} from './popover-panel.config';\nexport { CngxPopoverPanel } from './popover-panel.component';\nexport { CngxPopoverAction, type PopoverActionVariant } from './popover-action.component';\nexport {\n CNGX_POPOVER_ARROW_BOUNDS,\n type CngxPopoverArrowBounds,\n} from './popover-arrow-bounds';\nexport {\n CngxPopoverArrow,\n type CngxPopoverArrowContext,\n CngxPopoverHeader,\n CngxPopoverBody,\n CngxPopoverFooter,\n CngxPopoverClose,\n CngxPopoverLoading,\n CngxPopoverEmpty,\n CngxPopoverError,\n} from './popover-panel-slots';\nexport { CngxPopoverDivider } from './popover-divider.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.CngxPopover","i1"],"mappings":";;;;;;;;;;;;AAEA;;;;;;;AAOG;AACH,SAAS,mBAAmB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EAAA,EAAA,EAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAd9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,cAAc,EAAE;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,WAAW;AACtB,4BAAA,MAAM,EAAE,CAAC,aAAa,EAAE,OAAO,CAAC;AACjC,yBAAA;AACF,qBAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,sBAAsB;AAC9B,qBAAA;AACF,iBAAA;;;ACtDD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"cngx-common-popover.mjs","sources":["../../../projects/common/popover/anchor-positioning.ts","../../../projects/common/popover/popover-arrow-bounds.ts","../../../projects/common/popover/floating-fallback.ts","../../../projects/common/popover/popover.directive.ts","../../../projects/common/popover/popover-trigger.directive.ts","../../../projects/common/popover/tooltip.directive.ts","../../../projects/common/popover/popover-panel.config.ts","../../../projects/common/popover/popover-panel-slots.ts","../../../projects/common/popover/popover-panel.component.ts","../../../projects/common/popover/popover-action.component.ts","../../../projects/common/popover/popover-divider.directive.ts","../../../projects/common/popover/public-api.ts","../../../projects/common/popover/cngx-common-popover.ts"],"sourcesContent":["import type { CngxDirection } from '@cngx/core';\n\nimport type { PopoverPlacement } from './popover.types';\n\n/**\n * @internal\n * Detect CSS Anchor Positioning support.\n *\n * The spec renamed `inset-area` to `position-area` (Chrome 129+, Safari 18.4+).\n * Chrome 125-128 only supports the old `inset-area` name.\n * We detect whichever is available and use it consistently.\n */\nfunction detectAnchorSupport(): { supported: boolean; propertyName: string } {\n if (typeof CSS === 'undefined') {\n return { supported: false, propertyName: 'position-area' };\n }\n if (CSS.supports('position-area', 'bottom')) {\n return { supported: true, propertyName: 'position-area' };\n }\n if (CSS.supports('inset-area', 'bottom')) {\n return { supported: true, propertyName: 'inset-area' };\n }\n return { supported: false, propertyName: 'position-area' };\n}\n\n/** @internal */\nconst ANCHOR_SUPPORT = detectAnchorSupport();\n\n/** @internal `true` when the browser supports CSS Anchor Positioning. */\nexport const SUPPORTS_ANCHOR = ANCHOR_SUPPORT.supported;\n\n/** @internal The CSS property name for anchor area positioning (`position-area` or `inset-area`). */\nexport const ANCHOR_AREA_PROPERTY = ANCHOR_SUPPORT.propertyName;\n\n/**\n * @internal\n * CSS anchor area values mapped from logical placement tokens.\n *\n * Uses physical keywords only - Chrome does not support logical keywords\n * (`start`/`end`/`span-inline-*`) in `position-area` as of Chrome 140.\n *\n * `*-start` and `*-end` resolve to a `<direction> <span-*>` pair, NOT a\n * corner cell (`top right` etc.). Corner-cell values produce diagonal\n * placement relative to the anchor - visually wrong for edge-aligned\n * popovers. The `<direction> <span-*>` form keeps the popover on the\n * named edge while spanning toward the named alignment:\n * `right-start` → `right span-bottom` (right column, anchor's top edge aligned)\n * `right-end` → `right span-top` (right column, anchor's bottom edge aligned)\n * Single-keyword placements (`top`/`bottom`/`left`/`right`) resolve to\n * the edge-centered case (`position-area: right` + default\n * `justify-self: anchor-center`) and need no span keyword.\n */\nexport const POSITION_AREA: Record<PopoverPlacement, string> = {\n top: 'top span-all',\n 'top-start': 'top span-right',\n 'top-end': 'top span-left',\n bottom: 'bottom span-all',\n 'bottom-start': 'bottom span-right',\n 'bottom-end': 'bottom span-left',\n left: 'left span-all',\n 'left-start': 'left span-bottom',\n 'left-end': 'left span-top',\n right: 'right span-all',\n 'right-start': 'right span-bottom',\n 'right-end': 'right span-top',\n};\n\n/**\n * @internal\n * Full physical mirror of every placement token under `rtl`: the left/right\n * side swaps, and a block-placement's inline *alignment* (`-start <-> -end`)\n * swaps too. Feeds the CSS-anchor path only - {@link POSITION_AREA} uses\n * physical keywords with no direction awareness, so the whole mirror must\n * happen in TS. The block edge (`top`/`bottom`) never flips.\n *\n * Total `Record` (identity entries for `top`/`bottom`) so a future placement\n * token fails the exhaustiveness check at compile time rather than silently\n * losing its mirror at runtime - the same guard {@link POSITION_AREA} and\n * `FLOATING_PLACEMENT` already carry.\n */\nconst INLINE_MIRROR: Record<PopoverPlacement, PopoverPlacement> = {\n top: 'top',\n bottom: 'bottom',\n 'top-start': 'top-end',\n 'top-end': 'top-start',\n 'bottom-start': 'bottom-end',\n 'bottom-end': 'bottom-start',\n left: 'right',\n right: 'left',\n 'left-start': 'right-start',\n 'right-start': 'left-start',\n 'left-end': 'right-end',\n 'right-end': 'left-end',\n};\n\n/**\n * @internal\n * Side-only mirror for the floating-ui path under `rtl`: the left/right side\n * swaps (keeping any `-start`/`-end` suffix), but a block-placement's inline\n * alignment is left untouched. `@floating-ui/dom`'s `computePosition` already\n * flips the alignment of vertical placements under `rtl` (its default\n * `platform.isRTL` reads the floating element's `direction`), while keeping\n * the side physical. Pre-flipping the alignment here as well would double-flip\n * `top-start` / `bottom-end` back to their ltr position - so the floating path\n * mirrors the side and defers alignment to floating-ui.\n *\n * Total `Record` for the same compile-time exhaustiveness guard as\n * {@link INLINE_MIRROR}.\n */\nconst FLOATING_MIRROR: Record<PopoverPlacement, PopoverPlacement> = {\n top: 'top',\n bottom: 'bottom',\n 'top-start': 'top-start',\n 'top-end': 'top-end',\n 'bottom-start': 'bottom-start',\n 'bottom-end': 'bottom-end',\n left: 'right',\n right: 'left',\n 'left-start': 'right-start',\n 'right-start': 'left-start',\n 'left-end': 'right-end',\n 'right-end': 'left-end',\n};\n\n/**\n * @internal\n * Resolve a logical placement token for the **CSS-anchor** path against the\n * writing direction: full inline mirror under `rtl`, identity under `ltr`.\n * {@link POSITION_AREA} is keyed by physical placement with no direction\n * awareness, so mirroring the key here - before the lookup - is what places\n * the panel on the direction-forward side.\n *\n * The block axis never flips: `top`/`bottom` (no inline component) are the\n * identity, and `top-start`/`bottom-start` mirror only their inline\n * *alignment* (`-start <-> -end`), not the block edge. Same inline-only rule\n * the keyboard direction-awareness applies (`resolveInlineStep`).\n *\n * NOTE: the floating-ui path must NOT use this - floating-ui flips vertical\n * alignment itself under `rtl`. Use {@link resolveFloatingPlacement} there.\n *\n * Pure, O(1) lookup - a mechanical kernel, not a DI chokepoint; each surface\n * injects its own direction and calls this at its CSS-anchor placement source.\n *\n * @param placement The logical placement token the consumer requested.\n * @param direction The document writing direction from `injectDirection`.\n * @returns The fully inline-mirrored token under `rtl`, else `placement`.\n */\nexport function resolveDirectionalPlacement(\n placement: PopoverPlacement,\n direction: CngxDirection,\n): PopoverPlacement {\n if (direction !== 'rtl') {\n return placement;\n }\n return INLINE_MIRROR[placement];\n}\n\n/**\n * @internal\n * Resolve a logical placement token for the **floating-ui fallback** path\n * against the writing direction: side-only mirror under `rtl`, identity under\n * `ltr`. `@floating-ui/dom` already flips the inline alignment of vertical\n * placements under `rtl`, so this mirrors the side (`left <-> right`, suffix\n * preserved) and leaves the alignment for floating-ui - avoiding the\n * double-flip that a full mirror would cause on `top-start` / `bottom-end`.\n *\n * @param placement The logical placement token the consumer requested.\n * @param direction The document writing direction from `injectDirection`.\n * @returns The side-mirrored token under `rtl`, else `placement`.\n */\nexport function resolveFloatingPlacement(\n placement: PopoverPlacement,\n direction: CngxDirection,\n): PopoverPlacement {\n if (direction !== 'rtl') {\n return placement;\n }\n return FLOATING_MIRROR[placement];\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\n * Geometry contract for the popover panel's arrow ornament.\n *\n * Provided by `CngxPopoverPanel` (via `useExisting`) so that `CngxPopover`\n * can read panel-side layout constants - primarily the border-radius\n * used to clamp the arrow inside the panel's rounded corners - through a\n * typed contract rather than reaching into the panel's CSS custom\n * properties directly. Inverts the atom -> molecule dependency direction\n * that an earlier `getComputedStyle('--cngx-popover-panel-border-radius')`\n * read had introduced on `CngxPopover`.\n *\n * `CngxPopover` injects the token with `{ optional: true }` so it keeps\n * working when used outside a `CngxPopoverPanel` (e.g. bare `[cngxPopover]`\n * on a `<div>`). The fallback value matches the panel's default\n * border-radius initial value (12 px).\n *\n * @category common/popover\n */\nexport interface CngxPopoverArrowBounds {\n /**\n * Panel border-radius in CSS pixels. Used by `CngxPopover` to clamp\n * the arrow offset inside the panel's rounded-corner extent.\n */\n readonly borderRadius: number;\n}\n\n/**\n * Injection token for the arrow-bounds contract.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-arrow-bounds.ts\n * @since 0.1.0\n */\nexport const CNGX_POPOVER_ARROW_BOUNDS = new InjectionToken<CngxPopoverArrowBounds>(\n 'CngxPopoverArrowBounds',\n);\n","import { InjectionToken, type Provider } from '@angular/core';\n\nimport type { PopoverPlacement } from './popover.types';\n\n/**\n * Signature matching `@floating-ui/dom` `computePosition`.\n * The consumer provides the actual function - the library never imports it directly.\n *\n * @category common/popover\n */\nexport type ComputePositionFn = (\n reference: HTMLElement,\n floating: HTMLElement,\n options?: {\n placement?: string;\n middleware?: unknown[];\n },\n) => Promise<{ x: number; y: number; placement: string }>;\n\n/**\n * Configuration for the Floating UI positioning fallback.\n *\n * @category common/popover\n */\nexport interface FloatingFallbackConfig {\n /** The `computePosition` function from `@floating-ui/dom`. */\n computePosition: ComputePositionFn;\n /** Middleware array (e.g. `[offset(8), flip(), shift()]`). */\n middleware?: unknown[];\n}\n\n/**\n * Injection token for the Floating UI fallback.\n * `null` when not provided - CSS Anchor Positioning is used instead.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/floating-fallback.ts\n * @since 0.1.0\n */\nexport const CNGX_FLOATING_FALLBACK = new InjectionToken<FloatingFallbackConfig | null>(\n 'CngxFloatingFallback',\n { factory: () => null },\n);\n\n/**\n * Provides the Floating UI positioning fallback for browsers without\n * CSS Anchor Positioning support.\n *\n * The consumer must install `@floating-ui/dom` themselves - this library\n * never imports it directly, keeping the bundle at zero cost for modern browsers.\n *\n * ```typescript\n * import { computePosition, flip, offset, shift } from '@floating-ui/dom';\n *\n * // In app.config.ts or component providers:\n * providers: [\n * provideFloatingFallback(computePosition, [offset(8), flip(), shift()]),\n * ]\n * ```\n *\n * @category common/popover\n */\nexport function provideFloatingFallback(\n computePosition: ComputePositionFn,\n middleware?: unknown[],\n): Provider {\n return {\n provide: CNGX_FLOATING_FALLBACK,\n useValue: { computePosition, middleware } satisfies FloatingFallbackConfig,\n };\n}\n\n/**\n * @internal\n * Inputs for {@link createFloatingPositioner}. All element/config reads are\n * thunks so the positioner always sees the live value - placement and offset\n * are signal-backed on both call sites.\n */\nexport interface FloatingPositionerOptions {\n /** The consumer-provided fallback config from `CNGX_FLOATING_FALLBACK`. */\n fallback: FloatingFallbackConfig;\n /** Anchor (trigger) element. `null` skips the positioning pass. */\n getAnchor: () => HTMLElement | null;\n /** The floating element. `null` skips the positioning pass. */\n getElement: () => HTMLElement | null;\n /** Resolved Floating UI placement string (a `FLOATING_PLACEMENT` value). */\n getPlacement: () => string;\n /** Gap between anchor and floating element in px. */\n getOffset: () => number;\n /** Open guard - closes drop queued listener re-runs and in-flight writes. */\n isOpen: () => boolean;\n /** Invoked after every applied coordinate write. */\n onPositioned?: () => void;\n}\n\n/** @internal Handle returned by {@link createFloatingPositioner}. */\nexport interface FloatingPositioner {\n /** One positioning pass (no-op unless open with anchor + element). */\n update(): void;\n /** Position now and re-run on scroll/resize until {@link stop}. */\n start(): void;\n /** Detach the scroll/resize listeners. Idempotent. */\n stop(): void;\n}\n\n/**\n * @internal\n * Offset expressed as a Floating UI middleware literal instead of a margin\n * write: margin pushes the panel along BOTH axes and is invisible to the\n * consumer's flip/shift middleware, so collision recovery would compute\n * against the un-offset rect. Runs first in the chain for the same reason\n * `offset()` must in `@floating-ui/dom`.\n */\nfunction makeOffsetMiddleware(offsetPx: number): unknown {\n return {\n name: 'cngxOffset',\n fn: (state: { x: number; y: number; placement: string }): { x?: number; y?: number } => {\n const side = state.placement.split('-')[0];\n if (side === 'top') {\n return { y: state.y - offsetPx };\n }\n if (side === 'bottom') {\n return { y: state.y + offsetPx };\n }\n if (side === 'left') {\n return { x: state.x - offsetPx };\n }\n if (side === 'right') {\n return { x: state.x + offsetPx };\n }\n return {};\n },\n };\n}\n\n/**\n * @internal\n * The one floating-ui fallback engine shared by `CngxPopover` and\n * `CngxTooltip`. Owns the three concerns the per-directive copies each\n * half-implemented: the offset (as middleware, see above), the re-run on\n * scroll/resize while open (CSS Anchor tracks the anchor natively; the\n * fallback must do it by hand), and the state guard on the async\n * `computePosition` write (a close during the in-flight promise must not\n * resurrect stale coordinates).\n */\nexport function createFloatingPositioner(options: FloatingPositionerOptions): FloatingPositioner {\n let listening = false;\n let listenerDoc: Document | null = null;\n\n const update = (): void => {\n const anchor = options.getAnchor();\n const el = options.getElement();\n if (!anchor || !el || !options.isOpen()) {\n return;\n }\n const fb = options.fallback;\n const middleware = [makeOffsetMiddleware(options.getOffset()), ...(fb.middleware ?? [])];\n void fb\n .computePosition(anchor, el, { placement: options.getPlacement(), middleware })\n .then(({ x, y }) => {\n if (!options.isOpen()) {\n return;\n }\n const target = options.getElement();\n if (!target) {\n return;\n }\n target.style.left = `${x}px`;\n target.style.top = `${y}px`;\n options.onPositioned?.();\n });\n };\n\n const handleReposition = (): void => update();\n\n return {\n update,\n start(): void {\n update();\n if (listening) {\n return;\n }\n const doc = options.getElement()?.ownerDocument ?? null;\n const view = doc?.defaultView ?? null;\n if (!doc || !view) {\n return;\n }\n // Capture phase: scroll events from inner scroll containers do not\n // bubble, but they do traverse the capture path.\n doc.addEventListener('scroll', handleReposition, true);\n view.addEventListener('resize', handleReposition);\n listenerDoc = doc;\n listening = true;\n },\n stop(): void {\n if (!listening) {\n return;\n }\n listenerDoc?.removeEventListener('scroll', handleReposition, true);\n listenerDoc?.defaultView?.removeEventListener('resize', handleReposition);\n listenerDoc = null;\n listening = false;\n },\n };\n}\n\n/** @internal Maps cngx placement tokens to Floating UI placement strings. */\nexport const FLOATING_PLACEMENT: Record<PopoverPlacement, string> = {\n top: 'top',\n 'top-start': 'top-start',\n 'top-end': 'top-end',\n bottom: 'bottom',\n 'bottom-start': 'bottom-start',\n 'bottom-end': 'bottom-end',\n left: 'left',\n 'left-start': 'left-start',\n 'left-end': 'left-end',\n right: 'right',\n 'right-start': 'right-start',\n 'right-end': 'right-end',\n};\n","import { DOCUMENT } from '@angular/common';\nimport {\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n isDevMode,\n signal,\n untracked,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { fromEvent } from 'rxjs';\n\nimport { injectDirection } from '@cngx/core';\nimport { hasTransition, nextUid, onTransitionDone } from '@cngx/core/utils';\n\nimport {\n ANCHOR_AREA_PROPERTY,\n POSITION_AREA,\n resolveDirectionalPlacement,\n resolveFloatingPlacement,\n SUPPORTS_ANCHOR,\n} from './anchor-positioning';\nimport { CNGX_POPOVER_ARROW_BOUNDS, type CngxPopoverArrowBounds } from './popover-arrow-bounds';\nimport {\n CNGX_FLOATING_FALLBACK,\n createFloatingPositioner,\n FLOATING_PLACEMENT,\n} from './floating-fallback';\nimport type {\n ArrowEdge,\n PopoverHaspopup,\n PopoverMode,\n PopoverPlacement,\n PopoverPositionTryFallback,\n PopoverState,\n} from './popover.types';\n\n/**\n * @internal Module-level registry of open popovers (insertion-ordered).\n */\nconst openPopovers = new Set<CngxPopover>();\n\n/**\n * @internal\n * Derive the panel's actual placement relative to the trigger from the live\n * rects. The arrow always sits on the panel edge that *faces* the trigger,\n * so a `position-try-fallbacks` flip (e.g. requested `bottom`, browser\n * resolved to `top` because there is no room below) routes the arrow to the\n * opposite edge without the consumer touching anything.\n *\n * Returns the requested placement's primary edge when the rects overlap -\n * the only case where no clean side is geometrically correct.\n */\nfunction resolveActualEdge(\n trigger: DOMRect,\n panel: DOMRect,\n requested: PopoverPlacement,\n): ArrowEdge {\n const tolerance = 4;\n if (panel.top >= trigger.bottom - tolerance) {\n return 'bottom';\n }\n if (panel.bottom <= trigger.top + tolerance) {\n return 'top';\n }\n if (panel.right <= trigger.left + tolerance) {\n return 'left';\n }\n if (panel.left >= trigger.right - tolerance) {\n return 'right';\n }\n return requested.split('-')[0] as ArrowEdge;\n}\n\n/** @internal Tracks which Documents already have the global Escape listener. */\nconst escapeListenerDocs = new WeakSet<Document>();\n/** @internal */\nfunction installGlobalEscapeListener(doc: Document): void {\n if (escapeListenerDocs.has(doc)) {\n return;\n }\n escapeListenerDocs.add(doc);\n doc.addEventListener('keydown', (e: KeyboardEvent) => {\n if (e.key !== 'Escape' || openPopovers.size === 0) {\n return;\n }\n // most-recently-opened wins (relies on Set's insertion-order iteration)\n const last = [...openPopovers].at(-1);\n if (last?.closeOnEscape()) {\n e.stopPropagation();\n last.hide();\n }\n });\n}\n\n/** @internal Tracks which Documents already have the global outside-click listener. */\nconst outsideClickListenerDocs = new WeakSet<Document>();\n/** @internal */\nfunction installGlobalOutsideClickListener(doc: Document): void {\n if (outsideClickListenerDocs.has(doc)) {\n return;\n }\n outsideClickListenerDocs.add(doc);\n // Capture phase so the dismiss decision runs before in-popover handlers can\n // stopPropagation. Snapshot the set: hide() mutates `openPopovers` mid-loop.\n doc.addEventListener(\n 'pointerdown',\n (e: PointerEvent) => {\n if (openPopovers.size === 0) {\n return;\n }\n for (const popover of [...openPopovers]) {\n popover.closeIfOutsidePointerDown(e.target);\n }\n },\n true,\n );\n}\n\n/** @internal Tracks which Documents have already warned about missing Popover API. */\nconst popoverApiWarnedDocs = new WeakSet<Document>();\n/** @internal */\nfunction warnMissingPopoverApi(el: HTMLElement): void {\n const doc = el.ownerDocument;\n if (popoverApiWarnedDocs.has(doc) || !isDevMode()) {\n return;\n }\n if (typeof el.showPopover !== 'function') {\n popoverApiWarnedDocs.add(doc);\n console.warn(\n 'CngxPopover: The native Popover API is not supported in this browser. ' +\n 'Install @oddbird/popover-polyfill and import it in your polyfills:\\n\\n' +\n ' npm install @oddbird/popover-polyfill\\n' +\n ' // polyfills.ts\\n' +\n \" import '@oddbird/popover-polyfill';\\n\",\n );\n }\n}\n\n/** @internal Tracks which Documents have already warned about missing Floating-UI middleware. */\nconst floatingMiddlewareWarnedDocs = new WeakSet<Document>();\n\n/**\n * @internal - test hook. Resets the per-Document warning suppression so\n * specs can exercise the warning path against a shared jsdom Document.\n * Do not call from production code.\n */\nexport function __resetFloatingMiddlewareWarnings(doc: Document): void {\n floatingMiddlewareWarnedDocs.delete(doc);\n}\n/** @internal */\nfunction warnMissingFloatingMiddleware(doc: Document): void {\n if (floatingMiddlewareWarnedDocs.has(doc) || !isDevMode()) {\n return;\n }\n floatingMiddlewareWarnedDocs.add(doc);\n console.warn(\n 'CngxPopover: provideFloatingFallback(computePosition) was registered without middleware. ' +\n 'Popovers in browsers without CSS Anchor Positioning will clip against the viewport edge ' +\n 'because no flip/shift recovery is configured. Pass middleware on registration:\\n\\n' +\n \" import { computePosition, flip, offset, shift } from '@floating-ui/dom';\\n\\n\" +\n ' providers: [\\n' +\n ' provideFloatingFallback(computePosition, [offset(8), flip(), shift()]),\\n' +\n ' ],\\n',\n );\n}\n\n/**\n * Signal-driven state machine for the native Popover API.\n *\n * Wraps the browser's `popover` attribute with reactive state,\n * CSS-transition-aware lifecycle, and CSS Anchor Positioning.\n * Pure state machine - contains no trigger logic, no delays.\n *\n * State lifecycle: `closed` → `opening` → `open` → `closing` → `closed`.\n * CSS classes `cngx-popover--opening`, `cngx-popover--open`, and\n * `cngx-popover--closing` are applied to the host for transition hooks.\n *\n * ### Declarative click popover\n * ```html\n * <button [cngxPopoverTrigger]=\"pop\" (click)=\"pop.toggle()\">Menu</button>\n * <div cngxPopover #pop=\"cngxPopover\" placement=\"bottom-start\">\n * <menu><li>Edit</li><li>Delete</li></menu>\n * </div>\n * ```\n *\n * ### Controlled open state\n * ```html\n * <div cngxPopover [cngxPopoverOpen]=\"showErrors()\" role=\"alert\">\n * {{ errorSummary() }}\n * </div>\n * ```\n * <example-url>http://localhost:4200/#/common/interactive/listbox/trigger/select-dropdown</example-url>\n * <example-url>http://localhost:4200/#/common/popover/click-popover</example-url>\n * <example-url>http://localhost:4200/#/common/popover/controlled-open</example-url>\n * <example-url>http://localhost:4200/#/common/popover/escape-mode</example-url>\n * <example-url>http://localhost:4200/#/common/popover/placement-variants</example-url>\n *\n * ### Collision recovery with `<try-tactic>` fallbacks\n * Apply CSS Anchor Positioning's `position-try-fallbacks` declaratively\n * by binding the new `positionTryFallbacks` input. Each entry is a CSS\n * `<try-tactic>` keyword (or composed pair) written verbatim into the\n * host's `position-try-fallbacks` property. Mirrors the precedent in\n * `@cngx/forms/select` panels.\n *\n * ```html\n * <div cngxPopover\n * placement=\"right-start\"\n * [positionTryFallbacks]=\"['flip-inline', 'flip-block', 'flip-block flip-inline']\">\n * <!-- popover content -->\n * </div>\n * ```\n *\n * When the array is empty (default), the host does not write a\n * `position-try-fallbacks` style - the browser positions the popover at\n * the declared `placement` regardless of viewport clipping.\n *\n * @category common/popover\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover.directive.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverTrigger, CngxPopoverPanel, CngxTooltip\n */\n@Directive({\n selector: '[cngxPopover]',\n exportAs: 'cngxPopover',\n standalone: true,\n host: {\n '[attr.popover]': 'mode()',\n '[id]': 'id()',\n '[attr.aria-hidden]': '!isVisible()',\n '[attr.data-arrow-placement]': 'resolvedEdge()',\n '[class.cngx-popover--opening]': 'isOpening()',\n '[class.cngx-popover--open]': 'isOpen()',\n '[class.cngx-popover--closing]': 'isClosing()',\n '[style.position-anchor]': 'cssAnchorRef()',\n '[style.position-try-fallbacks]': 'cssPositionTryFallbacks()',\n '[style.margin]': 'cssMargin()',\n '[style.--cngx-popover-arrow-offset]': 'arrowOffset()',\n '(toggle)': 'handleToggle($event)',\n },\n})\nexport class CngxPopover {\n /**\n * Host ElementRef. Public for consumers that need to pass the\n * popover's native element to APIs expecting an `ElementRef`\n * (scroll observers, intersection observers, focus managers, …).\n * Notable consumer: `injectRecycler({ scrollElement: pop.elementRef })`\n * for `@cngx/forms/select` virtualisation - the popover IS the\n * scroll container when `select-base.css`'s `max-height + overflow-y`\n * rules apply.\n */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly elRef = this.elementRef;\n private readonly destroyRef = inject(DestroyRef);\n private readonly doc = inject(DOCUMENT);\n private readonly floatingFallback = inject(CNGX_FLOATING_FALLBACK, { optional: true });\n private readonly _injector = inject(Injector);\n private readonly direction = injectDirection();\n /**\n * Arrow-bounds contract resolved lazily on first use.\n * Eager inject() would loop: CngxPopover (host directive on the panel)\n * is constructed BEFORE the panel itself, so `useExisting: CngxPopoverPanel`\n * cannot resolve at directive-construction time.\n */\n private _arrowBounds: CngxPopoverArrowBounds | null | undefined = undefined;\n private getArrowBounds(): CngxPopoverArrowBounds | null {\n if (this._arrowBounds === undefined) {\n this._arrowBounds = this._injector.get(CNGX_POPOVER_ARROW_BOUNDS, null);\n }\n return this._arrowBounds;\n }\n\n /** Anchor-relative placement. */\n readonly placement = input<PopoverPlacement>('bottom');\n\n /**\n * CSS `<try-tactic>` fallbacks for `position-try-fallbacks`. Empty\n * array (default) means the host does not write the property at all.\n * Non-empty entries are written verbatim, comma-joined, in declaration\n * order. Spec-compatible vocabulary only (no cngx placement tokens).\n */\n readonly positionTryFallbacks = input<readonly PopoverPositionTryFallback[]>([]);\n\n /** Gap between anchor and popover in px. */\n readonly offset = input(8);\n\n /** Whether Escape key dismisses the popover. */\n readonly closeOnEscape = input(true);\n\n /**\n * Whether a `pointerdown` outside both the popover and its anchor (trigger)\n * dismisses it - menu / listbox light-dismiss. Opt-in (default `false`) so\n * existing manual-mode popovers keep full control; the anchor is excluded so\n * a click on the trigger toggles via the trigger's own handler instead of\n * being closed here and immediately reopened.\n */\n readonly closeOnOutsideClick = input(false);\n\n /** Native popover mode. `'manual'` for full control, `'auto'` for browser light dismiss. */\n readonly mode = input<PopoverMode>('manual');\n\n /**\n * Controlled open state. When set, drives the popover reactively.\n * `undefined` = uncontrolled (default).\n */\n readonly controlledOpen = input<boolean | undefined>(undefined, {\n alias: 'cngxPopoverOpen',\n });\n\n /**\n * When `true` (default), opening this popover closes any other open\n * `CngxPopover` instance. Set to `false` to allow multiple popovers\n * open simultaneously.\n *\n * Exclusivity governs sibling popovers only: a popover nested inside\n * another open popover (a select panel or submenu opening within a\n * popover-hosted surface) is that container's child, not a rival, and\n * never evicts its ancestor.\n */\n readonly exclusive = input(true);\n\n /**\n * @internal\n * Programmatic override of {@link exclusive}. `null` (default) defers to the\n * `[exclusive]` input; a boolean wins over it. Lets a composing organism\n * (e.g. a submenu wiring in `@cngx/ui/context-menu`) open a nested panel\n * non-exclusively without a consumer-side `[exclusive]=\"false\"` handgrip.\n * Controlled+uncontrolled derivation: {@link effectiveExclusive} resolves\n * the override first, then the input.\n */\n readonly exclusiveOverride = signal<boolean | null>(null);\n\n /** Effective exclusivity - override wins, else the `[exclusive]` input. */\n private readonly effectiveExclusive = computed<boolean>(\n () => this.exclusiveOverride() ?? this.exclusive(),\n );\n\n /**\n * @internal\n * Programmatic override of {@link placement}. `null` (default) defers to the\n * `[placement]` input; a value wins over it. Lets a composing organism (the\n * submenu wiring in `@cngx/ui/context-menu`) flank a nested panel to the\n * inline-end without a consumer-side `[placement]` handgrip. Mirrors\n * {@link exclusiveOverride}; {@link effectivePlacement} resolves the override\n * first, then the input.\n */\n readonly placementOverride = signal<PopoverPlacement | null>(null);\n\n /**\n * Effective placement for the CSS-anchor path - override wins, else the\n * `[placement]` input, then fully mirrored against the ambient writing\n * direction. Feeds the `POSITION_AREA` write, the token-split arrow edge,\n * and `resolveActualEdge`: `POSITION_AREA` uses physical keywords with no\n * direction awareness, so the whole mirror happens here. A submenu that\n * flanks inline-end under `ltr` flanks the physically-opposite side under\n * `rtl`, matching the shipped keyboard direction-awareness.\n */\n private readonly effectivePlacement = computed<PopoverPlacement>(() =>\n resolveDirectionalPlacement(this.placementOverride() ?? this.placement(), this.direction()),\n );\n\n /**\n * Effective placement for the floating-ui fallback path - the same source\n * as {@link effectivePlacement} but mirrored side-only. `@floating-ui/dom`\n * flips the inline alignment of vertical placements under `rtl` itself, so\n * feeding it the fully-mirrored token would double-flip `top-start` /\n * `bottom-end`. This path mirrors the side and defers alignment to\n * floating-ui.\n */\n private readonly floatingPlacement = computed<PopoverPlacement>(() =>\n resolveFloatingPlacement(this.placementOverride() ?? this.placement(), this.direction()),\n );\n\n /**\n * @internal\n * Programmatic override of {@link positionTryFallbacks}, paired with\n * {@link placementOverride} so a submenu wiring installs the flip chain too.\n * `null` (default) defers to the `[positionTryFallbacks]` input.\n */\n readonly positionTryFallbacksOverride = signal<readonly PopoverPositionTryFallback[] | null>(\n null,\n );\n\n /** Effective try-fallbacks - override wins, else the `[positionTryFallbacks]` input. */\n private readonly effectivePositionTryFallbacks = computed<readonly PopoverPositionTryFallback[]>(\n () => this.positionTryFallbacksOverride() ?? this.positionTryFallbacks(),\n );\n\n private readonly stateSignal = signal<PopoverState>('closed');\n private readonly idSignal = signal(nextUid('cngx-popover'));\n\n /** Current lifecycle state. */\n readonly state = this.stateSignal.asReadonly();\n\n /** Unique auto-generated ID for this popover instance. */\n readonly id = this.idSignal.asReadonly();\n\n /**\n * The anchor element for Floating UI fallback positioning.\n * Set by `CngxPopoverTrigger` or `CngxTooltip`.\n */\n readonly anchorElement = signal<HTMLElement | null>(null);\n\n /**\n * Inline-axis position the arrow ornament should sit at, expressed as\n * a CSS length pinned to the trigger's centre. Computed from\n * `anchorElement()` + the panel's own bounding box on every show /\n * reposition / window resize.\n *\n * Why a JS-computed CSS variable instead of `anchor(center)` in the\n * arrow's stylesheet: CSS Anchor Positioning's `anchor()` function does\n * not resolve from descendants of a top-layer element back to anchors\n * in the regular document flow. The panel itself can anchor to the\n * trigger, but the arrow inside the panel cannot. Writing the offset\n * from JS sidesteps that limitation and works identically in the\n * CSS-Anchor path and the Floating-UI fallback path.\n */\n private readonly _arrowOffset = signal<string | null>(null);\n\n /**\n * Public read-only view of the arrow's inline-axis offset (`<px>` or\n * `null` before the first geometry read). Consumers projecting a\n * `cngxPopoverArrow` template use this to render their own glyph at\n * the same coordinate the default arrow ornament would.\n */\n readonly arrowOffset = this._arrowOffset.asReadonly();\n\n /**\n * Hint for the `CngxPopoverTrigger`'s `aria-haspopup` value. Composers\n * such as `CngxPopoverPanel` write this signal so any trigger pointing\n * at the popover defaults to the right role without the consumer\n * having to set `haspopup` on every trigger element. Consumer-supplied\n * `haspopup` on the trigger still wins.\n */\n readonly haspopup = signal<PopoverHaspopup | undefined>(undefined);\n\n protected readonly isOpening = computed(() => this.stateSignal() === 'opening');\n protected readonly isOpen = computed(() => this.stateSignal() === 'open');\n protected readonly isClosing = computed(() => this.stateSignal() === 'closing');\n readonly isVisible = computed(() => this.stateSignal() !== 'closed');\n\n protected readonly cssAnchorRef = computed(() =>\n SUPPORTS_ANCHOR ? `--cngx-pop-${this.idSignal()}` : null,\n );\n\n /**\n * Primary edge of the placement, written from the live trigger and panel\n * rects so the arrow lands on the side that actually faces the trigger.\n * Falls back to the requested placement's edge before the first geometry\n * read so the arrow CSS rules still match on the very first paint.\n * Browsers normalise compound `position-area` values to a\n * non-deterministic keyword order; an explicit attribute is the stable\n * hook for the arrow stylesheet.\n */\n private readonly resolvedEdgeSignal = signal<ArrowEdge | null>(null);\n\n /**\n * Primary edge of the panel facing the trigger after browser-driven\n * shift / flip recovery. `top` | `bottom` | `left` | `right`. Public\n * so consumers projecting a `cngxPopoverArrow` template can rotate\n * their own glyph to match the rendered placement.\n */\n readonly resolvedEdge = computed<ArrowEdge>(\n () => this.resolvedEdgeSignal() ?? (this.effectivePlacement().split('-')[0] as ArrowEdge),\n );\n\n protected readonly cssMargin = computed(() => (SUPPORTS_ANCHOR ? `${this.offset()}px` : null));\n\n /**\n * Comma-joined `position-try-fallbacks` value, or `null` to skip the\n * style write. Bound via host binding so empty / cleared lists drop the\n * property cleanly. Unsupported browsers ignore the unknown property -\n * gating on `SUPPORTS_ANCHOR` would only suppress a harmless write.\n */\n protected readonly cssPositionTryFallbacks = computed(() => {\n const list = this.effectivePositionTryFallbacks();\n return list.length > 0 ? list.join(', ') : null;\n });\n\n constructor() {\n // Host binding needs a static property name; position-area/inset-area name flips per browser.\n if (SUPPORTS_ANCHOR) {\n effect(() => {\n this.elRef.nativeElement.style.setProperty(\n ANCHOR_AREA_PROPERTY,\n POSITION_AREA[this.effectivePlacement()],\n );\n });\n }\n effect(() => {\n const desired = this.controlledOpen();\n if (desired === undefined) {\n return;\n }\n const current = untracked(() => this.stateSignal());\n if (desired && current === 'closed') {\n this.show();\n }\n if (!desired && (current === 'open' || current === 'opening')) {\n this.hide();\n }\n });\n\n this.destroyRef.onDestroy(() => {\n if (this.stateSignal() !== 'closed') {\n this.finalize();\n }\n });\n\n // Recompute arrow offset on viewport resize while the popover is open.\n // takeUntilDestroyed handles teardown so finalize() does not need an\n // explicit removeEventListener pair.\n const view = this.doc.defaultView;\n if (view) {\n fromEvent(view, 'resize')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n if (this.stateSignal() !== 'closed') {\n this.updateArrowOffset();\n }\n });\n }\n }\n\n /** Open the popover. No-op if not `closed`. */\n show(): void {\n warnMissingPopoverApi(this.elRef.nativeElement);\n if (this.stateSignal() !== 'closed') {\n return;\n }\n if (this.effectiveExclusive()) {\n // Snapshot the set: hide() mutates `openPopovers` mid-loop. An ancestor\n // is this popover's container, not a rival - hiding it would take this\n // panel down with it (the ancestor's display: none cascades).\n for (const other of [...openPopovers]) {\n if (other !== this && !other.elRef.nativeElement.contains(this.elRef.nativeElement)) {\n other.hide();\n }\n }\n }\n openPopovers.add(this);\n this.stateSignal.set('opening');\n this.elRef.nativeElement.showPopover();\n installGlobalEscapeListener(this.doc);\n installGlobalOutsideClickListener(this.doc);\n this.applyFloatingPosition();\n requestAnimationFrame(() => {\n if (this.stateSignal() === 'opening') {\n this.stateSignal.set('open');\n }\n // After layout settles the browser's anchor / shift recovery has\n // already placed the panel; reading its rect now reflects the\n // final position the arrow needs to point at. The panel-side\n // border-radius arrives through CNGX_POPOVER_ARROW_BOUNDS - no\n // getComputedStyle read on this directive's side.\n this.updateArrowOffset();\n });\n }\n\n /** Close the popover. No-op if already `closed` or `closing`. */\n hide(): void {\n if (this.stateSignal() === 'closed' || this.stateSignal() === 'closing') {\n return;\n }\n this.startClosing();\n }\n\n /** Toggle between open and closed. */\n toggle(): void {\n if (this.stateSignal() === 'closed') {\n this.show();\n } else {\n this.hide();\n }\n }\n\n protected handleToggle(e: ToggleEvent): void {\n // Sync with browser when it closes the popover (e.g. popover=\"auto\" light\n // dismiss). Must run the full finalize() teardown, not just the state\n // write: a bare state sync leaves the instance in the module registry,\n // where it swallows the next Escape and leaks past destroy.\n if (e.newState === 'closed' && this.stateSignal() !== 'closed') {\n this.finalize();\n }\n }\n\n /**\n * @internal Called by the global outside-click listener for every open\n * popover. Hides this one when it opted into `closeOnOutsideClick` and the\n * pointerdown landed outside both its panel and its anchor (trigger).\n */\n closeIfOutsidePointerDown(target: EventTarget | null): void {\n if (!this.closeOnOutsideClick()) {\n return;\n }\n const node = target as Node | null;\n const panel = this.popoverElement;\n const anchor = this.anchorElement();\n if (panel.contains(node) || anchor?.contains(node)) {\n return;\n }\n this.hide();\n }\n\n /**\n * Shared fallback engine - offset middleware, scroll/resize re-run while\n * open, state-guarded writes. `null` when no fallback is provided.\n */\n private readonly floatingPositioner = this.floatingFallback\n ? createFloatingPositioner({\n fallback: this.floatingFallback,\n getAnchor: () => this.anchorElement(),\n getElement: () => this.popoverElement,\n getPlacement: () => FLOATING_PLACEMENT[this.floatingPlacement()],\n getOffset: () => this.offset(),\n isOpen: () => this.stateSignal() !== 'closed',\n onPositioned: () => this.updateArrowOffset(),\n })\n : null;\n\n /**\n * Apply Floating UI positioning when CSS Anchor is not supported\n * and the consumer has provided the fallback via `provideFloatingFallback()`.\n */\n private applyFloatingPosition(): void {\n if (SUPPORTS_ANCHOR || !this.floatingPositioner) {\n return;\n }\n if (!this.anchorElement()) {\n return;\n }\n if ((this.floatingFallback?.middleware ?? []).length === 0) {\n warnMissingFloatingMiddleware(this.popoverElement.ownerDocument);\n }\n this.floatingPositioner.start();\n }\n\n /**\n * Recompute the arrow's edge and inline offset from the live trigger and\n * panel rects. The resolved edge captures any browser-driven flip; the\n * offset is clamped inside the panel's rounded-corner bounds so the\n * arrow's base stays flush with the panel's straight edge even when the\n * trigger sits outside the panel's inline extent.\n */\n private updateArrowOffset(): void {\n const anchor = this.anchorElement();\n if (!anchor) {\n this._arrowOffset.set(null);\n this.resolvedEdgeSignal.set(null);\n return;\n }\n const panel = this.elRef.nativeElement;\n const panelRect = panel.getBoundingClientRect();\n if (panelRect.width === 0 || panelRect.height === 0) {\n this._arrowOffset.set(null);\n this.resolvedEdgeSignal.set(null);\n return;\n }\n const triggerRect = anchor.getBoundingClientRect();\n const edge = resolveActualEdge(triggerRect, panelRect, this.effectivePlacement());\n this.resolvedEdgeSignal.set(edge);\n const horizontal = edge === 'top' || edge === 'bottom';\n const triggerCentre = horizontal\n ? triggerRect.left + triggerRect.width / 2\n : triggerRect.top + triggerRect.height / 2;\n const panelStart = horizontal ? panelRect.left : panelRect.top;\n const panelDim = horizontal ? panelRect.width : panelRect.height;\n const radius = this.getArrowBounds()?.borderRadius ?? 12;\n const raw = triggerCentre - panelStart;\n const clamped = Math.max(radius, Math.min(raw, panelDim - radius));\n this._arrowOffset.set(`${clamped}px`);\n }\n\n private get popoverElement(): HTMLElement {\n return this.elRef.nativeElement;\n }\n\n private startClosing(): void {\n // Cascade to open descendants: the ancestor's display: none would take\n // their panels down visually while state, ARIA, and the registry still\n // said open - and the next Escape would route to an invisible panel.\n const host = this.popoverElement;\n for (const other of [...openPopovers]) {\n if (other !== this && host.contains(other.popoverElement)) {\n other.hide();\n }\n }\n if (hasTransition(this.popoverElement)) {\n this.stateSignal.set('closing');\n onTransitionDone(this.popoverElement, () => this.finalize());\n } else {\n this.finalize();\n }\n }\n\n private finalize(): void {\n this.floatingPositioner?.stop();\n openPopovers.delete(this);\n this._arrowOffset.set(null);\n this.resolvedEdgeSignal.set(null);\n const el = this.popoverElement;\n try {\n el.hidePopover();\n } catch {\n // Element may already be hidden or disconnected\n }\n this.stateSignal.set('closed');\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { computed, Directive, effect, ElementRef, inject, input, untracked } from '@angular/core';\n\nimport { SUPPORTS_ANCHOR } from './anchor-positioning';\nimport { type CngxPopover } from './popover.directive';\nimport type { PopoverHaspopup } from './popover.types';\n\n/**\n * ARIA wiring atom for elements that trigger a `CngxPopover`.\n *\n * Sets `aria-expanded`, `aria-controls`, and `aria-haspopup` based on the\n * referenced popover's state. Also sets `anchor-name` for CSS Anchor\n * Positioning and registers the anchor element on the popover for fallback\n * positioning.\n *\n * Contains **no event handlers** - the consumer binds interactions directly:\n *\n * ```html\n * <button [cngxPopoverTrigger]=\"pop\" (click)=\"pop.toggle()\">Menu</button>\n * <div cngxPopover #pop=\"cngxPopover\" placement=\"bottom-start\">…</div>\n * ```\n *\n * ### Focus restoration\n * Opt in with `[restoreFocus]=\"true\"` to capture the active element when\n * the popover opens and restore focus to it on close. Useful for menus,\n * confirm panels, and dialogs that steal focus from the trigger.\n *\n * @category common/popover\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-trigger.directive.ts\n * @since 0.1.0\n * @relatedTo CngxPopover, CngxPopoverPanel, CngxTooltip\n * <example-url>http://localhost:4200/#/common/popover/click-popover</example-url>\n * <example-url>http://localhost:4200/#/common/popover/controlled-open</example-url>\n * <example-url>http://localhost:4200/#/common/popover/escape-mode</example-url>\n * <example-url>http://localhost:4200/#/common/popover/placement-variants</example-url>\n */\n@Directive({\n selector: '[cngxPopoverTrigger]',\n exportAs: 'cngxPopoverTrigger',\n standalone: true,\n host: {\n '[attr.aria-expanded]': 'popoverRef().isVisible()',\n '[attr.aria-controls]': 'popoverRef().id()',\n '[attr.aria-haspopup]': 'haspopup()',\n '[style.anchor-name]': 'cssAnchorName()',\n },\n})\nexport class CngxPopoverTrigger {\n private readonly elRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly doc = inject(DOCUMENT);\n\n /** Explicit reference to the popover this trigger controls. */\n readonly popoverRef = input.required<CngxPopover>({\n alias: 'cngxPopoverTrigger',\n });\n\n /**\n * ARIA haspopup override. When set, wins over the popover-supplied\n * hint (`popoverRef().haspopup()`, populated by composers such as\n * `CngxPopoverPanel`). Final fallback when neither is set is `'true'`.\n * Accepts the W3C-spec values for supported popup-container roles:\n * `'dialog'`, `'listbox'`, `'menu'`, `'tree'`, or `'true'`.\n *\n * Pass `'none'` to emit no `aria-haspopup` at all - correct for a\n * disclosure whose popup is not one of the recognised widget types\n * (e.g. a list of links), where `aria-expanded` alone describes the\n * trigger. `'none'` wins over the composer hint, so it also cancels a\n * `CngxPopoverPanel`'s `'dialog'` default.\n */\n readonly haspopupInput = input<PopoverHaspopup | 'none' | undefined>(undefined, {\n alias: 'haspopup',\n });\n\n /**\n * When `true`, captures `document.activeElement` the moment the\n * popover transitions to a visible state and restores focus to that\n * element when the popover closes. Defaults to `false` so the trigger\n * stays a passive ARIA atom; opt in for menus, confirm panels, and\n * dialogs that move focus away from the trigger.\n */\n readonly restoreFocus = input(false);\n\n /**\n * Resolved `aria-haspopup`. Consumer override (`haspopup` on the\n * trigger element) wins; otherwise the popover's `haspopup` signal\n * (set by composers like `CngxPopoverPanel`) decides; final fallback\n * is `'true'`. The `'none'` sentinel resolves to `null` so the host\n * binding drops the attribute entirely.\n */\n protected readonly haspopup = computed<PopoverHaspopup | null>(() => {\n const resolved = this.haspopupInput() ?? this.popoverRef().haspopup() ?? 'true';\n return resolved === 'none' ? null : resolved;\n });\n\n protected readonly cssAnchorName = computed(() =>\n SUPPORTS_ANCHOR ? `--cngx-pop-${this.popoverRef().id()}` : null,\n );\n\n private savedFocus: HTMLElement | null = null;\n\n constructor() {\n // Register this element as the anchor for fallback positioning.\n effect(() => {\n const pop = this.popoverRef();\n untracked(() => pop.anchorElement.set(this.elRef.nativeElement));\n });\n\n // Focus restoration: capture on open, restore on close. Inert until\n // `restoreFocus` is opted into.\n effect(() => {\n if (!this.restoreFocus()) {\n return;\n }\n const visible = this.popoverRef().isVisible();\n if (visible) {\n untracked(() => {\n const active = this.doc.activeElement as HTMLElement | null;\n this.savedFocus = active ?? this.elRef.nativeElement;\n });\n } else if (this.savedFocus) {\n const target = this.savedFocus;\n this.savedFocus = null;\n untracked(() => {\n if (typeof target.focus === 'function' && target.isConnected) {\n target.focus();\n }\n });\n }\n });\n }\n}\n","import {\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n Renderer2,\n signal,\n untracked,\n} from '@angular/core';\n\nimport { CngxReducedMotion } from '@cngx/common/a11y';\nimport { injectDirection } from '@cngx/core';\nimport { nextUid } from '@cngx/core/utils';\n\nimport {\n ANCHOR_AREA_PROPERTY,\n POSITION_AREA,\n resolveDirectionalPlacement,\n resolveFloatingPlacement,\n SUPPORTS_ANCHOR,\n} from './anchor-positioning';\nimport {\n CNGX_FLOATING_FALLBACK,\n createFloatingPositioner,\n FLOATING_PLACEMENT,\n} from './floating-fallback';\nimport type {\n PopoverPlacement,\n PopoverPositionTryFallback,\n PopoverState,\n TooltipTriggerMode,\n} from './popover.types';\n\n/** @internal Small debounce to prevent SR announcement storms during rapid Tab navigation. */\nconst FOCUS_DEBOUNCE_MS = 50;\n\n/**\n * String-input tooltip directive applied to the trigger element.\n *\n * Creates the tooltip popover element internally via `Renderer2` and manages\n * the full lifecycle: hover/focus triggers, open/close delays, Escape dismiss,\n * CSS Anchor Positioning, and ARIA wiring (`aria-describedby` + `role=\"tooltip\"`).\n *\n * The consumer sees only the attribute - no extra elements in the template.\n *\n * ### Basic\n * ```html\n * <button cngxTooltip=\"Ctrl+S\">Save</button>\n * ```\n *\n * ### With configuration\n * ```html\n * <button cngxTooltip=\"Ctrl+S\" tooltipPlacement=\"top\" [tooltipDelay]=\"500\">\n * Save\n * </button>\n * ```\n *\n * @category common/popover\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/tooltip.directive.ts\n * @since 0.1.0\n * @relatedTo CngxPopover, CngxPopoverTrigger\n * <example-url>http://localhost:4200/#/common/popover/tooltip/basic-tooltip</example-url>\n * <example-url>http://localhost:4200/#/common/popover/tooltip/custom-delay</example-url>\n * <example-url>http://localhost:4200/#/common/popover/tooltip/disabled-state</example-url>\n * <example-url>http://localhost:4200/#/common/popover/tooltip/keyboard-navigation</example-url>\n * <example-url>http://localhost:4200/#/common/popover/tooltip/placement</example-url>\n * <example-url>http://localhost:4200/#/common/popover/tooltip/programmatic-control</example-url>\n */\n@Directive({\n selector: '[cngxTooltip]',\n exportAs: 'cngxTooltip',\n standalone: true,\n hostDirectives: [CngxReducedMotion],\n host: {\n '[attr.aria-describedby]': 'ariaDescribedBy()',\n '[style.anchor-name]': 'cssAnchorName()',\n '(mouseenter)': 'handleMouseEnter()',\n '(mouseleave)': 'handleMouseLeave()',\n '(focus)': 'handleFocus()',\n '(blur)': 'handleBlur()',\n },\n})\nexport class CngxTooltip {\n private readonly renderer = inject(Renderer2);\n private readonly elRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly floatingFallback = inject(CNGX_FLOATING_FALLBACK, { optional: true });\n private readonly direction = injectDirection();\n\n /** Tooltip text content. */\n readonly text = input.required<string>({ alias: 'cngxTooltip' });\n\n /** Anchor-relative placement. */\n readonly placement = input<PopoverPlacement>('top', { alias: 'tooltipPlacement' });\n\n /**\n * @internal\n * `placement` fully mirrored against the ambient writing direction, for the\n * CSS-anchor path (`POSITION_AREA`, physical keywords, no direction\n * awareness).\n */\n private readonly directionalPlacement = computed(() =>\n resolveDirectionalPlacement(this.placement(), this.direction()),\n );\n\n /**\n * @internal\n * `placement` mirrored side-only, for the floating-ui fallback path.\n * `@floating-ui/dom` flips the inline alignment of vertical placements under\n * `rtl` itself, so a full mirror would double-flip `top-start` / `bottom-end`\n * here. This path mirrors the side and defers alignment to floating-ui.\n */\n private readonly floatingPlacement = computed(() =>\n resolveFloatingPlacement(this.placement(), this.direction()),\n );\n\n /** Gap between trigger and tooltip in px. */\n readonly offset = input(8, { alias: 'tooltipOffset' });\n\n /** Delay in ms before opening on mouseenter. */\n readonly openDelay = input(300, { alias: 'tooltipDelay' });\n\n /** Delay in ms before closing on mouseleave. */\n readonly closeDelay = input(100);\n\n /** Whether the tooltip is active. When `false`, no tooltip appears and ARIA is cleared. */\n readonly enabled = input(true);\n\n /**\n * Trigger mode. `'auto'` (default) opens on hover/focus with the\n * configured delays; `'manual'` opts the host out of the hover/focus\n * listeners so only `show()` / `hide()` open or close the tooltip.\n * Escape still dismisses an open tooltip in either mode.\n */\n readonly triggers = input<TooltipTriggerMode>('auto');\n\n /**\n * CSS `<try-tactic>` fallbacks for `position-try-fallbacks`. Empty array\n * (default) means no fallback CSS is written; the tooltip stays at the\n * declared `tooltipPlacement` regardless of viewport clipping. Tooltips\n * are decorative - collision recovery is opt-in per-tooltip.\n */\n readonly positionTryFallbacks = input<readonly PopoverPositionTryFallback[]>([], {\n alias: 'tooltipPositionTryFallbacks',\n });\n\n private readonly stateSignal = signal<PopoverState>('closed');\n private readonly idSignal = signal(nextUid('cngx-tooltip'));\n\n /** Current lifecycle state. */\n readonly state = this.stateSignal.asReadonly();\n\n private tooltipEl: HTMLElement | null = null;\n private openTimer: ReturnType<typeof setTimeout> | null = null;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n\n protected readonly ariaDescribedBy = computed(() => (this.enabled() ? this.idSignal() : null));\n\n protected readonly cssAnchorName = computed(() =>\n SUPPORTS_ANCHOR ? `--cngx-tip-${this.idSignal()}` : null,\n );\n\n constructor() {\n this.createTooltipElement();\n\n effect(() => {\n const text = this.text();\n const el = untracked(() => this.tooltipEl);\n if (el) {\n el.textContent = text;\n }\n });\n\n effect(() => {\n const placement = this.directionalPlacement();\n const offset = this.offset();\n const el = untracked(() => this.tooltipEl);\n if (!el) {\n return;\n }\n\n if (SUPPORTS_ANCHOR) {\n el.style.setProperty('position-anchor', `--cngx-tip-${this.idSignal()}`);\n el.style.setProperty(ANCHOR_AREA_PROPERTY, POSITION_AREA[placement]);\n el.style.setProperty('margin', `${offset}px`);\n }\n });\n\n // position-try-fallbacks is written unconditionally - unsupported\n // browsers ignore the unknown property, and the write keeps a uniform\n // test surface across jsdom + real browsers.\n effect(() => {\n const fallbacks = this.positionTryFallbacks();\n const el = untracked(() => this.tooltipEl);\n if (!el) {\n return;\n }\n if (fallbacks.length > 0) {\n el.style.setProperty('position-try-fallbacks', fallbacks.join(', '));\n } else {\n el.style.removeProperty('position-try-fallbacks');\n }\n });\n\n effect(() => {\n const enabled = this.enabled();\n if (!enabled) {\n const current = untracked(() => this.stateSignal());\n if (current !== 'closed') {\n this.hide();\n }\n }\n });\n\n this.destroyRef.onDestroy(() => {\n this.clearTimers();\n this.floatingPositioner?.stop();\n this.elRef.nativeElement.ownerDocument.removeEventListener(\n 'keydown',\n this.handleDocumentEscape,\n true,\n );\n this.tooltipEl?.remove();\n });\n }\n\n /** Show the tooltip immediately (bypassing delay). */\n show(): void {\n if (!this.enabled() || this.stateSignal() !== 'closed') {\n return;\n }\n this.stateSignal.set('opening');\n // The element ships aria-hidden while closed; an open tooltip must be\n // exposed - it is the live target of the trigger's aria-describedby.\n this.tooltipEl!.removeAttribute('aria-hidden');\n this.tooltipEl!.showPopover();\n this.elRef.nativeElement.ownerDocument.addEventListener(\n 'keydown',\n this.handleDocumentEscape,\n true,\n );\n this.applyFloatingPosition();\n requestAnimationFrame(() => {\n if (this.stateSignal() === 'opening') {\n this.stateSignal.set('open');\n }\n });\n }\n\n /** Hide the tooltip immediately (bypassing delay). */\n hide(): void {\n if (this.stateSignal() === 'closed' || this.stateSignal() === 'closing') {\n return;\n }\n this.clearTimers();\n this.finalize();\n }\n\n protected handleMouseEnter(): void {\n if (this.triggers() !== 'auto' || !this.enabled()) {\n return;\n }\n this.clearCloseTimer();\n const delay = this.openDelay();\n if (delay > 0) {\n this.openTimer = setTimeout(() => this.show(), delay);\n } else {\n this.show();\n }\n }\n\n protected handleMouseLeave(): void {\n if (this.triggers() !== 'auto') {\n return;\n }\n this.clearOpenTimer();\n const delay = this.closeDelay();\n if (delay > 0) {\n this.closeTimer = setTimeout(() => this.hide(), delay);\n } else {\n this.hide();\n }\n }\n\n protected handleFocus(): void {\n if (this.triggers() !== 'auto' || !this.enabled()) {\n return;\n }\n // Debounce prevents SR announcement storm when user rapidly Tabs\n // through a toolbar of tooltipped buttons.\n this.clearTimers();\n this.openTimer = setTimeout(() => this.show(), FOCUS_DEBOUNCE_MS);\n }\n\n protected handleBlur(): void {\n if (this.triggers() !== 'auto') {\n return;\n }\n this.clearTimers();\n this.hide();\n }\n\n /**\n * Document-level Escape while open (capture phase). A hover-opened tooltip\n * has no focus relationship with its trigger, so a host keydown binding\n * never fires - WCAG 1.4.13 requires Escape to dismiss regardless of where\n * the keyboard focus sits. stopPropagation keeps parent overlays (dialog,\n * popover) open: Escape dismisses the innermost surface only.\n */\n private readonly handleDocumentEscape = (event: KeyboardEvent): void => {\n if (event.key !== 'Escape' || this.stateSignal() === 'closed') {\n return;\n }\n event.stopPropagation();\n this.hide();\n };\n\n /**\n * Shared fallback engine (same as `CngxPopover`) - offset middleware,\n * scroll/resize re-run while open, state-guarded writes. First step of\n * folding the tooltip onto the popover state machine. `null` when no\n * fallback is provided.\n */\n private readonly floatingPositioner = this.floatingFallback\n ? createFloatingPositioner({\n fallback: this.floatingFallback,\n getAnchor: () => this.elRef.nativeElement,\n getElement: () => this.tooltipEl,\n getPlacement: () => FLOATING_PLACEMENT[this.floatingPlacement()],\n getOffset: () => this.offset(),\n isOpen: () => this.stateSignal() !== 'closed',\n })\n : null;\n\n private applyFloatingPosition(): void {\n if (SUPPORTS_ANCHOR || !this.floatingPositioner) {\n return;\n }\n this.floatingPositioner.start();\n }\n\n private createTooltipElement(): void {\n const el = this.renderer.createElement('div') as HTMLElement;\n el.setAttribute('popover', 'manual');\n el.setAttribute('role', 'tooltip');\n el.id = this.idSignal();\n el.setAttribute('aria-hidden', 'true');\n el.classList.add('cngx-tooltip');\n\n const trigger = this.elRef.nativeElement;\n if (trigger.parentElement) {\n this.renderer.insertBefore(trigger.parentElement, el, trigger.nextSibling);\n } else {\n // A parentless trigger cannot host the tooltip inside itself: void and\n // replaced elements drop the child silently. The tooltip renders in the\n // top layer anyway, so body is the correct fallback host.\n this.renderer.appendChild(trigger.ownerDocument.body, el);\n }\n\n this.tooltipEl = el;\n }\n\n private finalize(): void {\n this.floatingPositioner?.stop();\n this.elRef.nativeElement.ownerDocument.removeEventListener(\n 'keydown',\n this.handleDocumentEscape,\n true,\n );\n if (this.tooltipEl) {\n try {\n this.tooltipEl.hidePopover();\n } catch {\n // May already be hidden or disconnected\n }\n this.tooltipEl.setAttribute('aria-hidden', 'true');\n }\n this.stateSignal.set('closed');\n }\n\n private clearTimers(): void {\n this.clearOpenTimer();\n this.clearCloseTimer();\n }\n\n private clearOpenTimer(): void {\n if (this.openTimer) {\n clearTimeout(this.openTimer);\n this.openTimer = null;\n }\n }\n\n private clearCloseTimer(): void {\n if (this.closeTimer) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n}\n","import { InjectionToken, type Provider, type TemplateRef } from '@angular/core';\n\nimport type { CngxPopoverArrowContext } from './popover-panel-slots';\nimport type { CngxPopoverPanelConfig, PopoverPanelFeature } from './popover-panel.types';\n\n/** @internal Default configuration - no auto-dismiss, no close-on-success, variant='default'. */\nconst DEFAULT_CONFIG: CngxPopoverPanelConfig = {\n defaultVariant: 'default',\n};\n\n/**\n * Injection token for popover panel configuration.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel.config.ts\n * @since 0.1.0\n */\nexport const CNGX_POPOVER_PANEL_CONFIG = new InjectionToken<CngxPopoverPanelConfig>(\n 'CngxPopoverPanelConfig',\n { factory: () => DEFAULT_CONFIG },\n);\n\n/**\n * Provides configuration for `CngxPopoverPanel` instances.\n *\n * ```typescript\n * providers: [\n * providePopoverPanel(\n * withAutoDismiss({ info: 5000, success: 3000 }),\n * withCloseOnSuccess(300),\n * ),\n * ]\n * ```\n *\n * @category common/popover\n */\nexport function providePopoverPanel(...features: PopoverPanelFeature[]): Provider {\n const config = features.reduce((acc, f) => f(acc), { ...DEFAULT_CONFIG });\n return { provide: CNGX_POPOVER_PANEL_CONFIG, useValue: config };\n}\n\n/**\n * Auto-dismiss the panel after a timeout, per variant.\n *\n * @param timing - Map of variant name to dismiss duration in ms.\n * ```typescript\n * withAutoDismiss({ info: 5000, success: 3000 })\n * ```\n *\n * @category common/popover\n */\nexport function withAutoDismiss(timing: Record<string, number>): PopoverPanelFeature {\n return (config) => ({ ...config, autoDismiss: { ...config.autoDismiss, ...timing } });\n}\n\n/**\n * Auto-close the panel after an async action in the footer succeeds.\n *\n * @param delay - Delay in ms before closing. Defaults to `300`.\n *\n * @category common/popover\n */\nexport function withCloseOnSuccess(delay = 300): PopoverPanelFeature {\n return (config) => ({ ...config, closeOnSuccessDelay: delay });\n}\n\n/**\n * Set the default variant applied when no `variant` input is set.\n *\n * @category common/popover\n */\nexport function withDefaultVariant(variant: string): PopoverPanelFeature {\n return (config) => ({ ...config, defaultVariant: variant });\n}\n\n/**\n * Show the close button on all panels by default.\n *\n * @category common/popover\n */\nexport function withCloseButton(show = true): PopoverPanelFeature {\n return (config) => ({ ...config, showClose: show });\n}\n\n/**\n * Show the arrow on all panels by default.\n *\n * @category common/popover\n */\nexport function withArrow(show = true): PopoverPanelFeature {\n return (config) => ({ ...config, showArrow: show });\n}\n\n/**\n * Register an app-wide default template for the panel's arrow ornament.\n * The template receives a `CngxPopoverArrowContext` with `edge` and\n * `offsetPx` so the consumer's glyph can match the resolved placement.\n *\n * Per-instance `*cngxPopoverArrow` still wins over this default; the\n * library's rotated-diamond fallback only renders when neither tier is\n * set.\n *\n * ```typescript\n * providers: [\n * providePopoverPanel(withArrowTemplate(brandArrowTpl)),\n * ]\n * ```\n *\n * @category common/popover\n */\nexport function withArrowTemplate(tpl: TemplateRef<CngxPopoverArrowContext>): PopoverPanelFeature {\n return (config) => ({ ...config, templates: { ...config.templates, arrow: tpl } });\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { ArrowEdge } from './popover.types';\n\n/**\n * Context object passed to a `*cngxPopoverArrow` template.\n *\n * The consumer's glyph receives the resolved panel edge (`top` / `bottom` /\n * `left` / `right`) and the inline-axis offset in CSS pixels that the\n * library would have placed the default diamond at. Either can be used to\n * rotate, translate, or theme the custom glyph so it tracks the trigger.\n *\n * @category common/popover\n */\nexport interface CngxPopoverArrowContext {\n /** Primary edge of the panel facing the trigger. */\n readonly edge: ArrowEdge;\n /**\n * Inline-axis offset from the panel edge to the trigger's centre, in\n * CSS pixels. `null` before the first geometry read (the consumer\n * should treat `null` as \"centre the glyph\" - the default diamond\n * falls back to `50%` in the same case).\n */\n readonly offsetPx: number | null;\n}\n\n/**\n * Marks the header content inside `cngx-popover-panel`.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxPopoverBody, CngxPopoverFooter\n */\n@Directive({ selector: '[cngxPopoverHeader]', standalone: true })\nexport class CngxPopoverHeader {}\n\n/**\n * Marks the body content inside `cngx-popover-panel`.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxPopoverHeader, CngxPopoverFooter\n */\n@Directive({ selector: '[cngxPopoverBody]', standalone: true })\nexport class CngxPopoverBody {}\n\n/**\n * Marks the footer content inside `cngx-popover-panel`.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxPopoverHeader, CngxPopoverBody, CngxPopoverAction\n */\n@Directive({ selector: '[cngxPopoverFooter]', standalone: true })\nexport class CngxPopoverFooter {}\n\n/**\n * Custom close button template. Overrides the default close button.\n *\n * ```html\n * <ng-template cngxPopoverClose>\n * <button mat-icon-button (click)=\"panel.popover.hide()\">\n * <mat-icon>close</mat-icon>\n * </button>\n * </ng-template>\n * ```\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel\n */\n@Directive({ selector: 'ng-template[cngxPopoverClose]', standalone: true })\nexport class CngxPopoverClose {\n readonly templateRef = inject(TemplateRef);\n}\n\n/**\n * Template shown while panel content is loading.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxPopoverEmpty, CngxPopoverError\n */\n@Directive({ selector: 'ng-template[cngxPopoverLoading]', standalone: true })\nexport class CngxPopoverLoading {\n readonly templateRef = inject(TemplateRef);\n}\n\n/**\n * Template shown when panel content is empty.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxPopoverLoading, CngxPopoverError\n */\n@Directive({ selector: 'ng-template[cngxPopoverEmpty]', standalone: true })\nexport class CngxPopoverEmpty {\n readonly templateRef = inject(TemplateRef);\n}\n\n/**\n * Template shown when panel content failed to load. Context: `$implicit` = error.\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxPopoverLoading, CngxPopoverEmpty\n */\n@Directive({ selector: 'ng-template[cngxPopoverError]', standalone: true })\nexport class CngxPopoverError {\n readonly templateRef = inject(TemplateRef);\n}\n\n/**\n * Custom arrow ornament template. Overrides the default rotated-diamond\n * arrow when projected as a child of `<cngx-popover-panel>`. The library\n * routes the resolved panel edge and the live inline-axis offset to the\n * template via `CngxPopoverArrowContext`.\n *\n * ```html\n * <cngx-popover-panel #pop [showArrow]=\"true\">\n * <ng-template cngxPopoverArrow let-edge=\"edge\" let-offsetPx=\"offsetPx\">\n * <svg class=\"brand-arrow\" [attr.data-edge]=\"edge\"\n * [style.--offset]=\"offsetPx ? offsetPx + 'px' : '50%'\">\n * <use href=\"#arrow-glyph\" />\n * </svg>\n * </ng-template>\n * </cngx-popover-panel>\n * ```\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxPopover\n */\n@Directive({ selector: 'ng-template[cngxPopoverArrow]', standalone: true })\nexport class CngxPopoverArrow {\n readonly templateRef = inject<TemplateRef<CngxPopoverArrowContext>>(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { CngxCloseButton } from '@cngx/common/interactive';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n DestroyRef,\n ElementRef,\n effect,\n inject,\n input,\n untracked,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { CngxAsyncState } from '@cngx/core/utils';\nimport { nextUid } from '@cngx/core/utils';\n\nimport { CNGX_POPOVER_ARROW_BOUNDS, type CngxPopoverArrowBounds } from './popover-arrow-bounds';\nimport { CNGX_POPOVER_PANEL_CONFIG } from './popover-panel.config';\nimport {\n CngxPopoverArrow,\n type CngxPopoverArrowContext,\n CngxPopoverClose,\n CngxPopoverEmpty,\n CngxPopoverError,\n CngxPopoverFooter,\n CngxPopoverHeader,\n CngxPopoverLoading,\n} from './popover-panel-slots';\nimport { CngxPopover } from './popover.directive';\nimport type { PopoverPanelRole } from './popover.types';\n\n/**\n * Rich popover panel molecule with header/body/footer slots, variant\n * styling, arrow, close button, and content state templates.\n *\n * Composes `CngxPopover` via `hostDirectives` - all popover inputs\n * (`placement`, `offset`, `closeOnEscape`, `mode`, `exclusive`,\n * `cngxPopoverOpen`) are forwarded.\n *\n * The `variant` input is a free-form string mapped to a CSS class\n * (`cngx-popover-panel--{variant}`). Five variants are pre-themed\n * in `popover-panel-theme.scss`: `default`, `info`, `warning`,\n * `danger`, `success`. Add custom variants via CSS.\n *\n * ### Basic with header/body/footer\n * ```html\n * <button [cngxPopoverTrigger]=\"panel\" (click)=\"panel.popover.toggle()\">Menu</button>\n * <cngx-popover-panel #panel variant=\"danger\" [showClose]=\"true\" [showArrow]=\"true\">\n * <span cngxPopoverHeader>Delete Item?</span>\n * <p cngxPopoverBody>This action cannot be undone.</p>\n * <div cngxPopoverFooter>\n * <cngx-popover-action role=\"dismiss\">Cancel</cngx-popover-action>\n * <cngx-popover-action role=\"confirm\" [action]=\"delete\" variant=\"danger\">\n * Delete\n * </cngx-popover-action>\n * </div>\n * </cngx-popover-panel>\n * ```\n *\n * ### With loading state\n * ```html\n * <cngx-popover-panel [loading]=\"isLoading()\" [error]=\"loadError()\">\n * <p cngxPopoverBody>Loaded content here</p>\n * <ng-template cngxPopoverLoading>Loading...</ng-template>\n * <ng-template cngxPopoverError let-err>Failed: {{ err }}</ng-template>\n * </cngx-popover-panel>\n * ```\n *\n * @category common/popover\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel.component.ts\n * @since 0.1.0\n * @relatedTo CngxPopover, CngxPopoverAction, CngxPopoverHeader, CngxPopoverBody, CngxPopoverFooter\n * @slot cngxPopoverArrow Replaces the pointer that ties the panel to its trigger.\n * @slot cngxPopoverClose Replaces the dismiss control.\n * @slot cngxPopoverLoading Rendered while the panel's content is loading.\n * @slot cngxPopoverEmpty Rendered when the panel has nothing to show.\n * @slot cngxPopoverError Rendered when the panel's content failed to load.\n * <example-url>http://localhost:4200/#/common/popover/popover-panel/content-states</example-url>\n * <example-url>http://localhost:4200/#/common/popover/popover-panel/variants</example-url>\n * <example-url>http://localhost:4200/#/common/popover/popover-panel/with-footer-actions</example-url>\n */\n@Component({\n selector: 'cngx-popover-panel',\n standalone: true,\n imports: [NgTemplateOutlet, CngxCloseButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'cngxPopoverPanel',\n providers: [{ provide: CNGX_POPOVER_ARROW_BOUNDS, useExisting: CngxPopoverPanel }],\n hostDirectives: [\n {\n directive: CngxPopover,\n inputs: [\n 'placement',\n 'positionTryFallbacks',\n 'offset',\n 'closeOnEscape',\n 'mode',\n 'exclusive',\n 'cngxPopoverOpen',\n ],\n },\n ],\n host: {\n '[class]': 'hostClass()',\n '[attr.role]': 'role()',\n '[attr.aria-labelledby]': 'ariaLabelledBy()',\n '[attr.aria-describedby]': 'ariaDescribedBy()',\n '[attr.aria-busy]': 'effectiveLoading() || null',\n },\n template: `\n @if (showArrow()) {\n @if (arrowTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: arrowContext()\" />\n } @else {\n <div class=\"cngx-popover-panel__arrow\"></div>\n }\n }\n\n @if (effectiveLoading()) {\n @if (loadingTpl(); as tpl) {\n <div class=\"cngx-popover-panel__loading\">\n <ng-container *ngTemplateOutlet=\"tpl.templateRef\" />\n </div>\n }\n } @else if (effectiveError(); as err) {\n @if (errorTpl(); as tpl) {\n <div class=\"cngx-popover-panel__error\">\n <ng-container *ngTemplateOutlet=\"tpl.templateRef; context: { $implicit: err }\" />\n </div>\n }\n } @else if (effectiveEmpty()) {\n @if (emptyTpl(); as tpl) {\n <div class=\"cngx-popover-panel__empty\">\n <ng-container *ngTemplateOutlet=\"tpl.templateRef\" />\n </div>\n }\n } @else {\n @if (hasHeader() || showClose()) {\n <div class=\"cngx-popover-panel__header-row\">\n <div class=\"cngx-popover-panel__header\" [id]=\"headerId\">\n <ng-content select=\"[cngxPopoverHeader]\" />\n </div>\n @if (showClose()) {\n @if (closeTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl.templateRef\" />\n } @else {\n <cngx-close-button\n label=\"Close\"\n class=\"cngx-popover-panel__close\"\n (click)=\"popover.hide()\"\n />\n }\n }\n </div>\n }\n <div class=\"cngx-popover-panel__body\" [id]=\"bodyId\">\n <ng-content select=\"[cngxPopoverBody]\" />\n <ng-content />\n </div>\n @if (hasFooter()) {\n <div class=\"cngx-popover-panel__footer\">\n <ng-content select=\"[cngxPopoverFooter]\" />\n </div>\n }\n }\n `,\n styleUrls: ['./popover-panel.component.css'],\n})\nexport class CngxPopoverPanel implements CngxPopoverArrowBounds {\n /** The underlying popover state machine. */\n readonly popover = inject(CngxPopover, { self: true });\n private readonly config = inject(CNGX_POPOVER_PANEL_CONFIG);\n private readonly destroyRef = inject(DestroyRef);\n private readonly hostRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Cached panel border-radius. Read lazily from the host's computed\n * style on first access so `CngxPopover` can consume it via\n * `CNGX_POPOVER_ARROW_BOUNDS` without forcing a layout flush per\n * resize tick. The custom property is declared on `:scope` so the\n * value is valid from instantiation onward.\n */\n private _cachedBorderRadius: number | null = null;\n\n /** @internal - implements `CngxPopoverArrowBounds`. */\n get borderRadius(): number {\n if (this._cachedBorderRadius === null) {\n const raw = getComputedStyle(this.hostRef.nativeElement).getPropertyValue(\n '--cngx-popover-panel-border-radius',\n );\n this._cachedBorderRadius = Number.parseFloat(raw) || 12;\n }\n return this._cachedBorderRadius;\n }\n\n /**\n * Variant string - mapped to CSS class `cngx-popover-panel--{variant}`.\n * Pre-themed: `default`, `info`, `warning`, `danger`, `success`.\n * Add custom variants via CSS.\n */\n readonly variant = input<string | undefined>(undefined);\n\n /**\n * ARIA role applied to the panel host. Defaults to `'dialog'` because\n * the panel pairs `aria-labelledby` (header) with `aria-describedby`\n * (body) - the standard dialog pattern. Override with `'alertdialog'`\n * for irrecoverable confirmations, `'tooltip'` for passive callouts,\n * or `'menu'` when the panel hosts a menu.\n *\n * The trigger's `aria-haspopup` is hinted to `'dialog'` in tandem via\n * the popover's `haspopup` signal; consumers overriding `role` here\n * should also override `haspopup` on the trigger to match.\n */\n readonly role = input<PopoverPanelRole>('dialog');\n\n /** Show a close button. Falls back to global config from `providePopoverPanel(withCloseButton())`. */\n readonly showCloseInput = input<boolean | undefined>(undefined, { alias: 'showClose' });\n\n /** Show an arrow. Falls back to global config from `providePopoverPanel(withArrow())`. */\n readonly showArrowInput = input<boolean | undefined>(undefined, { alias: 'showArrow' });\n\n /** Resolved showClose - input takes precedence over config. */\n readonly showClose = computed(() => this.showCloseInput() ?? this.config.showClose ?? false);\n\n /** Resolved showArrow - input takes precedence over config. */\n readonly showArrow = computed(() => this.showArrowInput() ?? this.config.showArrow ?? false);\n\n /**\n * Bind an async state - drives loading, error, and empty slots from a single source.\n * When set, takes precedence over individual `[loading]`, `[error]`, `[empty]` inputs.\n */\n readonly state = input<CngxAsyncState<unknown> | undefined>(undefined);\n\n /** Whether the panel content is in a loading state. Fallback when `[state]` is not set. */\n readonly loading = input(false);\n\n /** Error value when content loading failed. Fallback when `[state]` is not set. */\n readonly error = input<unknown>(undefined);\n\n /** Whether the panel content is empty. Fallback when `[state]` is not set. */\n readonly empty = input(false);\n\n /** @internal Resolved loading - state takes precedence over boolean input. */\n protected readonly effectiveLoading = computed(\n () => this.state()?.isFirstLoad() ?? this.loading(),\n );\n\n /** @internal Resolved error - state takes precedence over direct input. */\n protected readonly effectiveError = computed(() => this.state()?.error() ?? this.error());\n\n /** @internal Resolved empty - state takes precedence over boolean input. */\n protected readonly effectiveEmpty = computed(() => this.state()?.isEmpty() ?? this.empty());\n\n protected readonly headerSlot = contentChild(CngxPopoverHeader);\n protected readonly footerSlot = contentChild(CngxPopoverFooter);\n protected readonly closeTpl = contentChild(CngxPopoverClose);\n protected readonly loadingTpl = contentChild(CngxPopoverLoading);\n protected readonly emptyTpl = contentChild(CngxPopoverEmpty);\n protected readonly errorTpl = contentChild(CngxPopoverError);\n protected readonly arrowTplDirective = contentChild(CngxPopoverArrow);\n\n /**\n * Three-stage cascade for the arrow ornament:\n * 1. Per-instance `*cngxPopoverArrow` template (contentChild).\n * 2. App-wide `CNGX_POPOVER_PANEL_CONFIG.templates.arrow`\n * (via `providePopoverPanel(withArrowTemplate(...))`).\n * 3. `null` -> the panel renders the default rotated-diamond markup.\n */\n protected readonly arrowTpl = computed(\n () => this.arrowTplDirective()?.templateRef ?? this.config.templates?.arrow ?? null,\n );\n\n /**\n * Context surface for projected `*cngxPopoverArrow` templates.\n * `equal` keeps the reference stable across re-evaluations whose\n * inputs round-trip to the same `{ edge, offsetPx }` - required for\n * any object-returning computed per the Equality discipline rule.\n */\n protected readonly arrowContext = computed<CngxPopoverArrowContext>(\n () => {\n const raw = this.popover.arrowOffset();\n const parsed = raw === null ? null : Number.parseFloat(raw);\n return {\n edge: this.popover.resolvedEdge(),\n offsetPx: parsed !== null && Number.isFinite(parsed) ? parsed : null,\n };\n },\n { equal: (a, b) => a.edge === b.edge && a.offsetPx === b.offsetPx },\n );\n\n /** Auto-detected from projected `[cngxPopoverHeader]` content. */\n protected readonly hasHeader = computed(() => !!this.headerSlot());\n\n /** Auto-detected from projected `[cngxPopoverFooter]` content. */\n protected readonly hasFooter = computed(() => !!this.footerSlot());\n\n private readonly uid = nextUid('cngx-pp');\n protected readonly headerId = `${this.uid}-header`;\n protected readonly bodyId = `${this.uid}-body`;\n\n /**\n * Only point to the header when one is projected - a bare id reference\n * resolves even against an element that never renders (the header row is\n * gated on `hasHeader()`), leaving AT with an empty accessible name.\n */\n protected readonly ariaLabelledBy = computed(() => (this.hasHeader() ? this.headerId : null));\n\n /** Only point to body when default content is showing (not loading/error/empty). */\n protected readonly ariaDescribedBy = computed(() =>\n this.effectiveLoading() || this.effectiveError() || this.effectiveEmpty() ? null : this.bodyId,\n );\n\n protected readonly hostClass = computed(() => {\n const v = this.variant() ?? this.config.defaultVariant ?? 'default';\n let cls = `cngx-popover-panel cngx-popover-panel--${v}`;\n if (this.showArrow()) {\n cls += ' cngx-popover-panel--arrow';\n }\n return cls;\n });\n\n private autoDismissTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n // Hint any CngxPopoverTrigger pointing at this popover to default\n // `aria-haspopup=\"dialog\"`. Consumer override on the trigger wins.\n this.popover.haspopup.set('dialog');\n\n effect(() => {\n const isVisible = this.popover.isVisible();\n const v = this.variant() ?? untracked(() => this.config.defaultVariant) ?? 'default';\n const timing = untracked(() => this.config.autoDismiss);\n\n if (this.autoDismissTimer) {\n clearTimeout(this.autoDismissTimer);\n this.autoDismissTimer = null;\n }\n if (isVisible && timing?.[v]) {\n this.autoDismissTimer = setTimeout(() => this.popover.hide(), timing[v]);\n } else if (!isVisible && this.autoDismissTimer) {\n clearTimeout(this.autoDismissTimer);\n this.autoDismissTimer = null;\n }\n });\n\n this.destroyRef.onDestroy(() => {\n if (this.autoDismissTimer) {\n clearTimeout(this.autoDismissTimer);\n }\n });\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n DestroyRef,\n effect,\n inject,\n input,\n isDevMode,\n untracked,\n ViewEncapsulation,\n viewChild,\n} from '@angular/core';\nimport type { AsyncStatus } from '@cngx/core/utils';\nimport {\n CngxAsyncClick,\n CngxFailed,\n CngxPending,\n CngxSucceeded,\n type AsyncAction,\n} from '@cngx/common/interactive';\n\nimport { CNGX_POPOVER_PANEL_CONFIG } from './popover-panel.config';\nimport { CngxPopover } from './popover.directive';\n\n/**\n * Visual variant for the action button.\n *\n * @category common/popover\n */\nexport type PopoverActionVariant = 'primary' | 'secondary' | 'danger' | 'ghost';\n\n/**\n * Action button for use inside `cngx-popover-panel` footer.\n *\n * Two roles:\n * - `'dismiss'` - closes the panel on click (no async action).\n * - `'confirm'` - executes an async action, shows status templates,\n * optionally auto-closes the panel on success.\n *\n * Supports the same `cngxPending`/`cngxSucceeded`/`cngxFailed` templates\n * as `CngxActionButton`, or use `status()` + `@switch` for full control.\n *\n * ### Dismiss button\n * ```html\n * <cngx-popover-action role=\"dismiss\">Cancel</cngx-popover-action>\n * ```\n *\n * ### Confirm with templates\n * ```html\n * <cngx-popover-action role=\"confirm\" [action]=\"save\" variant=\"primary\">\n * Save\n * <ng-template cngxPending>Saving...</ng-template>\n * <ng-template cngxSucceeded>Saved!</ng-template>\n * <ng-template cngxFailed let-err>{{ err }}</ng-template>\n * </cngx-popover-action>\n * ```\n *\n * ### With @switch\n * ```html\n * <cngx-popover-action role=\"confirm\" [action]=\"save\" #act=\"cngxPopoverAction\">\n * @switch (act.status()) {\n * @case ('pending') { Saving... }\n * @case ('success') { Done }\n * @default { Save }\n * }\n * </cngx-popover-action>\n * ```\n *\n * @category common/popover\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-action.component.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxPopoverFooter\n * @slot cngxPending Rendered while the action is running.\n * @slot cngxSucceeded Rendered after the action succeeds.\n * @slot cngxFailed Rendered when the action fails; gets the error.\n * <example-url>http://localhost:4200/#/common/popover/popover-panel/content-states</example-url>\n * <example-url>http://localhost:4200/#/common/popover/popover-panel/variants</example-url>\n * <example-url>http://localhost:4200/#/common/popover/popover-panel/with-footer-actions</example-url>\n */\n@Component({\n selector: 'cngx-popover-action',\n standalone: true,\n imports: [NgTemplateOutlet, CngxAsyncClick],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'cngxPopoverAction',\n host: { style: 'display: contents' },\n template: `\n <ng-template #idle><ng-content /></ng-template>\n\n @if (role() === 'dismiss') {\n <button\n type=\"button\"\n [class]=\"'cngx-popover-action cngx-popover-action--' + variant()\"\n (click)=\"handleDismiss()\"\n >\n <ng-container *ngTemplateOutlet=\"idle\" />\n </button>\n } @else {\n <button\n type=\"button\"\n [cngxAsyncClick]=\"action()!\"\n #btn=\"cngxAsyncClick\"\n [feedbackDuration]=\"feedbackDuration()\"\n [class]=\"'cngx-popover-action cngx-popover-action--' + variant()\"\n >\n @switch (btn.status()) {\n @case ('pending') {\n @if (pendingTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl.templateRef\" />\n } @else {\n <ng-container *ngTemplateOutlet=\"idle\" />\n }\n }\n @case ('success') {\n @if (succeededTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl.templateRef\" />\n } @else {\n <ng-container *ngTemplateOutlet=\"idle\" />\n }\n }\n @case ('error') {\n @if (failedTpl(); as tpl) {\n <ng-container\n *ngTemplateOutlet=\"tpl.templateRef; context: { $implicit: btn.error() }\"\n />\n } @else {\n <ng-container *ngTemplateOutlet=\"idle\" />\n }\n }\n @default {\n <ng-container *ngTemplateOutlet=\"idle\" />\n }\n }\n </button>\n <span aria-live=\"polite\" aria-atomic=\"true\" class=\"cngx-popover-action__sr-only\">\n {{ btn.announcement() }}\n </span>\n }\n `,\n styleUrls: ['./popover-action.component.css'],\n})\nexport class CngxPopoverAction {\n private readonly popover = inject(CngxPopover, { optional: true });\n private readonly config = inject(CNGX_POPOVER_PANEL_CONFIG);\n private readonly destroyRef = inject(DestroyRef);\n\n /** Button role: `'dismiss'` closes immediately, `'confirm'` runs an async action. */\n readonly role = input<'dismiss' | 'confirm'>('confirm');\n\n /** The async action to execute (only for `role=\"confirm\"`). */\n readonly action = input<AsyncAction | undefined>(undefined);\n\n /** Visual variant for the button. */\n readonly variant = input<PopoverActionVariant>('secondary');\n\n /** Duration in ms to show success/error feedback. */\n readonly feedbackDuration = input(2000);\n\n protected readonly pendingTpl = contentChild(CngxPending);\n protected readonly succeededTpl = contentChild(CngxSucceeded);\n protected readonly failedTpl = contentChild(CngxFailed);\n\n private readonly asyncClick = viewChild(CngxAsyncClick);\n\n /**\n * Lifecycle status of the confirm action - `'idle' | 'pending' | 'success'\n * | 'error'`, mirroring the internal `CngxAsyncClick`. Always `'idle'` for\n * `role=\"dismiss\"` (there is no async lifecycle to report).\n */\n readonly status = computed<AsyncStatus>(() => this.asyncClick()?.status() ?? 'idle');\n\n private closeOnSuccessTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n // withCloseOnSuccess(): a confirmed footer action hides the composing\n // popover after the configured delay. A follow-up run cancels the\n // pending close so a re-triggered action never yanks the panel away\n // mid-interaction.\n effect(() => {\n const status = this.status();\n const delay = untracked(() => this.config.closeOnSuccessDelay);\n if (status === 'pending') {\n this.clearCloseOnSuccessTimer();\n }\n if (status === 'success' && delay !== undefined && this.popover) {\n this.clearCloseOnSuccessTimer();\n this.closeOnSuccessTimer = setTimeout(() => {\n this.closeOnSuccessTimer = null;\n this.popover?.hide();\n }, delay);\n }\n });\n\n this.destroyRef.onDestroy(() => this.clearCloseOnSuccessTimer());\n\n if (isDevMode()) {\n afterNextRender(() => {\n if (this.role() === 'confirm' && !this.action()) {\n console.warn(\n 'CngxPopoverAction: role=\"confirm\" without an [action] renders a button whose ' +\n 'click does nothing. Bind [action] or use role=\"dismiss\".',\n );\n }\n });\n }\n }\n\n protected handleDismiss(): void {\n this.popover?.hide();\n }\n\n private clearCloseOnSuccessTimer(): void {\n if (this.closeOnSuccessTimer) {\n clearTimeout(this.closeOnSuccessTimer);\n this.closeOnSuccessTimer = null;\n }\n }\n}\n","import { Directive } from '@angular/core';\n\nimport { CngxDivider } from '@cngx/common/display';\n\n/**\n * Separator for use inside `cngx-popover-panel` (or a bare `[cngxPopover]`).\n *\n * Composes `CngxDivider` via `hostDirectives` so the popover-context\n * separator carries proper `role=\"separator\"` + `aria-orientation`\n * semantics without the consumer having to remember the ARIA wiring.\n * The `orientation` and `inset` inputs forward to the underlying\n * `CngxDivider` host directive.\n *\n * Project anywhere inside the panel content - typically between menu\n * item groups (destructive vs non-destructive), between body sections,\n * or between footer action groups.\n *\n * ### Menu item group separator (horizontal)\n * ```html\n * <menu>\n * <li><button (click)=\"pop.hide()\">Edit</button></li>\n * <li><button (click)=\"pop.hide()\">Duplicate</button></li>\n * <li cngxPopoverDivider></li>\n * <li><button (click)=\"pop.hide()\">Delete</button></li>\n * </menu>\n * ```\n *\n * ### Vertical separator between footer action groups\n * ```html\n * <div cngxPopoverFooter>\n * <cngx-popover-action role=\"dismiss\">Cancel</cngx-popover-action>\n * <span cngxPopoverDivider orientation=\"vertical\"></span>\n * <cngx-popover-action role=\"confirm\" [action]=\"save\">Save</cngx-popover-action>\n * </div>\n * ```\n *\n * @category common/popover\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-divider.directive.ts\n * @since 0.1.0\n * @relatedTo CngxPopoverPanel, CngxDivider\n */\n@Directive({\n selector: '[cngxPopoverDivider]',\n exportAs: 'cngxPopoverDivider',\n standalone: true,\n hostDirectives: [\n {\n directive: CngxDivider,\n inputs: ['orientation', 'inset'],\n },\n ],\n host: {\n class: 'cngx-popover-divider',\n },\n})\nexport class CngxPopoverDivider {}\n","/**\n * @module @cngx/common/popover\n */\n\n// Atoms\nexport type {\n ArrowEdge,\n PopoverPlacement,\n PopoverPositionTryFallback,\n PopoverState,\n PopoverMode,\n PopoverHaspopup,\n PopoverPanelRole,\n TooltipTriggerMode,\n} from './popover.types';\nexport { CngxPopover } from './popover.directive';\nexport { CngxPopoverTrigger } from './popover-trigger.directive';\nexport { CngxTooltip } from './tooltip.directive';\n\n// Floating UI fallback (opt-in)\nexport {\n CNGX_FLOATING_FALLBACK,\n provideFloatingFallback,\n type ComputePositionFn,\n type FloatingFallbackConfig,\n} from './floating-fallback';\n\n// Panel molecule\nexport type { CngxPopoverPanelConfig, PopoverPanelFeature } from './popover-panel.types';\nexport {\n CNGX_POPOVER_PANEL_CONFIG,\n providePopoverPanel,\n withAutoDismiss,\n withCloseOnSuccess,\n withDefaultVariant,\n withCloseButton,\n withArrow,\n withArrowTemplate,\n} from './popover-panel.config';\nexport { CngxPopoverPanel } from './popover-panel.component';\nexport { CngxPopoverAction, type PopoverActionVariant } from './popover-action.component';\nexport {\n CNGX_POPOVER_ARROW_BOUNDS,\n type CngxPopoverArrowBounds,\n} from './popover-arrow-bounds';\nexport {\n CngxPopoverArrow,\n type CngxPopoverArrowContext,\n CngxPopoverHeader,\n CngxPopoverBody,\n CngxPopoverFooter,\n CngxPopoverClose,\n CngxPopoverLoading,\n CngxPopoverEmpty,\n CngxPopoverError,\n} from './popover-panel-slots';\nexport { CngxPopoverDivider } from './popover-divider.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.CngxPopover","i1"],"mappings":";;;;;;;;;;;;;AAIA;;;;;;;AAOG;AACH,SAAS,mBAAmB,GAAA;AAC1B,IAAA,IAAI,OAAO,GAAG,KAAK,WAAW,EAAE;QAC9B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE;IAC5D;IACA,IAAI,GAAG,CAAC,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC,EAAE;QAC3C,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,eAAe,EAAE;IAC3D;IACA,IAAI,GAAG,CAAC,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE;QACxC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE;IACxD;IACA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE;AAC5D;AAEA;AACA,MAAM,cAAc,GAAG,mBAAmB,EAAE;AAE5C;AACO,MAAM,eAAe,GAAG,cAAc,CAAC,SAAS;AAEvD;AACO,MAAM,oBAAoB,GAAG,cAAc,CAAC,YAAY;AAE/D;;;;;;;;;;;;;;;;;AAiBG;AACI,MAAM,aAAa,GAAqC;AAC7D,IAAA,GAAG,EAAE,cAAc;AACnB,IAAA,WAAW,EAAE,gBAAgB;AAC7B,IAAA,SAAS,EAAE,eAAe;AAC1B,IAAA,MAAM,EAAE,iBAAiB;AACzB,IAAA,cAAc,EAAE,mBAAmB;AACnC,IAAA,YAAY,EAAE,kBAAkB;AAChC,IAAA,IAAI,EAAE,eAA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