@wildmason/aegis 2.0.0 → 2.2.0
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.
- package/CHANGELOG.md +353 -1
- package/dist/fesm2022/wildmason-aegis.mjs +914 -39
- package/dist/fesm2022/wildmason-aegis.mjs.map +1 -1
- package/dist/types/wildmason-aegis.d.ts +542 -23
- package/inputs.css +85 -6
- package/package.json +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wildmason-aegis.mjs","sources":["../../src/modal/modal.ts","../../src/modal/modal.html","../../src/dialog/dialog.ts","../../src/dialog/dialog.html","../../src/overlay/viewport-change.ts","../../src/overlay/anchored-scroll-strategy.ts","../../src/select/select.ts","../../src/select/select.html","../../src/popover/popover.ts","../../src/popover/popover.html","../../src/popover/auto-focus.directive.ts","../../src/tabs/tab.ts","../../src/tabs/tabs.ts","../../src/tabs/tabs.html","../../src/button/button.ts","../../src/button/button.html","../../src/checkbox/checkbox.ts","../../src/checkbox/checkbox.html","../../src/number-input/number-input.ts","../../src/number-input/number-input.html","../../src/toggle/toggle.ts","../../src/toggle/toggle.html","../../src/ghost-field/ghost-field.ts","../../src/page-header/page-header.ts","../../src/page-header/page-header.html","../../src/combobox/combobox-panel.ts","../../src/combobox/combobox-panel.html","../../src/combobox/combobox.ts","../../src/combobox/combobox.html","../../src/toast/toast.service.ts","../../src/toast/toast-container.ts","../../src/toast/toast-container.html","../../src/tooltip/tooltip-panel.ts","../../src/tooltip/aria-tokens.ts","../../src/tooltip/tooltip.ts","../../src/tooltip/rich-tooltip-panel.ts","../../src/tooltip/rich-tooltip.ts","../../src/index.ts","../../src/wildmason-aegis.ts"],"sourcesContent":["import { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { Component, HostListener, input, output, ChangeDetectionStrategy } from '@angular/core';\n\n/**\n * WmModal — Lightweight modal backdrop with Escape key and click-outside dismissal.\n *\n * Owns the fixed backdrop, centering, keyboard/pointer dismissal AND the focus trap,\n * so individual modal components don't need to repeat this logic or add their own\n * HostListeners.\n *\n * ## Focus is trapped here, and it has to be\n *\n * The trap lives on the wrapper INSIDE this component's `@if (visible())`, exactly as\n * `wm-dialog` does. That placement is not a style preference — it is the only placement\n * that works. `CdkTrapFocus.ngAfterContentInit` calls `attachAnchors()`, which is a\n * no-op unless the element already has a `parentNode`. An element the consumer projects\n * in through `<ng-content/>` does not have one at that moment, so a consumer-applied\n * `cdkTrapFocus` attaches zero anchors and silently traps nothing — `autoCapture` still\n * pulls focus in, which makes it look like it works, while Tab walks straight out the\n * back of the dialog. Three Helm surfaces shipped that way before it was measured.\n *\n * Consumers must therefore NOT add their own `cdkTrapFocus`; nesting a second trap\n * inside this one only creates a conflict. Consumers DO still own `role=\"dialog\"`,\n * `aria-modal` and the accessible name, because only they know what the dialog is.\n *\n * Usage:\n * <wm-modal [visible]=\"visible()\" (dismiss)=\"close()\">\n * <div class=\"p-6 wm-r-md w-80\" style=\"background: var(--wm-bg-raised)\">\n * <!-- modal panel content -->\n * </div>\n * </wm-modal>\n *\n * For top-aligned panels (e.g. search/command palettes), use align=\"top\":\n * <wm-modal [visible]=\"visible()\" (dismiss)=\"close()\" align=\"top\">\n *\n * The projected content is wrapped in a stop-propagation container so clicks inside\n * the panel do not bubble up to the backdrop and trigger a dismiss.\n */\n@Component({\n selector: 'wm-modal',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CdkTrapFocus],\n templateUrl: './modal.html',\n})\nexport class WmModal {\n /** Whether the modal is currently open. */\n visible = input.required<boolean>();\n\n /** Emitted when the user requests the modal to close (Escape or backdrop click). */\n dismiss = output<void>();\n\n /**\n * Vertical alignment of the panel within the backdrop.\n * - 'center' (default): panel is vertically centered (items-center)\n * - 'top': panel appears near the top (items-start pt-20), for search/command overlays\n */\n align = input<'center' | 'top'>('center');\n\n @HostListener('document:keydown.escape')\n onEscape(): void {\n if (this.visible()) this.dismiss.emit();\n }\n}\n","@if (visible()) {\n <div [class]=\"align() === 'top'\n ? 'fixed inset-0 flex items-start justify-center pt-20 z-50'\n : 'fixed inset-0 flex items-center justify-center z-50'\"\n style=\"background: var(--wm-modal-backdrop)\"\n (click)=\"dismiss.emit()\">\n <!-- The trap must sit on an element this template owns, inside this `@if`, so it\n has a parentNode by the time CdkTrapFocus runs ngAfterContentInit. A consumer\n cannot achieve that on projected content — see the class doc. -->\n <div (click)=\"$event.stopPropagation()\" cdkTrapFocus [cdkTrapFocusAutoCapture]=\"true\">\n <ng-content />\n </div>\n </div>\n}\n","import { Component, HostListener, input, model } from '@angular/core';\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\n\nexport type DialogSize = 'sm' | 'md' | 'lg';\n\n/**\n * WmDialog — Modal dialog with backdrop, focus trap, and Escape key handling.\n *\n * Renders a fixed-position overlay that is always viewport-relative (not clipped\n * by ancestor overflow:hidden). Do NOT place inside a container that uses\n * CSS transform, perspective, or filter — fixed positioning breaks in that context.\n *\n * Usage:\n * <wm-dialog [(isOpen)]=\"open\" title=\"Confirm action\">\n * <div body>\n * <p>Are you sure?</p>\n * <div class=\"wm-dialog-footer\">\n * <wm-button variant=\"secondary\" (click)=\"open.set(false)\">Cancel</wm-button>\n * <wm-button variant=\"primary\" (click)=\"onConfirm()\">Confirm</wm-button>\n * </div>\n * </div>\n * </wm-dialog>\n *\n * Accessibility:\n * - role=\"dialog\" + aria-modal=\"true\" on the panel\n * - aria-labelledby wired to the title element (when title is set)\n * - Focus is trapped inside the panel when open (cdkTrapFocus)\n * - Escape key closes the dialog\n * - Clicking the backdrop closes the dialog\n * - On close, focus returns to the element that opened the dialog\n * (browser default when focus trap is released)\n */\n@Component({\n selector: 'wm-dialog',\n templateUrl: './dialog.html',\n styleUrl: './dialog.css',\n imports: [CdkTrapFocus],\n})\nexport class WmDialog {\n /** Two-way binding for open/closed state. */\n isOpen = model(false);\n\n /** Dialog heading text. When set, aria-labelledby is applied automatically. */\n title = input('');\n\n /** Panel width preset. sm = 360px, md = 480px (default), lg = 640px. */\n size = input<DialogSize>('md');\n\n close(): void { this.isOpen.set(false); }\n\n @HostListener('document:keydown.escape')\n onEscape(): void {\n if (this.isOpen()) this.close();\n }\n}\n","@if (isOpen()) {\n <!-- Backdrop — click to close -->\n <div class=\"wm-dialog-backdrop\" (click)=\"close()\" aria-hidden=\"true\"></div>\n\n <!-- Panel -->\n <div\n class=\"wm-dialog\"\n [class]=\"'wm-dialog--' + size()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? 'wm-dialog-title' : null\"\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\"\n >\n <div class=\"wm-dialog-header\">\n <h2 class=\"wm-dialog-title\" id=\"wm-dialog-title\">{{ title() }}</h2>\n <button\n class=\"wm-dialog-close\"\n type=\"button\"\n (click)=\"close()\"\n aria-label=\"Close dialog\"\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"/>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"/>\n </svg>\n </button>\n </div>\n\n <div class=\"wm-dialog-body\">\n <ng-content select=\"[body]\" />\n </div>\n </div>\n}\n","/**\n * Notify a handler whenever anything that can move an anchored overlay moves.\n *\n * This exists because of one property of the DOM that CDK's `ScrollDispatcher`\n * does not account for: **`scroll` does not bubble.**\n *\n * `ScrollDispatcher` has exactly two sources. It listens for `scroll` on the\n * document in the *bubbling* phase, which therefore only ever hears the\n * document itself scrolling; and it hears containers that registered\n * themselves through a `cdkScrollable` directive. In an application shell that\n * is a fixed-height frame with an inner scrolling element — which is every\n * Wildmason product — the document never scrolls and nothing is registered, so\n * both sources are empty and any scroll strategy built on the dispatcher is a\n * silent no-op. The overlay keeps the coordinates it was born with while its\n * trigger scrolls out from under it.\n *\n * A **capture-phase** listener on the document sees the event from any\n * descendant, so nothing has to be annotated. Requiring every consumer to mark\n * their scroll containers — and failing invisibly when they forget — is not a\n * contract a design system should hand out.\n *\n * @param handler called on any scroll or resize while the subscription is live\n * @returns a function that removes exactly what was added\n */\nexport function onViewportChange(handler: () => void): () => void {\n // The capture flag must match between add and remove. A listener added with\n // capture and removed without it is never removed at all, and nothing\n // observable goes wrong until every scroll on the page is paying for\n // overlays that closed long ago.\n document.addEventListener('scroll', handler, true);\n window.addEventListener('resize', handler);\n\n return () => {\n document.removeEventListener('scroll', handler, true);\n window.removeEventListener('resize', handler);\n };\n}\n","import { OverlayRef, ScrollStrategy } from '@angular/cdk/overlay';\n\nimport { onViewportChange } from './viewport-change';\n\n/**\n * A scroll strategy that keeps a connected overlay anchored to its trigger,\n * including when the thing that scrolled was an ordinary `overflow: auto`\n * element rather than the document.\n *\n * CDK's own reposition strategy does the right thing and is simply never told:\n * it listens through `ScrollDispatcher`, which cannot hear a scroll from a\n * container that is not marked `cdkScrollable`. See `onViewportChange` for the\n * full account. This strategy listens in the capture phase instead, so the\n * consumer annotates nothing.\n */\nexport class WmAnchoredScrollStrategy implements ScrollStrategy {\n private overlayRef: OverlayRef | null = null;\n private release: (() => void) | null = null;\n\n attach(overlayRef: OverlayRef): void {\n this.overlayRef = overlayRef;\n }\n\n enable(): void {\n // enable() is called on every attach and can arrive more than once for one\n // overlay; a second subscription would reposition twice per scroll event.\n if (this.release) return;\n\n this.release = onViewportChange(() => {\n if (this.overlayRef?.hasAttached()) this.overlayRef.updatePosition();\n });\n }\n\n disable(): void {\n this.release?.();\n this.release = null;\n }\n\n detach(): void {\n this.disable();\n this.overlayRef = null;\n }\n}\n\n/*\n * Why each component holds its own instance rather than an application-wide\n * provider supplying one:\n *\n * A ScrollStrategy is inherently per-overlay. `attach()` stores a single\n * `overlayRef`, and `enable()` / `disable()` take no argument, so one shared\n * instance cannot tell two open overlays apart - a select inside a popover\n * would leave one of them anchored to the other. CDK's own strategies are\n * built by a factory for exactly this reason, and the only public token in\n * CDK 21, `CDK_CONNECTED_OVERLAY_DEFAULT_CONFIG`, carries an *instance*.\n *\n * So `wm-popover`, `wm-select` and `wm-combobox` each construct one. That also\n * makes the fix arrive with no setup: a consumer upgrading gets anchored\n * overlays without adding a provider, and an application that declares its own\n * `cdkConnectedOverlay` can pass `new WmAnchoredScrollStrategy()` to\n * `[cdkConnectedOverlayScrollStrategy]` the same way.\n *\n * `[wmTooltip]` does not use this - it owns its overlay directly and anchors\n * itself, including closing when its trigger is scrolled out of view.\n */\n","import {\n Component,\n ElementRef,\n computed,\n inject,\n input,\n model,\n signal,\n} from '@angular/core';\nimport { CdkConnectedOverlay, CdkOverlayOrigin, ConnectedPosition } from '@angular/cdk/overlay';\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { SelectOption } from './option';\nimport { WmAnchoredScrollStrategy } from '../overlay/anchored-scroll-strategy';\n\n/**\n * WmSelect — Accessible dropdown select built on Angular CDK Overlay.\n *\n * Provides a styled, keyboard-accessible alternative to the native <select> element\n * when you need custom option rendering or consistent cross-platform appearance.\n *\n * When to use:\n * - Single selection from a list of 4+ options\n * - When option labels are complex (icons, descriptions, status badges)\n * - When native <select> appearance is insufficient\n *\n * When NOT to use:\n * - 3 or fewer options → use a radio group (more scannable, no extra click)\n * - Multi-select → use a checkbox group or a combobox with chips\n * - Yes/No choices → use a Toggle or two radio buttons\n *\n * Options API:\n * options: SelectOption[] — Array of { value, label, disabled? } objects.\n *\n * Two-way binding:\n * <wm-select [(value)]=\"selectedValue\" [options]=\"myOptions\" />\n *\n * Accessibility:\n * - Trigger has role=\"combobox\", aria-expanded, aria-haspopup=\"listbox\"\n * - Panel has role=\"listbox\"; each option has role=\"option\" + aria-selected\n * - Disabled options have aria-disabled=\"true\"\n * - Focus is trapped inside the open panel (cdkTrapFocus)\n * - Clicking the backdrop closes the panel and returns focus to the trigger\n * - Keyboard: Enter/Space on trigger opens; Escape closes; arrow keys\n * navigate options (relies on natural tab order within the panel)\n * - Always pair with a visible label via <wm-label> or aria-label on the host\n */\n@Component({\n selector: 'wm-select',\n imports: [CdkConnectedOverlay, CdkOverlayOrigin, CdkTrapFocus],\n templateUrl: './select.html',\n styleUrl: './select.css',\n})\nexport class WmSelect {\n /**\n * Keeps the panel anchored to its trigger while an ancestor scrolls.\n *\n * One instance per component, because a ScrollStrategy holds a single\n * overlayRef and could not tell two open overlays apart. Without it the\n * panel takes CDK's default, which cannot hear a scroll from any container\n * that is not marked `cdkScrollable` - so in a fixed-height shell the panel\n * keeps the coordinates it was born with while the trigger scrolls away.\n */\n protected readonly scrollStrategy = new WmAnchoredScrollStrategy();\n\n /** Array of options to display. */\n options = input<SelectOption[]>([]);\n\n /** The currently selected value. Two-way bindable. */\n value = model<unknown>(null);\n\n /** Placeholder text shown when no option is selected. */\n placeholder = input('Select…');\n\n /** Disables the trigger and prevents the panel from opening. */\n disabled = input(false);\n\n protected isOpen = signal(false);\n\n protected selectedOption = computed(() =>\n this.options().find((o: SelectOption) => o.value === this.value()) ?? null\n );\n\n private hostEl = inject(ElementRef<HTMLElement>);\n\n protected get overlayWidth(): number {\n return this.hostEl.nativeElement.offsetWidth || 200;\n }\n\n protected positions: ConnectedPosition[] = [\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },\n ];\n\n protected toggleOpen(): void {\n if (!this.disabled()) {\n this.isOpen.update((v: boolean) => !v);\n }\n }\n\n protected selectOption(opt: SelectOption): void {\n if (!opt.disabled) {\n this.value.set(opt.value);\n this.isOpen.set(false);\n }\n }\n}\n","<!-- Trigger button — anchors the CDK overlay -->\n<div\n class=\"wm-select-host\"\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n>\n <button\n type=\"button\"\n role=\"combobox\"\n class=\"wm-select-trigger\"\n [class.is-open]=\"isOpen()\"\n [class.is-disabled]=\"disabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n aria-haspopup=\"listbox\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n [disabled]=\"disabled() || null\"\n (click)=\"toggleOpen()\"\n >\n <span class=\"wm-select-value\" [class.is-placeholder]=\"!selectedOption()\">\n {{ selectedOption()?.label ?? placeholder() }}\n </span>\n <!-- Chevron icon — rotates when open -->\n <svg\n class=\"wm-select-chevron\"\n [class.is-open]=\"isOpen()\"\n width=\"16\" height=\"16\" viewBox=\"0 0 24 24\"\n fill=\"none\" aria-hidden=\"true\"\n >\n <path d=\"M6 9l6 6 6-6\"\n stroke=\"currentColor\" stroke-width=\"2\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n\n<!-- Dropdown panel — rendered in CDK overlay container -->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"wm-select-backdrop\"\n (backdropClick)=\"isOpen.set(false)\"\n (detach)=\"isOpen.set(false)\"\n>\n <div\n class=\"wm-select-panel\"\n role=\"listbox\"\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\"\n >\n @for (opt of options(); track opt.value) {\n <button\n type=\"button\"\n role=\"option\"\n class=\"wm-select-option\"\n [class.is-selected]=\"opt.value === value()\"\n [class.is-disabled]=\"!!opt.disabled\"\n [attr.aria-selected]=\"opt.value === value()\"\n [attr.aria-disabled]=\"opt.disabled ? true : null\"\n [disabled]=\"opt.disabled || null\"\n (click)=\"selectOption(opt)\"\n >\n <span class=\"wm-select-option-label\">{{ opt.label }}</span>\n @if (opt.value === value()) {\n <!-- Checkmark for selected option -->\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <polyline points=\"20 6 9 17 4 12\"\n stroke=\"currentColor\" stroke-width=\"2.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n }\n </button>\n }\n </div>\n</ng-template>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Renderer2,\n ViewEncapsulation,\n effect,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { CdkConnectedOverlay, CdkOverlayOrigin, ConnectedPosition } from '@angular/cdk/overlay';\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { WmAnchoredScrollStrategy } from '../overlay/anchored-scroll-strategy';\n\n/**\n * WmPopover — general-purpose CDK-overlay floating panel.\n *\n * A low-level primitive for dropdowns, menus, pickers, and any floating UI.\n * The parent controls open/close state; this component handles positioning,\n * backdrop, focus-trapping, and ARIA attribute management.\n *\n * Slots:\n * - [trigger] — the anchor element (button, icon, etc.)\n * - [content] — the panel body (menu items, form, etc.)\n *\n * Usage:\n * ```html\n * <wm-popover\n * [isOpen]=\"open()\"\n * (closed)=\"open.set(false)\"\n * role=\"menu\"\n * ariaLabel=\"Options\"\n * hasPopup=\"menu\"\n * align=\"end\"\n * >\n * <button trigger (click)=\"open.set(!open())\">Options</button>\n * <div content role=\"menu\">\n * <button role=\"menuitem\" (click)=\"doThing()\">Do thing</button>\n * </div>\n * </wm-popover>\n * ```\n *\n * Accessibility:\n * - Trigger element automatically receives aria-haspopup, aria-expanded, aria-controls\n * - Panel receives the configured role and optional accessible name\n * - Focus is trapped inside the open panel (cdkTrapFocus)\n * - Escape key closes the panel\n * - Backdrop click closes the panel\n *\n * Auto-focus:\n * - Add [wmAutoFocus] to any element inside [content] to focus it on open.\n * Import WmAutoFocus from @wildmason/aegis/components and add it to your component's imports.\n */\n@Component({\n selector: 'wm-popover',\n imports: [CdkConnectedOverlay, CdkOverlayOrigin, CdkTrapFocus],\n templateUrl: './popover.html',\n styleUrl: './popover.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class WmPopover {\n /**\n * Keeps the panel anchored to its trigger while an ancestor scrolls.\n *\n * One instance per component, because a ScrollStrategy holds a single\n * overlayRef and could not tell two open overlays apart. Without it the\n * panel takes CDK's default, which cannot hear a scroll from any container\n * that is not marked `cdkScrollable` - so in a fixed-height shell the panel\n * keeps the coordinates it was born with while the trigger scrolls away.\n */\n protected readonly scrollStrategy = new WmAnchoredScrollStrategy();\n\n /** Whether the panel is currently open. */\n readonly isOpen = input<boolean>(false);\n\n /** Panel width in pixels, or 'auto' to match content. */\n readonly width = input<string | number>('auto');\n\n /** ARIA role for the floating panel element. Use 'menu', 'listbox', 'dialog', etc. */\n readonly role = input<string>('dialog');\n\n /**\n * Accessible name applied to the floating panel element.\n *\n * Dialog-style popovers must provide either this label or their own\n * equivalent labelling relationship. Keeping the name on the panel shell\n * ensures the trigger's aria-controls points to the named semantic surface.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /** Value for aria-haspopup on the trigger element. */\n readonly hasPopup = input<string | boolean>('dialog');\n\n /** Horizontal alignment: 'start' aligns left edges, 'end' aligns right edges. */\n readonly align = input<'start' | 'end'>('start');\n\n /**\n * Whether the focus trap auto-captures focus into the panel on attach\n * and restores it on detach. Defaults to `true`, which is right for\n * menu / picker / dialog popovers where the user expects the first\n * focusable item inside the panel to receive focus.\n *\n * Set to `false` for typeahead surfaces (combobox dropdowns, autocomplete\n * pickers) where focus must stay on the trigger input — auto-capture\n * pulls focus into the panel and its restore-on-detach behaviour can\n * re-fire the trigger's `(focus)` handler in a way that re-opens the\n * popover, leaving the CDK overlay backdrop stuck on top of subsequent\n * clicks. The trap still constrains Tab/Shift+Tab cycling within the\n * panel when it has focus; this only opts out of the auto-capture and\n * auto-restore.\n */\n readonly trapFocusAutoCapture = input<boolean>(true);\n\n /** Emitted when the panel should close (backdrop click, Escape key, CDK detach). */\n readonly closed = output<void>();\n\n private readonly renderer = inject(Renderer2);\n private readonly hostEl = inject(ElementRef);\n private readonly cdr = inject(ChangeDetectorRef);\n\n protected readonly panelId = 'wm-popover-' + Math.random().toString(36).substring(2, 9);\n protected readonly panel = viewChild<ElementRef<HTMLElement>>('panel');\n\n constructor() {\n effect(() => {\n const open = this.isOpen();\n const popup = this.hasPopup();\n this.cdr.markForCheck();\n\n const el: Element | null = this.hostEl.nativeElement.querySelector('[trigger]');\n if (!el) return;\n\n this.renderer.setAttribute(el, 'aria-haspopup', String(popup));\n this.renderer.setAttribute(el, 'aria-expanded', String(open));\n this.renderer.setAttribute(el, 'aria-controls', this.panelId);\n\n if (!el.getAttribute('role')) {\n this.renderer.setAttribute(el, 'role', 'button');\n }\n });\n }\n\n protected get positions(): ConnectedPosition[] {\n const x = this.align();\n return [\n { originX: x, originY: 'bottom', overlayX: x, overlayY: 'top', offsetY: 4 },\n { originX: x, originY: 'top', overlayX: x, overlayY: 'bottom', offsetY: -4 },\n ];\n }\n\n protected onAttach(): void {\n setTimeout(() => {\n const panelEl = this.panel();\n if (!panelEl) return;\n const el = panelEl.nativeElement.querySelector('[wmAutoFocus]') as HTMLElement | null;\n if (!el) return;\n el.focus();\n if (typeof (el as any).showPicker === 'function') {\n const type = (el as HTMLInputElement).type;\n if (el.tagName === 'SELECT' || ['date', 'time', 'color'].includes(type)) {\n try { (el as any).showPicker(); } catch { /* ignore */ }\n }\n }\n }, 10);\n }\n\n protected onClose(): void {\n this.closed.emit();\n }\n}\n","<!-- Trigger anchor -->\n<div cdkOverlayOrigin #origin=\"cdkOverlayOrigin\" class=\"wm-popover-trigger\">\n <ng-content select=\"[trigger]\"></ng-content>\n</div>\n\n<!-- Floating panel -->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"onClose()\"\n (detach)=\"onClose()\"\n (attach)=\"onAttach()\"\n>\n <div\n #panel\n [id]=\"panelId\"\n [attr.role]=\"role()\"\n [attr.aria-label]=\"ariaLabel()\"\n class=\"wm-popover-panel\"\n [style.width]=\"width() === 'auto' ? 'auto' : width() + 'px'\"\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"trapFocusAutoCapture()\"\n (keydown.escape)=\"onClose()\"\n >\n <ng-content select=\"[content]\"></ng-content>\n </div>\n</ng-template>\n","import { AfterViewInit, Directive, ElementRef, Input, inject } from '@angular/core';\n\n/**\n * WmAutoFocus — focuses an element when it enters the DOM.\n *\n * Usage: add [wmAutoFocus] to any focusable element inside a <wm-popover> panel.\n * For date/time/color/select inputs, also attempts to open the native picker UI.\n *\n * @example\n * <input wmAutoFocus type=\"text\" />\n * <input [wmAutoFocus]=\"shouldFocus\" type=\"date\" />\n */\n@Directive({\n selector: '[wmAutoFocus]',\n})\nexport class WmAutoFocus implements AfterViewInit {\n @Input('wmAutoFocus') enabled: boolean | '' = true;\n\n readonly #el = inject(ElementRef<HTMLElement>);\n\n ngAfterViewInit(): void {\n if (this.enabled === false) return;\n\n setTimeout(() => {\n const el = this.#el.nativeElement;\n if (!el) return;\n\n el.focus();\n\n const isPickerType =\n el.tagName === 'SELECT' ||\n (el.tagName === 'INPUT' &&\n ['date', 'time', 'color', 'datetime-local', 'month', 'week'].includes(\n (el as HTMLInputElement).type\n ));\n\n if (isPickerType && typeof (el as any).showPicker === 'function') {\n try {\n (el as any).showPicker();\n } catch {\n // Browser may reject showPicker() if not triggered by user gesture\n }\n }\n }, 50);\n }\n}\n","import { Component, ChangeDetectionStrategy, input, viewChild, TemplateRef } from '@angular/core';\n\n@Component({\n selector: 'wm-tab',\n template: `<ng-template #tmpl><ng-content /></ng-template>`,\n host: { style: 'display: none' },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WmTab {\n readonly value = input.required<string>();\n\n /**\n * Keeps a prerequisite-gated tab discoverable while preventing activation.\n * Unlike a native disabled button, unavailable tabs remain in the roving\n * focus order so keyboard and assistive-technology users can learn why the\n * destination cannot be opened yet.\n */\n readonly unavailable = input(false);\n\n /** Exact prerequisite guidance exposed to both pointer and AT users. */\n readonly unavailableReason = input('');\n\n /** Render a non-interactive group divider immediately before this tab. */\n readonly separatorBefore = input(false);\n\n readonly tmpl = viewChild.required<TemplateRef<void>>('tmpl');\n}\n","import { Component, ChangeDetectionStrategy, input, output, signal, contentChildren } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { WmTab } from './tab';\n\n@Component({\n selector: 'wm-tabs',\n templateUrl: './tabs.html',\n styleUrl: './tabs.css',\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WmTabs {\n activeValue = input.required<string>();\n variant = input<'line' | 'pill'>('line');\n\n readonly select = output<string>();\n\n protected readonly tabs = contentChildren(WmTab);\n protected focusedIndex = signal<number | null>(null);\n\n protected selectTab(tab: WmTab, index: number): void {\n this.focusedIndex.set(index);\n if (!tab.unavailable()) this.select.emit(tab.value());\n }\n\n protected onBlur(): void {\n setTimeout(() => {\n if (!document.activeElement?.closest('.wm-tabs')) {\n this.focusedIndex.set(null);\n }\n }, 0);\n }\n\n protected onKeyDown(event: KeyboardEvent, container: HTMLElement): void {\n const tabs = this.tabs();\n if (tabs.length === 0) return;\n const activeIndex = tabs.findIndex(t => t.value() === this.activeValue());\n const currentIndex = this.focusedIndex() ?? (activeIndex >= 0 ? activeIndex : 0);\n let nextIndex: number | null = null;\n\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowDown':\n nextIndex = (currentIndex + 1) % tabs.length;\n break;\n case 'ArrowLeft':\n case 'ArrowUp':\n nextIndex = (currentIndex - 1 + tabs.length) % tabs.length;\n break;\n case 'Home': nextIndex = 0; break;\n case 'End': nextIndex = tabs.length - 1; break;\n }\n\n if (nextIndex !== null) {\n event.preventDefault();\n this.focusedIndex.set(nextIndex);\n const btns = container.querySelectorAll<HTMLButtonElement>('[role=\"tab\"]');\n btns[nextIndex]?.focus();\n }\n }\n}\n","<div\n class=\"wm-tabs\"\n [class.wm-tabs--line]=\"variant() === 'line'\"\n [class.wm-tabs--pill]=\"variant() === 'pill'\"\n role=\"tablist\"\n #container\n (keydown)=\"onKeyDown($event, container)\"\n>\n @for (tab of tabs(); track tab.value(); let i = $index) {\n @if (tab.separatorBefore()) {\n <span\n class=\"wm-tab-separator\"\n role=\"separator\"\n aria-orientation=\"vertical\"\n ></span>\n }\n <button\n type=\"button\"\n role=\"tab\"\n class=\"wm-tab\"\n [id]=\"'wm-tab-' + tab.value()\"\n [attr.aria-selected]=\"activeValue() === tab.value()\"\n [attr.aria-controls]=\"'wm-panel-' + tab.value()\"\n [attr.aria-disabled]=\"tab.unavailable() ? true : null\"\n [attr.aria-description]=\"tab.unavailable() ? tab.unavailableReason() : null\"\n [attr.title]=\"tab.unavailable() ? tab.unavailableReason() : null\"\n [tabIndex]=\"(focusedIndex() === null ? activeValue() === tab.value() : focusedIndex() === i) ? 0 : -1\"\n [class.is-active]=\"activeValue() === tab.value()\"\n [class.is-unavailable]=\"tab.unavailable()\"\n (click)=\"selectTab(tab, i)\"\n (focus)=\"focusedIndex.set(i)\"\n (blur)=\"onBlur()\"\n >\n <ng-container [ngTemplateOutlet]=\"tab.tmpl()\" />\n </button>\n }\n</div>\n","import { Component, computed, input } from '@angular/core';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'destructive' | 'flat';\nexport type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';\n\n@Component({\n selector: 'wm-button',\n templateUrl: './button.html',\n styleUrl: './button.css',\n})\nexport class WmButton {\n readonly variant = input<ButtonVariant>('primary');\n readonly size = input<ButtonSize>('md');\n readonly disabled = input(false);\n readonly type = input<'button' | 'submit' | 'reset'>('button');\n\n /** Makes the button square (equal width/height). Use for icon-only buttons. */\n readonly iconOnly = input(false);\n\n /** Accessible label forwarded to the inner <button>. Required for icon-only buttons. */\n readonly ariaLabel = input('');\n\n /** Tooltip text forwarded to the inner <button>. Named btnTitle to avoid native attribute conflict. */\n readonly btnTitle = input('');\n\n protected readonly btnClass = computed(() => {\n const base = `wm-btn wm-btn--${this.variant()} wm-btn--${this.size()}`;\n return this.iconOnly() ? `${base} btn-icon-only` : base;\n });\n}\n","<button\n [class]=\"btnClass()\"\n [disabled]=\"disabled()\"\n [type]=\"type()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.title]=\"btnTitle() || null\"\n>\n <ng-content />\n</button>\n","import { Component, computed, input, model } from '@angular/core';\n\n/**\n * WmCheckbox — Boolean selection control with optional indeterminate state.\n *\n * When to use:\n * - Multi-select lists (each item is independent)\n * - Form options that require explicit confirmation before taking effect\n * - Parent/child hierarchical selection (use indeterminate for \"some selected\")\n *\n * When NOT to use:\n * - Mutually exclusive choices → use radio buttons instead\n * - Immediate-effect toggles (e.g. dark mode) → use Toggle instead\n *\n * Accessibility:\n * - role=\"checkbox\" with aria-checked=\"true|false|mixed\"\n * - \"mixed\" maps to the indeterminate state for screen readers\n * - Space activates the checkbox (native button behaviour)\n * - Focus ring uses a double-ring (canvas gap + accent) pattern for maximum visibility\n * across all themes, meeting WCAG 2.1 SC 1.4.11 Non-text Contrast\n * - When wrapping in a group, add role=\"group\" + aria-labelledby to the container\n */\n@Component({\n selector: 'wm-checkbox',\n templateUrl: './checkbox.html',\n styleUrl: './checkbox.css',\n})\nexport class Checkbox {\n /** Two-way bindable checked state. */\n checked = model(false);\n\n /**\n * Shows a dash icon instead of a checkmark. Typically used for a \"select all\"\n * checkbox when only some child items are selected.\n * Note: indeterminate is display-only — clicking always toggles to true/false.\n */\n indeterminate = input(false);\n\n /** Visible text label rendered next to the checkbox box. */\n label = input('');\n\n disabled = input(false);\n\n /** Maps to aria-checked: true, false, or \"mixed\" (for indeterminate). */\n protected ariaChecked = computed<boolean | 'mixed'>(() => {\n if (this.indeterminate() && !this.checked()) return 'mixed';\n return this.checked();\n });\n\n toggle(): void {\n if (!this.disabled()) {\n this.checked.update(v => !v);\n }\n }\n}\n","<label class=\"wm-checkbox-wrap\" [class.is-disabled]=\"disabled()\">\n <button\n type=\"button\"\n role=\"checkbox\"\n class=\"wm-checkbox-box\"\n [class.is-checked]=\"checked()\"\n [class.is-indeterminate]=\"indeterminate() && !checked()\"\n [attr.aria-checked]=\"ariaChecked()\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n [disabled]=\"disabled() || null\"\n (click)=\"toggle()\"\n (keydown.space)=\"$event.preventDefault(); toggle()\"\n >\n @if (indeterminate() && !checked()) {\n <!-- Dash for indeterminate (\"some selected\") state -->\n <svg class=\"wm-checkbox-icon\" viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n <line x1=\"2\" y1=\"6\" x2=\"10\" y2=\"6\"\n stroke=\"currentColor\" stroke-width=\"2.25\" stroke-linecap=\"round\"/>\n </svg>\n } @else if (checked()) {\n <!-- Animated checkmark for selected state -->\n <svg class=\"wm-checkbox-icon\" viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n <polyline class=\"check-mark\" points=\"2,6.5 4.5,9 10,3\"\n fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n }\n </button>\n\n @if (label()) {\n <span class=\"wm-checkbox-label\">{{ label() }}</span>\n }\n</label>\n","import {\n Component,\n ElementRef,\n forwardRef,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/**\n * WmNumberInput — Numeric input with stepper buttons.\n *\n * Implements ControlValueAccessor so it works with both template-driven forms\n * (ngModel) and reactive forms (formControl / formControlName).\n *\n * When to use:\n * - Quantity fields (items in cart, repetitions, page count)\n * - Bounded numeric settings with a known min/max (timeout seconds, font size)\n *\n * When NOT to use:\n * - Free-form numeric entry without bounds → plain <input type=\"number\">\n * - Currency or phone numbers → use a text input with masking\n *\n * Accessibility:\n * - The underlying <input type=\"number\"> is the focusable control.\n * - Stepper buttons have tabindex=\"-1\" — they are mouse/touch targets only.\n * Keyboard users use the arrow keys on the input itself (native browser behaviour).\n * - Always provide an aria-label or visible label via <wm-field> + <wm-label>.\n * - The buttons use mousedown + preventDefault to avoid stealing focus from the input.\n *\n * Form integration:\n * <!-- Template-driven -->\n * <wm-number-input [(ngModel)]=\"count\" [min]=\"0\" [max]=\"100\" />\n *\n * <!-- Reactive -->\n * <wm-number-input formControlName=\"quantity\" [step]=\"5\" />\n */\n@Component({\n selector: 'wm-number-input',\n templateUrl: './number-input.html',\n styleUrl: './number-input.css',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NumberInput),\n multi: true,\n },\n ],\n})\nexport class NumberInput implements ControlValueAccessor {\n /** Minimum allowed value. */\n min = input<number | null>(null);\n\n /** Maximum allowed value. */\n max = input<number | null>(null);\n\n /** Amount to increment/decrement per step. Defaults to 1. */\n step = input(1);\n\n /** Placeholder text shown when the field is empty. */\n placeholder = input('0');\n\n /** Disables the control from the template. Also set automatically by reactive forms. */\n disabled = input(false);\n\n protected inputRef = viewChild<ElementRef<HTMLInputElement>>('inputEl');\n protected internalValue = signal<number | null>(null);\n\n private onChangeFn: (v: number | null) => void = () => {};\n protected onTouchedFn: () => void = () => {};\n\n /** CVA interface — called when the form model changes programmatically. */\n writeValue(value: number | null): void {\n this.internalValue.set(value ?? null);\n }\n\n registerOnChange(fn: (v: number | null) => void): void {\n this.onChangeFn = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouchedFn = fn;\n }\n\n protected onInputChange(event: Event): void {\n const raw = (event.target as HTMLInputElement).value;\n const num = raw === '' ? null : parseFloat(raw);\n this.internalValue.set(num);\n this.onChangeFn(num);\n this.onTouchedFn();\n }\n\n protected increment(): void {\n const curr = this.internalValue() ?? 0;\n const next = curr + this.step();\n const max = this.max();\n this.setValue(max !== null ? Math.min(next, max) : next);\n }\n\n protected decrement(): void {\n const curr = this.internalValue() ?? 0;\n const next = curr - this.step();\n const min = this.min();\n this.setValue(min !== null ? Math.max(next, min) : next);\n }\n\n /**\n * Prevents the stepper buttons from stealing focus away from the input element.\n * Without this, clicking a button would blur the input, hiding any validation state.\n */\n protected preventFocusSteal(event: MouseEvent): void {\n event.preventDefault();\n }\n\n private setValue(val: number): void {\n this.internalValue.set(val);\n this.onChangeFn(val);\n this.onTouchedFn();\n const el = this.inputRef();\n if (el) el.nativeElement.value = String(val);\n }\n}\n","<!--\n Uses .wm-input-group and .wm-number-* classes from inputs.css.\n The input fills the group; the controls column sits at the trailing edge.\n-->\n<div\n class=\"wm-input-group wm-number-field\"\n [class.is-disabled]=\"disabled()\"\n>\n <input\n #inputEl\n type=\"number\"\n class=\"wm-input-bare wm-number-input\"\n [value]=\"internalValue() ?? ''\"\n [placeholder]=\"placeholder()\"\n [attr.min]=\"min() ?? null\"\n [attr.max]=\"max() ?? null\"\n [step]=\"step()\"\n [disabled]=\"disabled() || null\"\n (change)=\"onInputChange($event)\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onTouchedFn()\"\n />\n\n <div class=\"wm-number-controls\" aria-hidden=\"true\">\n <button\n type=\"button\"\n class=\"wm-number-btn\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || null\"\n (mousedown)=\"preventFocusSteal($event)\"\n (click)=\"increment()\"\n aria-label=\"Increment\"\n >\n <!-- chevron-up (lucide) -->\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"m18 15-6-6-6 6\"/>\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wm-number-btn\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || null\"\n (mousedown)=\"preventFocusSteal($event)\"\n (click)=\"decrement()\"\n aria-label=\"Decrement\"\n >\n <!-- chevron-down (lucide) -->\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"m6 9 6 6 6-6\"/>\n </svg>\n </button>\n </div>\n</div>\n","import { Component, input, model } from '@angular/core';\n\n/**\n * WmToggle — Binary on/off control.\n *\n * Use for settings that take effect immediately without a form submit.\n * For settings that need an explicit \"Save\" action, prefer a checkbox.\n *\n * Accessibility:\n * - role=\"switch\" communicates binary state to screen readers\n * - aria-checked reflects true/false\n * - aria-label required when no visible text label surrounds the toggle\n * - Space and Enter activate the toggle (native button behaviour)\n * - When disabled, aria state is preserved so SR users understand why it can't be changed\n */\n@Component({\n selector: 'wm-toggle',\n templateUrl: './toggle.html',\n styleUrl: './toggle.css',\n})\nexport class Toggle {\n /** Two-way bindable state. Use [(checked)]=\"mySignal\" or [checked]=\"val\" (changeChecked)=\"val=$event\". */\n checked = model(false);\n\n /** Visually and functionally disables the toggle. State is still readable by assistive tech. */\n disabled = input(false);\n\n /** Accessible label. Required if no visible label text surrounds the toggle in the DOM. */\n ariaLabel = input('Toggle');\n\n toggle(): void {\n if (!this.disabled()) {\n this.checked.update(v => !v);\n }\n }\n}\n","<button\n type=\"button\"\n role=\"switch\"\n class=\"wm-toggle\"\n [class.is-on]=\"checked()\"\n [class.is-disabled]=\"disabled()\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n [disabled]=\"disabled() || null\"\n (click)=\"toggle()\"\n>\n <span class=\"wm-toggle-track\" aria-hidden=\"true\">\n <span class=\"wm-toggle-thumb\"></span>\n </span>\n</button>\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n/**\n * GhostField — transparent-until-hover wrapper for inline-editable fields.\n *\n * Applies .wm-ghost-field to its content; all visual behaviour is CSS-driven\n * (inputs.css). No inputs or outputs — interactivity belongs to the inner\n * element projected via ng-content.\n *\n * Usage:\n * <wm-ghost-field>\n * <input class=\"wm-input-bare\" [(ngModel)]=\"title\" aria-label=\"Task title\" />\n * </wm-ghost-field>\n */\n@Component({\n selector: 'wm-ghost-field',\n standalone: true,\n template: `<div class=\"wm-ghost-field\"><ng-content /></div>`,\n encapsulation: ViewEncapsulation.None,\n})\nexport class GhostField {}\n","import { Component, ChangeDetectionStrategy, ViewEncapsulation, input } from '@angular/core';\n\n/**\n * PageHeader — standardised page-level heading with eyebrow label, title,\n * optional subtitle, optional status badge, and projected action/back slots.\n *\n * Slots:\n * [icon] — 12×12 icon projected into the eyebrow row (optional)\n * [back] — back-navigation element (link or button) placed in the status row (optional)\n * default — action buttons / controls placed below the status row\n *\n * Usage:\n * <wm-page-header flavourText=\"Sprints\" title=\"Active Sprint\" [badgeLabel]=\"daysLeft\">\n * <svg icon .../>\n * <a back href=\"...\">← Board</a>\n * <wm-button>New Sprint</wm-button>\n * </wm-page-header>\n */\n@Component({\n selector: 'wm-page-header',\n standalone: true,\n templateUrl: './page-header.html',\n styleUrl: './page-header.css',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PageHeader {\n readonly flavourText = input.required<string>();\n readonly title = input.required<string>();\n readonly subtitle = input<string>();\n readonly badgeLabel = input<string>();\n}\n","<header class=\"wm-page-header\">\n <div class=\"wm-page-header__left\">\n <div class=\"wm-page-header__eyebrow\">\n <ng-content select=\"[icon]\" />\n <span>{{ flavourText() }}</span>\n </div>\n <h2 class=\"wm-page-header__title\">{{ title() }}</h2>\n @if (subtitle()) {\n <p class=\"wm-page-header__subtitle\">{{ subtitle() }}</p>\n }\n </div>\n\n <div class=\"wm-page-header__right\">\n <div class=\"wm-page-header__status\">\n @if (badgeLabel()) {\n <span class=\"wm-page-header__badge\">{{ badgeLabel() }}</span>\n }\n <ng-content select=\"[back]\" />\n </div>\n <div class=\"wm-page-header__actions\">\n <ng-content />\n </div>\n </div>\n</header>\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewChild,\n computed,\n effect,\n input,\n output,\n} from '@angular/core';\nimport { CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';\nimport { ComboboxOption } from './option';\n\n/** Module-level counter for unique panel instance IDs. */\nlet nextPanelId = 0;\n\n/**\n * Segment of an option label, split by filter-query matches.\n * `match: true` means this segment matched the query and should be bolded.\n */\ninterface LabelSegment {\n text: string;\n match: boolean;\n}\n\n/**\n * Internal sub-component that renders the virtual-scrolled option list\n * inside the WmCombobox's CDK overlay. NOT exported from Aegis.\n */\n@Component({\n selector: 'wm-combobox-panel',\n imports: [ScrollingModule],\n templateUrl: './combobox-panel.html',\n styleUrl: './combobox-panel.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ComboboxPanel {\n /** Filtered options to display. */\n readonly options = input<ComboboxOption[]>([]);\n\n /** Index of the keyboard-highlighted option (-1 = none). */\n readonly highlightIndex = input(-1);\n\n /** Values currently selected (for checkmark display). */\n readonly selectedValues = input<Set<unknown>>(new Set());\n\n /** Whether the parent is multi-select. */\n readonly multiple = input(false);\n\n /** Pixel height per row. */\n readonly itemHeight = input(36);\n\n /** Max panel height in pixels. */\n readonly maxHeight = input(256);\n\n /** Current filter text — used for match highlighting in labels. */\n readonly filterQuery = input('');\n\n /** Show spinner when async filter is pending. */\n readonly loading = input(false);\n\n /** Shown in empty state when freeform input is enabled. */\n readonly freeformHint = input('');\n\n /** Emitted on mousedown (not click) to prevent focus steal. */\n readonly optionClicked = output<{ option: ComboboxOption; index: number }>();\n\n @ViewChild(CdkVirtualScrollViewport)\n private viewport?: CdkVirtualScrollViewport;\n\n /** Unique instance ID for generating DOM IDs. */\n private readonly instanceId = nextPanelId++;\n\n /** The DOM ID of the listbox element — used by parent for aria-controls. */\n readonly listboxId = `wm-combobox-${this.instanceId}-listbox`;\n\n /** Computed viewport height: min of (options * itemHeight) and maxHeight. */\n protected readonly viewportHeight = computed(() => {\n const count = this.options().length;\n return Math.min(count * this.itemHeight(), this.maxHeight());\n });\n\n /** Whether to show the empty state. */\n protected readonly showEmpty = computed(\n () => this.options().length === 0 && !this.loading()\n );\n\n /** Text for the empty state. */\n protected readonly emptyText = computed(\n () => this.freeformHint() || 'No matches'\n );\n\n /**\n * Precomputed label segments for each option, split by the current filter query.\n * Recomputes whenever options or filterQuery changes.\n */\n protected readonly segmentedLabels = computed(() => {\n const query = this.filterQuery().trim();\n return this.options().map(opt => this.splitLabel(opt.label, query));\n });\n\n /** Map from option value to a stable key for DOM IDs. */\n private optionKeyMap = new Map<unknown, string>();\n private nextObjectIndex = 0;\n\n constructor() {\n // Scroll the highlighted option into view whenever highlightIndex changes.\n effect(() => {\n const idx = this.highlightIndex();\n if (idx >= 0 && this.viewport) {\n this.viewport.scrollToIndex(idx);\n }\n });\n }\n\n /** Returns a stable DOM ID for the option at the given index. */\n optionIdAt(index: number): string {\n const opts = this.options();\n if (index < 0 || index >= opts.length) {\n return '';\n }\n return `wm-combobox-${this.instanceId}-opt-${this.keyFor(opts[index].value)}`;\n }\n\n /** Handle mousedown on an option — emits event and prevents default. */\n protected onOptionMousedown(event: MouseEvent, option: ComboboxOption, index: number): void {\n event.preventDefault();\n if (!option.disabled) {\n this.optionClicked.emit({ option, index });\n }\n }\n\n /** Check whether a value is currently selected. */\n protected isSelected(value: unknown): boolean {\n return this.selectedValues().has(value);\n }\n\n /** Get label segments for the option at the given virtual-scroll index. */\n protected segmentsAt(index: number): LabelSegment[] {\n return this.segmentedLabels()[index] ?? [{ text: '', match: false }];\n }\n\n /**\n * Returns a stable string key for an option value.\n * Strings/numbers use the value directly. Objects use a monotonic index.\n */\n private keyFor(value: unknown): string {\n if (typeof value === 'string' || typeof value === 'number') {\n return String(value);\n }\n let key = this.optionKeyMap.get(value);\n if (key == null) {\n key = `obj-${this.nextObjectIndex++}`;\n this.optionKeyMap.set(value, key);\n }\n return key;\n }\n\n /**\n * Split a label into segments where the query matches (case-insensitive).\n * Returns an array of { text, match } segments.\n */\n private splitLabel(label: string, query: string): LabelSegment[] {\n if (!query) {\n return [{ text: label, match: false }];\n }\n const segments: LabelSegment[] = [];\n const lowerLabel = label.toLowerCase();\n const lowerQuery = query.toLowerCase();\n let cursor = 0;\n while (cursor < label.length) {\n const matchIndex = lowerLabel.indexOf(lowerQuery, cursor);\n if (matchIndex === -1) {\n segments.push({ text: label.slice(cursor), match: false });\n break;\n }\n if (matchIndex > cursor) {\n segments.push({ text: label.slice(cursor, matchIndex), match: false });\n }\n segments.push({\n text: label.slice(matchIndex, matchIndex + query.length),\n match: true,\n });\n cursor = matchIndex + query.length;\n }\n return segments;\n }\n}\n","@if (loading()) {\n <div class=\"wm-cb-loading\" aria-live=\"polite\">\n <svg\n class=\"wm-cb-spinner\"\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"\n fill=\"none\" aria-hidden=\"true\"\n >\n <circle\n cx=\"10\" cy=\"10\" r=\"8\"\n stroke=\"currentColor\" stroke-width=\"2\"\n stroke-dasharray=\"40 60\"\n stroke-linecap=\"round\"\n />\n </svg>\n <span class=\"wm-cb-loading-text\">Loading…</span>\n </div>\n} @else if (showEmpty()) {\n <div class=\"wm-cb-empty\" aria-live=\"polite\">{{ emptyText() }}</div>\n} @else {\n <cdk-virtual-scroll-viewport\n [itemSize]=\"itemHeight()\"\n [style.height.px]=\"viewportHeight()\"\n class=\"wm-cb-viewport\"\n >\n <div\n [id]=\"listboxId\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"multiple() ? true : null\"\n >\n <div\n *cdkVirtualFor=\"let opt of options(); let i = index\"\n role=\"option\"\n class=\"wm-cb-option\"\n [id]=\"optionIdAt(i)\"\n [class.is-highlighted]=\"i === highlightIndex()\"\n [class.is-selected]=\"isSelected(opt.value)\"\n [class.is-disabled]=\"!!opt.disabled\"\n [attr.aria-selected]=\"isSelected(opt.value)\"\n [attr.aria-disabled]=\"opt.disabled ? true : null\"\n (mousedown)=\"onOptionMousedown($event, opt, i)\"\n >\n <span class=\"wm-cb-option-label\">\n @for (seg of segmentsAt(i); track $index) {\n @if (seg.match) {\n <b class=\"wm-cb-match\">{{ seg.text }}</b>\n } @else {\n {{ seg.text }}\n }\n }\n </span>\n @if (isSelected(opt.value)) {\n <svg\n class=\"wm-cb-check\"\n width=\"14\" height=\"14\" viewBox=\"0 0 24 24\"\n fill=\"none\" aria-hidden=\"true\"\n >\n <polyline\n points=\"20 6 9 17 4 12\"\n stroke=\"currentColor\" stroke-width=\"2.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"\n />\n </svg>\n }\n </div>\n </div>\n </cdk-virtual-scroll-viewport>\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n OnDestroy,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n CdkConnectedOverlay,\n CdkOverlayOrigin,\n ConnectedPosition,\n} from '@angular/cdk/overlay';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {\n Subject,\n Subscription,\n debounceTime,\n switchMap,\n catchError,\n of,\n finalize,\n} from 'rxjs';\nimport { ComboboxOption } from './option';\nimport { ComboboxPanel } from './combobox-panel';\nimport { WmAnchoredScrollStrategy } from '../overlay/anchored-scroll-strategy';\n\n/**\n * WmCombobox — Accessible combobox with filtering, single/multi-select,\n * freeform entry, chips, and virtual-scrolled panel.\n *\n * Built on Angular CDK Overlay and the WAI-ARIA APG combobox pattern.\n * DOM focus ALWAYS stays on the input; assistive tech focus moves via\n * `aria-activedescendant`.\n *\n * Implements ControlValueAccessor for both template-driven and reactive forms.\n *\n * Usage:\n * <!-- Single-select -->\n * <wm-combobox [options]=\"opts\" [(value)]=\"selected\" />\n *\n * <!-- Multi-select with chips -->\n * <wm-combobox [options]=\"opts\" [(values)]=\"selectedIds\" [multiple]=\"true\" />\n *\n * <!-- Async filter -->\n * <wm-combobox [options]=\"opts\" [filterFn]=\"searchApi\" />\n *\n * <!-- Reactive form -->\n * <wm-combobox formControlName=\"tag\" [options]=\"tags\" />\n */\n@Component({\n selector: 'wm-combobox',\n imports: [CdkConnectedOverlay, CdkOverlayOrigin, ComboboxPanel],\n templateUrl: './combobox.html',\n styleUrl: './combobox.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WmCombobox),\n multi: true,\n },\n ],\n})\nexport class WmCombobox implements ControlValueAccessor, OnDestroy {\n /**\n * Keeps the panel anchored to its trigger while an ancestor scrolls.\n *\n * One instance per component, because a ScrollStrategy holds a single\n * overlayRef and could not tell two open overlays apart. Without it the\n * panel takes CDK's default, which cannot hear a scroll from any container\n * that is not marked `cdkScrollable` - so in a fixed-height shell the panel\n * keeps the coordinates it was born with while the trigger scrolls away.\n */\n protected readonly scrollStrategy = new WmAnchoredScrollStrategy();\n\n // ── Public inputs ──────────────────────────────────────────────────────\n\n /** Full option list (before filtering). */\n readonly options = input<ComboboxOption[]>([]);\n\n /** Selected value (single-select). Two-way bindable. */\n readonly value = model<unknown>(null);\n\n /** Selected values (multi-select). Two-way bindable. */\n readonly values = model<unknown[]>([]);\n\n /** Enable multi-select mode with chips. */\n readonly multiple = input(false);\n\n /** Allow typed text to be accepted as a freeform value. */\n readonly allowFreeform = input(false);\n\n /** Placeholder text for the input. */\n readonly placeholder = input('Search\\u2026');\n\n /**\n * Accessible name for the combobox input.\n *\n * Required unless `ariaLabelledby` is supplied. The host `<wm-combobox>` is\n * not a labelable element, so a consumer's `<label for=\"\\u2026\">` cannot reach the\n * inner input \\u2014 and the placeholder is blanked as soon as a chip is selected,\n * so in multi-select mode there is otherwise no accessible name at all once\n * the user picks anything.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /**\n * ID of a visible element that names this combobox. Prefer this over\n * `ariaLabel` when a visible caption exists, so the accessible name matches\n * the visible text (WCAG 2.5.3, Label in Name).\n */\n readonly ariaLabelledby = input<string | null>(null);\n\n /** Disable the combobox. */\n readonly disabled = input(false);\n\n /** Custom async filter function. Overrides default substring matching. */\n readonly filterFn = input<\n ((query: string) => import('rxjs').Observable<ComboboxOption[]>) | null\n >(null);\n\n /** Pixel height of each option row. */\n readonly itemHeight = input(36);\n\n /** Max panel height in pixels. */\n readonly maxPanelHeight = input(256);\n\n // ── Public outputs ─────────────────────────────────────────────────────\n\n /** Emitted when the input text changes. */\n readonly query = output<string>();\n\n /** Emitted when the panel opens. */\n readonly opened = output<void>();\n\n /** Emitted when the panel closes. */\n readonly closed = output<void>();\n\n // ── View children ──────────────────────────────────────────────────────\n\n protected readonly inputRef = viewChild<ElementRef<HTMLInputElement>>('inputEl');\n protected readonly panel = viewChild(ComboboxPanel);\n\n // ── Internal state ─────────────────────────────────────────────────────\n\n protected readonly isOpen = signal(false);\n protected readonly inputText = signal('');\n protected readonly highlightIndex = signal(-1);\n protected readonly asyncLoading = signal(false);\n protected readonly asyncResults = signal<ComboboxOption[] | null>(null);\n\n /** Text the input had when the panel opened — restored on Escape. */\n private savedText = '';\n\n private readonly hostEl = inject(ElementRef<HTMLElement>);\n\n // ── CVA state ──────────────────────────────────────────────────────────\n\n private onChangeFn: (v: unknown) => void = () => {};\n protected onTouchedFn: () => void = () => {};\n\n // ── Async filter plumbing ──────────────────────────────────────────────\n\n private readonly filterSubject = new Subject<string>();\n private filterSub: Subscription | null = null;\n\n // ── Live region debounce ───────────────────────────────────────────────\n\n protected readonly liveText = signal('');\n private liveTimer: ReturnType<typeof setTimeout> | null = null;\n\n // ── Computed ───────────────────────────────────────────────────────────\n\n /** Set of currently selected values for the panel. */\n protected readonly selectedValues = computed(() => {\n if (this.multiple()) {\n return new Set<unknown>(this.values());\n }\n const v = this.value();\n return v != null ? new Set<unknown>([v]) : new Set<unknown>();\n });\n\n /** Filtered options shown in the panel. */\n protected readonly filteredOptions = computed(() => {\n // If async filterFn is set and we have results, use those.\n const asyncRes = this.asyncResults();\n if (this.filterFn() && asyncRes !== null) {\n return asyncRes;\n }\n\n const query = this.inputText().trim().toLowerCase();\n const opts = this.options();\n if (!query) return opts;\n return opts.filter(o => o.label.toLowerCase().includes(query));\n });\n\n /** Chips for multi-select mode. */\n protected readonly chips = computed(() => {\n if (!this.multiple()) return [];\n const vals = this.values();\n const opts = this.options();\n return vals.map(v => {\n const opt = opts.find(o => o.value === v);\n return { value: v, label: opt?.label ?? String(v) };\n });\n });\n\n /** The aria-activedescendant value. */\n protected readonly activeDescendant = computed(() => {\n const idx = this.highlightIndex();\n const p = this.panel();\n if (idx < 0 || !p) return null;\n return p.optionIdAt(idx) || null;\n });\n\n /** The listbox ID from the panel (for aria-controls). */\n protected readonly panelListboxId = computed(() => {\n const p = this.panel();\n return p ? p.listboxId : null;\n });\n\n /** Freeform hint for empty state. */\n protected readonly freeformHint = computed(() => {\n if (!this.allowFreeform()) return '';\n const text = this.inputText().trim();\n return text ? `Press Enter to add \"${text}\"` : '';\n });\n\n /** Overlay width tracks host element width. */\n protected get overlayWidth(): number {\n return this.hostEl.nativeElement.offsetWidth || 200;\n }\n\n /** Overlay positions: below-first with above-fallback. */\n protected readonly positions: ConnectedPosition[] = [\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },\n ];\n\n constructor() {\n // Wire up async filter subscription.\n this.filterSub = this.filterSubject\n .pipe(\n debounceTime(200),\n switchMap(q => {\n const fn = this.filterFn();\n if (!fn) return of(null);\n this.asyncLoading.set(true);\n return fn(q).pipe(\n catchError(() => of([] as ComboboxOption[])),\n finalize(() => this.asyncLoading.set(false)),\n );\n }),\n )\n .subscribe(results => {\n if (results !== null) {\n this.asyncResults.set(results);\n }\n });\n\n // Sync the displayed input text to the single-select value whenever\n // the value changes externally (e.g. parent updates a [(value)] model\n // or supplies a freeform string the component itself didn't commit).\n // Skipped while the panel is open so the user's in-flight typing\n // isn't clobbered — on close, syncInputToSelection handles the sync.\n effect(() => {\n if (this.multiple()) return;\n if (this.isOpen()) return;\n const v = this.value();\n if (v == null) {\n this.inputText.set('');\n return;\n }\n const opts = this.options();\n const opt = opts.find(o => o.value === v);\n this.inputText.set(\n opt?.label ?? (typeof v === 'string' ? v : ''),\n );\n });\n\n // Update live region when filtered options change (debounced 300ms).\n effect(() => {\n const count = this.filteredOptions().length;\n const total = this.options().length;\n // Read isOpen to track it in this effect.\n const open = this.isOpen();\n\n // Clear any pending timer.\n if (this.liveTimer !== null) {\n clearTimeout(this.liveTimer);\n }\n\n if (!open) {\n this.liveText.set('');\n return;\n }\n\n this.liveTimer = setTimeout(() => {\n if (count === 0) {\n this.liveText.set('No results');\n } else if (this.filterFn() || this.inputText().trim()) {\n this.liveText.set(\n total > 0 && count < total\n ? `${count} of ${total} results`\n : `${count} results available`,\n );\n } else {\n this.liveText.set(`${count} results available`);\n }\n }, 300);\n });\n }\n\n ngOnDestroy(): void {\n this.filterSub?.unsubscribe();\n if (this.liveTimer !== null) {\n clearTimeout(this.liveTimer);\n }\n }\n\n // ── CVA ────────────────────────────────────────────────────────────────\n\n writeValue(value: unknown): void {\n if (this.multiple()) {\n const arr = Array.isArray(value) ? value : [];\n this.values.set(arr);\n } else {\n this.value.set(value);\n // Show label for current value. When the value isn't in options\n // (freeform commit, or a string the parent supplied before the\n // options array catches up), fall back to the string itself so\n // the input doesn't appear blank when the model is non-empty.\n const opt = this.options().find(o => o.value === value);\n this.inputText.set(\n opt?.label ?? (typeof value === 'string' ? value : ''),\n );\n }\n }\n\n registerOnChange(fn: (v: unknown) => void): void {\n this.onChangeFn = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouchedFn = fn;\n }\n\n // ── Panel open/close ───────────────────────────────────────────────────\n\n protected open(highlightFirst = false, highlightLast = false): void {\n if (this.disabled() || this.isOpen()) return;\n this.savedText = this.inputText();\n this.isOpen.set(true);\n this.opened.emit();\n\n if (highlightFirst) {\n this.highlightFirst();\n } else if (highlightLast) {\n this.highlightLast();\n } else {\n this.highlightIndex.set(-1);\n }\n }\n\n protected close(restoreText = false): void {\n if (!this.isOpen()) return;\n this.isOpen.set(false);\n this.highlightIndex.set(-1);\n this.closed.emit();\n\n if (restoreText) {\n this.inputText.set(this.savedText);\n } else if (!this.multiple()) {\n // Restore label of selected value.\n this.syncInputToSelection();\n }\n }\n\n // ── Input events ───────────────────────────────────────────────────────\n\n protected onInput(event: Event): void {\n const text = (event.target as HTMLInputElement).value;\n this.inputText.set(text);\n this.query.emit(text);\n this.highlightIndex.set(-1);\n this.asyncResults.set(null);\n\n if (this.filterFn()) {\n this.filterSubject.next(text);\n }\n\n if (!this.isOpen()) {\n this.open();\n }\n }\n\n protected onBlur(): void {\n this.onTouchedFn();\n\n // Short delay so mousedown on an option fires first.\n setTimeout(() => {\n if (!this.isOpen()) return;\n\n if (this.allowFreeform() && !this.multiple()) {\n this.acceptFreeform();\n }\n\n this.close();\n }, 150);\n }\n\n protected onTriggerClick(): void {\n if (this.disabled()) return;\n\n if (this.isOpen()) {\n this.close();\n } else {\n this.open();\n // In single-select, select the input text for easy re-typing.\n if (!this.multiple() && this.inputText()) {\n const el = this.inputRef()?.nativeElement;\n el?.select();\n }\n }\n }\n\n // ── Keyboard ───────────────────────────────────────────────────────────\n\n protected onKeydown(event: KeyboardEvent): void {\n if (this.disabled()) return;\n\n const open = this.isOpen();\n const hi = this.highlightIndex();\n const opts = this.filteredOptions();\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n if (!open) {\n if (event.altKey) {\n this.open(false, false); // Alt+ArrowDown: open without highlight\n } else {\n this.open(true, false); // ArrowDown: open + highlight first\n }\n } else if (hi < 0) {\n this.highlightFirst();\n } else {\n const next = this.nextEnabled(hi, 1, opts);\n this.highlightIndex.set(next);\n }\n break;\n\n case 'ArrowUp':\n event.preventDefault();\n if (!open) {\n this.open(false, true); // ArrowUp: open + highlight last\n } else if (event.altKey) {\n this.close();\n } else if (hi < 0) {\n this.highlightLast();\n } else {\n const prev = this.nextEnabled(hi, -1, opts);\n this.highlightIndex.set(prev);\n }\n break;\n\n case 'Enter':\n if (open) {\n event.preventDefault();\n if (hi >= 0 && hi < opts.length) {\n this.selectOption(opts[hi]);\n } else if (this.allowFreeform() && this.inputText().trim()) {\n this.acceptFreeform();\n this.close();\n }\n }\n break;\n\n case 'Escape':\n if (open) {\n event.preventDefault();\n this.close(true); // Restore text\n } else {\n // Clear input text.\n this.inputText.set('');\n this.query.emit('');\n }\n break;\n\n case 'Tab':\n if (open) {\n if (hi >= 0 && hi < opts.length) {\n this.selectOption(opts[hi]);\n }\n this.close();\n }\n break;\n\n case 'ArrowLeft':\n case 'ArrowRight':\n case 'Home':\n case 'End':\n // Clear highlight so cursor navigation works normally.\n if (open && hi >= 0) {\n this.highlightIndex.set(-1);\n }\n break;\n\n case 'Backspace':\n if (open && hi >= 0) {\n // Clear highlight, let deletion happen in input.\n this.highlightIndex.set(-1);\n } else if (\n this.multiple() &&\n !this.inputText() &&\n this.values().length > 0\n ) {\n // Remove last chip.\n this.removeChipByIndex(this.values().length - 1);\n }\n break;\n\n default:\n // Printable character: clear highlight, let it type.\n if (open && hi >= 0 && event.key.length === 1 && !event.ctrlKey && !event.metaKey) {\n this.highlightIndex.set(-1);\n }\n // If closed and printable, open panel.\n if (!open && event.key.length === 1 && !event.ctrlKey && !event.metaKey) {\n this.open();\n }\n break;\n }\n }\n\n // ── Option selection ───────────────────────────────────────────────────\n\n protected onOptionClicked(event: { option: ComboboxOption; index: number }): void {\n this.selectOption(event.option);\n // Refocus input since mousedown prevented default.\n this.inputRef()?.nativeElement.focus();\n }\n\n private selectOption(opt: ComboboxOption): void {\n if (opt.disabled) return;\n\n if (this.multiple()) {\n const current = this.values();\n const idx = current.indexOf(opt.value);\n if (idx >= 0) {\n // Deselect.\n this.values.set(current.filter((_, i) => i !== idx));\n } else {\n this.values.set([...current, opt.value]);\n }\n // Clear input, keep panel open.\n this.inputText.set('');\n this.query.emit('');\n this.highlightIndex.set(-1);\n this.onChangeFn(this.values());\n } else {\n this.value.set(opt.value);\n this.inputText.set(opt.label);\n this.onChangeFn(opt.value);\n this.close();\n }\n }\n\n // ── Chip removal ───────────────────────────────────────────────────────\n\n protected removeChip(chipValue: unknown): void {\n const current = this.values();\n this.values.set(current.filter(v => v !== chipValue));\n this.onChangeFn(this.values());\n this.inputRef()?.nativeElement.focus();\n }\n\n private removeChipByIndex(index: number): void {\n const current = this.values();\n this.values.set(current.filter((_, i) => i !== index));\n this.onChangeFn(this.values());\n }\n\n // ── Freeform ───────────────────────────────────────────────────────────\n\n private acceptFreeform(): void {\n const text = this.inputText().trim();\n if (!text) return;\n\n if (this.multiple()) {\n const current = this.values();\n if (!current.includes(text)) {\n this.values.set([...current, text]);\n this.onChangeFn(this.values());\n }\n this.inputText.set('');\n this.query.emit('');\n } else {\n this.value.set(text);\n this.onChangeFn(text);\n }\n }\n\n // ── Highlight helpers ──────────────────────────────────────────────────\n\n private highlightFirst(): void {\n const opts = this.filteredOptions();\n for (let i = 0; i < opts.length; i++) {\n if (!opts[i].disabled) {\n this.highlightIndex.set(i);\n return;\n }\n }\n this.highlightIndex.set(-1);\n }\n\n private highlightLast(): void {\n const opts = this.filteredOptions();\n for (let i = opts.length - 1; i >= 0; i--) {\n if (!opts[i].disabled) {\n this.highlightIndex.set(i);\n return;\n }\n }\n this.highlightIndex.set(-1);\n }\n\n /**\n * Find the next enabled option in the given direction.\n * Returns -1 if wrapping past the end/start (clears highlight).\n */\n private nextEnabled(\n from: number,\n direction: 1 | -1,\n opts: ComboboxOption[],\n ): number {\n let i = from + direction;\n if (i < 0 || i >= opts.length) return -1; // Wrap clears highlight.\n while (i >= 0 && i < opts.length) {\n if (!opts[i].disabled) return i;\n i += direction;\n }\n return -1;\n }\n\n /** Sync input text to the currently selected option label (single-select).\n * Mirrors the writeValue freeform fallback — a string value not in the\n * options list still shows in the input, so a freeform commit doesn't\n * look like a no-op after close(). */\n private syncInputToSelection(): void {\n const v = this.value();\n if (v == null) {\n this.inputText.set('');\n return;\n }\n const opt = this.options().find(o => o.value === v);\n this.inputText.set(\n opt?.label ?? (typeof v === 'string' ? v : ''),\n );\n }\n}\n","<!-- Trigger wrapper — anchors the CDK overlay -->\n<div\n class=\"wm-cb-trigger\"\n [class.is-open]=\"isOpen()\"\n [class.is-disabled]=\"disabled()\"\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n (click)=\"onTriggerClick()\"\n>\n <!-- Multi-select chips -->\n @if (multiple()) {\n @for (chip of chips(); track chip.value) {\n <span class=\"wm-cb-chip\">\n <span class=\"wm-cb-chip-label\">{{ chip.label }}</span>\n <button\n type=\"button\"\n class=\"wm-cb-chip-remove\"\n tabindex=\"-1\"\n [attr.aria-label]=\"'Remove ' + chip.label\"\n (mousedown)=\"$event.preventDefault(); $event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); removeChip(chip.value)\"\n >\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M18 6L6 18M6 6l12 12\"\n stroke=\"currentColor\" stroke-width=\"2\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n </span>\n }\n }\n\n <!-- Text input -->\n <input\n #inputEl\n type=\"text\"\n class=\"wm-cb-input\"\n role=\"combobox\"\n autocomplete=\"off\"\n [attr.placeholder]=\"chips().length ? '' : placeholder()\"\n [attr.aria-label]=\"ariaLabelledby() ? null : ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-expanded]=\"isOpen()\"\n aria-haspopup=\"listbox\"\n [attr.aria-autocomplete]=\"allowFreeform() ? 'both' : 'list'\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-controls]=\"isOpen() ? panelListboxId() : null\"\n [disabled]=\"disabled() || null\"\n [value]=\"inputText()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n />\n\n <!-- Chevron -->\n <svg\n class=\"wm-cb-chevron\"\n [class.is-open]=\"isOpen()\"\n width=\"16\" height=\"16\" viewBox=\"0 0 24 24\"\n fill=\"none\" aria-hidden=\"true\"\n >\n <path d=\"M6 9l6 6 6-6\"\n stroke=\"currentColor\" stroke-width=\"2\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n</div>\n\n<!-- Live region for screen readers -->\n<span class=\"wm-cb-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {{ liveText() }}\n</span>\n\n<!-- Dropdown panel in CDK overlay -->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"wm-cb-backdrop\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div class=\"wm-cb-panel\">\n <wm-combobox-panel\n [options]=\"filteredOptions()\"\n [highlightIndex]=\"highlightIndex()\"\n [selectedValues]=\"selectedValues()\"\n [multiple]=\"multiple()\"\n [itemHeight]=\"itemHeight()\"\n [maxHeight]=\"maxPanelHeight()\"\n [filterQuery]=\"inputText()\"\n [loading]=\"asyncLoading()\"\n [freeformHint]=\"freeformHint()\"\n (optionClicked)=\"onOptionClicked($event)\"\n />\n </div>\n</ng-template>\n","import { Injectable, signal } from '@angular/core';\n\nexport type ToastType = 'success' | 'error' | 'info' | 'progress';\n\nexport interface Toast {\n id: number;\n message: string;\n type: ToastType;\n /** If true, toast does not auto-dismiss. Caller must dismiss it manually. */\n persistent?: boolean;\n /** Epoch ms when this toast was created (used for elapsed time display). */\n createdAt?: number;\n /** Callback invoked when the user clicks the Cancel button (progress toasts only). */\n onCancel?: () => void;\n}\n\nlet nextId = 0;\n\n/**\n * WmToastService — Application-wide toast notification manager.\n *\n * Provided in root; inject anywhere and call success(), error(), info(), or progress().\n * Render `<wm-toast-container>` once at the app root to display toasts.\n *\n * Auto-dismiss: success/info after 4 s, error after 6 s.\n * Progress toasts persist until explicitly dismissed.\n * Custom duration via show(message, type, durationMs).\n */\n@Injectable({ providedIn: 'root' })\nexport class WmToastService {\n readonly toasts = signal<Toast[]>([]);\n\n show(message: string, type: ToastType = 'info', duration?: number): number {\n const id = ++nextId;\n this.toasts.update(list => [...list, { id, message, type }]);\n const ms = duration ?? (type === 'error' ? 6000 : 4000);\n setTimeout(() => this.dismiss(id), ms);\n return id;\n }\n\n success(message: string): number { return this.show(message, 'success'); }\n error(message: string): number { return this.show(message, 'error'); }\n info(message: string): number { return this.show(message, 'info'); }\n\n /**\n * Show a persistent progress toast with spinner and elapsed timer.\n * Returns the toast ID — caller must call dismiss(id) when done.\n *\n * @param message - Display message (e.g. \"Generating docs…\")\n * @param onCancel - Optional callback invoked when the user clicks Cancel.\n * The caller should abort the operation and then dismiss the toast.\n */\n progress(message: string, onCancel?: () => void): number {\n const id = ++nextId;\n this.toasts.update(list => [\n ...list,\n { id, message, type: 'progress', persistent: true, createdAt: Date.now(), onCancel },\n ]);\n return id;\n }\n\n dismiss(id: number): void {\n this.toasts.update(list => list.filter(t => t.id !== id));\n }\n}\n","import { Component, inject, ChangeDetectionStrategy, signal, OnDestroy } from '@angular/core';\nimport { WmToastService, Toast } from './toast.service';\n\n/**\n * WmToastContainer — Renders the current stack of toasts.\n *\n * Place once at the application root (e.g. inside the shell or app component).\n * Uses inline SVG icons — no external icon library dependency.\n *\n * Accessibility:\n * - Container has role=\"log\" + aria-live=\"polite\" so new toasts are announced\n * - Each toast has role=\"status\"\n * - Dismiss button has an accessible label\n */\n@Component({\n selector: 'wm-toast-container',\n templateUrl: './toast-container.html',\n styleUrl: './toast-container.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WmToastContainer implements OnDestroy {\n protected readonly toastService = inject(WmToastService);\n\n /** Tick signal that updates every second — drives the elapsed time display. */\n protected readonly tick = signal(Date.now());\n private tickInterval = setInterval(() => {\n // Only tick when there are progress toasts with createdAt\n if (this.toastService.toasts().some(t => t.type === 'progress' && t.createdAt)) {\n this.tick.set(Date.now());\n }\n }, 1000);\n\n ngOnDestroy(): void {\n clearInterval(this.tickInterval);\n }\n\n protected dismiss(id: number): void {\n this.toastService.dismiss(id);\n }\n\n protected cancel(toast: Toast): void {\n toast.onCancel?.();\n this.toastService.dismiss(toast.id);\n }\n\n protected typeClass(toast: Toast): string {\n return `wm-toast wm-toast--${toast.type}`;\n }\n\n protected elapsed(createdAt: number): string {\n const now = this.tick(); // reactive dependency on tick\n const diff = Math.max(0, Math.floor((now - createdAt) / 1000));\n if (diff < 60) return `${diff}s`;\n const mins = Math.floor(diff / 60);\n const secs = diff % 60;\n return `${mins}m ${secs.toString().padStart(2, '0')}s`;\n }\n}\n","<div class=\"wm-toast-container\" role=\"log\" aria-live=\"polite\" aria-label=\"Notifications\">\n @for (toast of toastService.toasts(); track toast.id) {\n <div [class]=\"typeClass(toast)\" role=\"status\">\n <!-- Success icon (check-circle) -->\n @if (toast.type === 'success') {\n <svg class=\"wm-toast-icon\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\"\n fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"/>\n <polyline points=\"22 4 12 14.01 9 11.01\"/>\n </svg>\n }\n <!-- Error icon (x-circle) -->\n @if (toast.type === 'error') {\n <svg class=\"wm-toast-icon\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\"\n fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"/>\n <line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\"/>\n <line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\"/>\n </svg>\n }\n <!-- Info icon -->\n @if (toast.type === 'info') {\n <svg class=\"wm-toast-icon\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\"\n fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"/>\n <line x1=\"12\" y1=\"16\" x2=\"12\" y2=\"12\"/>\n <line x1=\"12\" y1=\"8\" x2=\"12.01\" y2=\"8\"/>\n </svg>\n }\n <!-- Progress spinner -->\n @if (toast.type === 'progress') {\n <span class=\"wm-toast-spinner\" aria-hidden=\"true\"></span>\n }\n\n <span class=\"wm-toast-message\">\n {{ toast.message }}\n @if (toast.type === 'progress' && toast.createdAt) {\n <span class=\"wm-toast-elapsed\"> ({{ elapsed(toast.createdAt) }})</span>\n }\n </span>\n\n <!-- Cancel button for progress toasts with an onCancel callback -->\n @if (toast.type === 'progress' && toast.onCancel) {\n <button class=\"wm-toast-cancel\" (click)=\"cancel(toast)\" aria-label=\"Cancel operation\">Cancel</button>\n }\n\n <!-- Dismiss button — always shown -->\n <button class=\"wm-toast-dismiss\" (click)=\"dismiss(toast.id)\" aria-label=\"Dismiss notification\">\n <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\"\n fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"/>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"/>\n </svg>\n </button>\n </div>\n }\n</div>\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, input } from '@angular/core';\n\n/**\n * The floating surface a `[wmTooltip]` renders into.\n *\n * Internal to the tooltip — consumers never place this element themselves. It\n * exists as a component rather than a hand-built `<div>` so the panel's styles\n * ship with the component that needs them, the same arrangement `wm-popover`\n * uses for its panel.\n *\n * `ViewEncapsulation.None` is required, not stylistic: the panel is attached to\n * the CDK overlay container at the end of `<body>`, outside the host\n * component's DOM, so an emulated-encapsulation attribute selector would never\n * match it.\n */\n@Component({\n selector: 'wm-tooltip-panel',\n template: `<div\n class=\"wm-tooltip-panel\"\n [class.wm-tooltip-panel--visible]=\"visible()\"\n [id]=\"panelId()\"\n role=\"tooltip\"\n >{{ text() }}</div>`,\n styleUrl: './tooltip.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class WmTooltipPanel {\n /** Tooltip body. Newlines are preserved — see `white-space` in tooltip.css. */\n readonly text = input<string>('');\n\n /** Id the host points at with aria-describedby / aria-labelledby. */\n readonly panelId = input<string>('');\n\n /**\n * Drives the enter transition.\n *\n * The panel attaches with this false and is raised on the next frame, so the\n * fade has two states to move between. Attaching straight to the visible\n * state would give the browser nothing to interpolate from.\n */\n readonly visible = input<boolean>(false);\n}\n","/**\n * Add and remove one id from a space-separated ARIA id-reference attribute.\n *\n * A tooltip does not own `aria-describedby`. The host may already point at an\n * error message, a hint, or a description the application wrote, and the\n * tooltip has to sit alongside those rather than replace them. It also has to\n * leave the attribute exactly as it found it once the tooltip hides, because a\n * tooltip opens and closes many times over the life of one element and any\n * drift accumulates.\n *\n * Kept as pure string functions so the rule is testable without a DOM: this is\n * the part that has to be right every time, and the overlay around it is not.\n */\n\n/** Split an id-reference list into its tokens, discarding empty runs. */\nexport function idTokens(value: string | null): string[] {\n if (!value) return [];\n return value.split(/\\s+/).filter((token) => token.length > 0);\n}\n\n/**\n * Return the attribute value with `id` present exactly once, appended last.\n *\n * Appending rather than prepending matters: assistive technology announces a\n * description list in order, and the application's own description is the more\n * specific one. The tooltip is supplementary, so it speaks last.\n */\nexport function withIdToken(value: string | null, id: string): string {\n const tokens = idTokens(value).filter((token) => token !== id);\n tokens.push(id);\n return tokens.join(' ');\n}\n\n/**\n * Return the attribute value with `id` removed, or `null` when nothing is left.\n *\n * `null` is the signal to remove the attribute outright. An empty\n * `aria-describedby=\"\"` is not the same as no attribute: some assistive\n * technology treats the empty string as a broken reference, and it also makes\n * a host that never carried the attribute look, on inspection, as though it\n * did.\n */\nexport function withoutIdToken(value: string | null, id: string): string | null {\n const tokens = idTokens(value).filter((token) => token !== id);\n return tokens.length > 0 ? tokens.join(' ') : null;\n}\n","import {\n ComponentRef,\n DestroyRef,\n Directive,\n ElementRef,\n Injector,\n Renderer2,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n ConnectedPosition,\n OverlayRef,\n createFlexibleConnectedPositionStrategy,\n createOverlayRef,\n createRepositionScrollStrategy,\n} from '@angular/cdk/overlay';\n\nimport { onViewportChange } from '../overlay/viewport-change';\nimport { WmTooltipPanel } from './tooltip-panel';\nimport { withIdToken, withoutIdToken } from './aria-tokens';\n\n/** Where the panel sits relative to its host, before any viewport fallback. */\nexport type WmTooltipPosition = 'top' | 'bottom' | 'left' | 'right';\n\n/**\n * How the panel is related to the host for assistive technology.\n *\n * `description` points the host at the panel with `aria-describedby`. Use it\n * when the host already has a name and the tooltip adds detail — an icon with\n * an `aria-label`, a truncated cell, a status mark.\n *\n * `label` uses `aria-labelledby` instead, for an icon-only control whose only\n * name is the tooltip. Do not use it alongside an `aria-label` on the same\n * host: `aria-labelledby` wins, and the two texts then disagree about what the\n * control is called depending on whether the tooltip happens to be open.\n */\nexport type WmTooltipRelation = 'description' | 'label';\n\n/** Grace period before a pointer leaving the host closes the tooltip. */\nconst HIDE_DELAY_MS = 120;\n\nlet nextId = 0;\n\n/**\n * WmTooltip — accessible floating explanation for any element.\n *\n * ```html\n * <button class=\"wm-btn btn-icon-only\" aria-label=\"Undo\" [wmTooltip]=\"'Undo the last commit'\">…</button>\n * ```\n *\n * Why this exists next to the CSS `[data-tooltip]` chip: that chip is a\n * pseudo-element on the host, so it cannot escape an ancestor's\n * `overflow: hidden`, cannot wrap, and is invisible to assistive technology —\n * it is a visual hint that must be paired with an `aria-label` saying the same\n * thing twice. Reach for the chip for a one-to-five word label on a toolbar\n * button. Reach for this directive when the text explains something, when the\n * host sits inside a scrolling container, or when the explanation must be part\n * of the accessible description rather than a duplicate of it.\n *\n * Accessibility:\n * - The panel carries `role=\"tooltip\"` and a generated id.\n * - While open, the host points at that id with `aria-describedby` (default)\n * or `aria-labelledby`. The id is appended to whatever the host already\n * referenced and removed again on hide, so an application's own description\n * survives untouched.\n * - Opens on hover and on `:focus-visible`, so a mouse click that moves focus\n * to a button does not leave a tooltip hanging behind the pointer.\n * - WCAG 1.4.13 (Content on Hover or Focus): Escape dismisses without moving\n * focus; the pointer can travel into the panel and read it without it\n * closing; nothing auto-dismisses on a timer.\n *\n * Keyboard reachability is the caller's responsibility. A tooltip on an element\n * that cannot take focus is unreachable by keyboard, so set\n * `wmTooltipFocusable` to make the host a tab stop — but NOT inside a\n * roving-tabindex container (tree, listbox, grid, tablist). There the container\n * is a single tab stop by design, and adding one stop per row is worse for\n * keyboard users than the gap it closes. Put the tooltip on the row itself, or\n * expose it from a control the roving focus already reaches.\n */\n@Directive({\n selector: '[wmTooltip]',\n exportAs: 'wmTooltip',\n host: {\n '(mouseenter)': 'onPointerEnterHost()',\n '(mouseleave)': 'onPointerLeaveHost()',\n '(focusin)': 'onFocusHost()',\n '(focusout)': 'onBlurHost()',\n '(click)': 'hideNow()',\n },\n})\nexport class WmTooltip {\n /** Tooltip body. Blank or absent means the tooltip never opens. */\n readonly wmTooltip = input<string | null | undefined>('');\n\n /** Preferred side. Flips automatically when the viewport has no room. */\n readonly wmTooltipPosition = input<WmTooltipPosition>('bottom');\n\n /** Milliseconds a pointer must rest on the host before the panel opens. */\n readonly wmTooltipDelay = input<number>(250);\n\n /** Suppress the tooltip without unbinding it — for a control whose explanation only applies in some states. */\n readonly wmTooltipDisabled = input<boolean>(false);\n\n /** Whether the panel describes the host or names it. See WmTooltipRelation. */\n readonly wmTooltipRelation = input<WmTooltipRelation>('description');\n\n /**\n * Make a non-focusable host a tab stop so a keyboard user can reach the\n * tooltip. Only applied when the host is not already focusable, and never\n * safe inside a roving-tabindex container — see the class comment.\n */\n readonly wmTooltipFocusable = input<boolean>(false);\n\n private readonly host = inject(ElementRef).nativeElement as HTMLElement;\n private readonly injector = inject(Injector);\n private readonly renderer = inject(Renderer2);\n\n private readonly panelId = `wm-tooltip-${nextId++}`;\n\n private overlayRef: OverlayRef | null = null;\n private panelRef: ComponentRef<WmTooltipPanel> | null = null;\n private portal: ComponentPortal<WmTooltipPanel> | null = null;\n\n private showTimer: ReturnType<typeof setTimeout> | null = null;\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n private raiseFrame: number | null = null;\n\n private pointerOnHost = false;\n private pointerOnPanel = false;\n private hostFocused = false;\n\n private detachDocumentListeners: (() => void) | null = null;\n\n /**\n * Elements between the host and the document that can clip it, resolved\n * once per open. They cannot change while the panel is up, and walking the\n * ancestor chain on every scroll event would be work done per frame.\n */\n private clippingAncestors: HTMLElement[] = [];\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.teardown());\n\n effect(() => {\n const focusable = this.wmTooltipFocusable();\n // Read so the effect re-runs when the host stops carrying a tooltip.\n const hasText = this.text().length > 0;\n\n if (focusable && hasText && !this.isNativelyFocusable()) {\n this.renderer.setAttribute(this.host, 'tabindex', '0');\n }\n });\n\n effect(() => {\n const text = this.text();\n const disabled = this.wmTooltipDisabled();\n\n if (disabled || text.length === 0) {\n this.hideNow();\n return;\n }\n this.panelRef?.setInput('text', text);\n });\n }\n\n /** Open the tooltip immediately, bypassing the hover delay. */\n show(): void {\n this.clearTimer('show');\n this.clearTimer('hide');\n if (this.overlayRef?.hasAttached()) return;\n if (this.wmTooltipDisabled() || this.text().length === 0) return;\n\n const overlayRef = this.ensureOverlay();\n this.panelRef = overlayRef.attach(this.portal!);\n this.panelRef.setInput('text', this.text());\n this.panelRef.setInput('panelId', this.panelId);\n this.panelRef.changeDetectorRef.detectChanges();\n\n this.linkHostToPanel();\n this.clippingAncestors = this.resolveClippingAncestors();\n this.attachDocumentListeners();\n\n // Attach invisible, raise on the next frame: a transition needs a state to\n // move away from, and attaching straight to the visible state gives the\n // browser nothing to interpolate.\n this.raiseFrame = requestAnimationFrame(() => {\n this.raiseFrame = null;\n this.panelRef?.setInput('visible', true);\n this.panelRef?.changeDetectorRef.detectChanges();\n });\n }\n\n /** Close the tooltip immediately, without the pointer grace period. */\n hideNow(): void {\n this.clearTimer('show');\n this.clearTimer('hide');\n\n if (this.raiseFrame !== null) {\n cancelAnimationFrame(this.raiseFrame);\n this.raiseFrame = null;\n }\n\n this.releaseDocumentListeners();\n this.unlinkHostFromPanel();\n this.clippingAncestors = [];\n\n if (this.overlayRef?.hasAttached()) {\n this.overlayRef.detach();\n }\n this.panelRef = null;\n }\n\n /** True while the panel is attached. Exposed for tests and for callers driving it manually. */\n get isOpen(): boolean {\n return this.overlayRef?.hasAttached() === true;\n }\n\n // ── Trigger handling ─────────────────────────────────────────────\n\n protected onPointerEnterHost(): void {\n this.pointerOnHost = true;\n this.scheduleShow();\n }\n\n protected onPointerLeaveHost(): void {\n this.pointerOnHost = false;\n this.scheduleHide();\n }\n\n protected onFocusHost(): void {\n // Only keyboard focus opens the tooltip. Clicking a button focuses it too,\n // and a tooltip that opens on click sits under the pointer that just left.\n if (!this.matchesFocusVisible()) return;\n this.hostFocused = true;\n this.show();\n }\n\n protected onBlurHost(): void {\n this.hostFocused = false;\n this.scheduleHide();\n }\n\n // ── Internals ────────────────────────────────────────────────────\n\n private text(): string {\n return (this.wmTooltip() ?? '').toString();\n }\n\n private scheduleShow(): void {\n if (this.isOpen) {\n this.clearTimer('hide');\n return;\n }\n if (this.wmTooltipDisabled() || this.text().length === 0) return;\n\n this.clearTimer('hide');\n this.clearTimer('show');\n const delay = Math.max(0, this.wmTooltipDelay());\n this.showTimer = setTimeout(() => {\n this.showTimer = null;\n this.show();\n }, delay);\n }\n\n private scheduleHide(): void {\n this.clearTimer('show');\n this.clearTimer('hide');\n this.hideTimer = setTimeout(() => {\n this.hideTimer = null;\n if (this.pointerOnHost || this.pointerOnPanel || this.hostFocused) return;\n this.hideNow();\n }, HIDE_DELAY_MS);\n }\n\n private clearTimer(which: 'show' | 'hide'): void {\n const timer = which === 'show' ? this.showTimer : this.hideTimer;\n if (timer === null) return;\n clearTimeout(timer);\n if (which === 'show') this.showTimer = null;\n else this.hideTimer = null;\n }\n\n private ensureOverlay(): OverlayRef {\n if (this.overlayRef) return this.overlayRef;\n\n const positionStrategy = createFlexibleConnectedPositionStrategy(this.injector, this.host)\n .withFlexibleDimensions(false)\n .withPush(true)\n .withPositions(this.positions());\n\n this.overlayRef = createOverlayRef(this.injector, {\n positionStrategy,\n scrollStrategy: createRepositionScrollStrategy(this.injector),\n panelClass: 'wm-tooltip-overlay',\n hasBackdrop: false,\n });\n\n // The pointer may travel from the host into the panel. WCAG 1.4.13 requires\n // that reading the tooltip that way does not dismiss it, which matters most\n // for the long explanations this directive exists to carry.\n const overlayEl = this.overlayRef.overlayElement;\n overlayEl.addEventListener('mouseenter', this.onPointerEnterPanel);\n overlayEl.addEventListener('mouseleave', this.onPointerLeavePanel);\n\n positionStrategy.positionChanges.subscribe((change) => {\n const above = change.connectionPair.overlayY === 'bottom';\n overlayEl.classList.toggle('wm-tooltip-above', above);\n });\n\n this.portal = new ComponentPortal(WmTooltipPanel, null, this.injector);\n return this.overlayRef;\n }\n\n private positions(): ConnectedPosition[] {\n const offset = 6;\n const below: ConnectedPosition = {\n originX: 'center', originY: 'bottom',\n overlayX: 'center', overlayY: 'top', offsetY: offset,\n };\n const above: ConnectedPosition = {\n originX: 'center', originY: 'top',\n overlayX: 'center', overlayY: 'bottom', offsetY: -offset,\n };\n const after: ConnectedPosition = {\n originX: 'end', originY: 'center',\n overlayX: 'start', overlayY: 'center', offsetX: offset,\n };\n const before: ConnectedPosition = {\n originX: 'start', originY: 'center',\n overlayX: 'end', overlayY: 'center', offsetX: -offset,\n };\n\n // The preferred side first, then its opposite, then the perpendicular pair.\n // A tooltip that has run out of room on both preferred sides is better off\n // beside the host than pushed over the top of it.\n switch (this.wmTooltipPosition()) {\n case 'top': return [above, below, after, before];\n case 'left': return [before, after, above, below];\n case 'right': return [after, before, above, below];\n default: return [below, above, after, before];\n }\n }\n\n private readonly onPointerEnterPanel = (): void => {\n this.pointerOnPanel = true;\n this.clearTimer('hide');\n };\n\n private readonly onPointerLeavePanel = (): void => {\n this.pointerOnPanel = false;\n this.scheduleHide();\n };\n\n private attachDocumentListeners(): void {\n if (this.detachDocumentListeners) return;\n\n const onKeydown = (event: KeyboardEvent): void => {\n if (event.key !== 'Escape') return;\n // Dismiss without moving focus and without stopping the event: the host\n // may sit in a dialog or a menu whose own Escape handling still applies,\n // and swallowing it would trap the user one layer deeper than they are.\n this.hideNow();\n };\n\n // A pointer press anywhere settles the interaction. Without this, a panel\n // that overlaps the control below it can swallow the click that was meant\n // for that control.\n const onPointerDown = (): void => this.hideNow();\n\n // Re-anchor to the host whenever anything underneath it moves. The capture\n // phase is load-bearing and the reason this is not left to CDK's\n // reposition strategy - see `onViewportChange`.\n const stopFollowing = onViewportChange(() => this.reanchor());\n\n document.addEventListener('keydown', onKeydown, true);\n document.addEventListener('pointerdown', onPointerDown, true);\n\n this.detachDocumentListeners = () => {\n document.removeEventListener('keydown', onKeydown, true);\n document.removeEventListener('pointerdown', onPointerDown, true);\n stopFollowing();\n };\n }\n\n private releaseDocumentListeners(): void {\n this.detachDocumentListeners?.();\n this.detachDocumentListeners = null;\n }\n\n /**\n * Follow the host, or give up on it.\n *\n * Repositioning alone is not enough. Once the host has scrolled out of its\n * container the panel would be pushed against the container edge and left\n * explaining a row the reader can no longer see - worse than not being there,\n * because it now appears to describe whatever it happens to cover.\n */\n private reanchor(): void {\n if (!this.overlayRef?.hasAttached()) return;\n\n if (this.isHostClipped()) {\n this.hideNow();\n return;\n }\n this.overlayRef.updatePosition();\n }\n\n /** Every ancestor that can clip the host, nearest first. */\n private resolveClippingAncestors(): HTMLElement[] {\n const clipping: HTMLElement[] = [];\n let node = this.host.parentElement;\n\n while (node) {\n const style = getComputedStyle(node);\n const clips = [style.overflow, style.overflowX, style.overflowY].some(\n (value) => value === 'auto' || value === 'scroll' || value === 'hidden',\n );\n if (clips) clipping.push(node);\n node = node.parentElement;\n }\n return clipping;\n }\n\n /** True once no part of the host is inside every container that clips it. */\n private isHostClipped(): boolean {\n const host = this.host.getBoundingClientRect();\n\n const outside = (bounds: { top: number; bottom: number; left: number; right: number }) =>\n host.bottom < bounds.top ||\n host.top > bounds.bottom ||\n host.right < bounds.left ||\n host.left > bounds.right;\n\n const viewport = {\n top: 0,\n left: 0,\n bottom: window.innerHeight || document.documentElement.clientHeight,\n right: window.innerWidth || document.documentElement.clientWidth,\n };\n if (outside(viewport)) return true;\n\n return this.clippingAncestors.some((ancestor) =>\n outside(ancestor.getBoundingClientRect()),\n );\n }\n\n private relationAttribute(): string {\n return this.wmTooltipRelation() === 'label' ? 'aria-labelledby' : 'aria-describedby';\n }\n\n private linkHostToPanel(): void {\n const attribute = this.relationAttribute();\n const next = withIdToken(this.host.getAttribute(attribute), this.panelId);\n this.renderer.setAttribute(this.host, attribute, next);\n }\n\n private unlinkHostFromPanel(): void {\n // Both are cleared rather than only the current one: `wmTooltipRelation`\n // can change while the panel is open, and the attribute written on show\n // would otherwise be orphaned, leaving the host pointing at an id that no\n // longer exists in the document.\n for (const attribute of ['aria-describedby', 'aria-labelledby']) {\n const current = this.host.getAttribute(attribute);\n if (current === null) continue;\n\n const next = withoutIdToken(current, this.panelId);\n if (next === null) this.renderer.removeAttribute(this.host, attribute);\n else if (next !== current) this.renderer.setAttribute(this.host, attribute, next);\n }\n }\n\n private isNativelyFocusable(): boolean {\n if (this.host.hasAttribute('tabindex')) return true;\n return ['a', 'button', 'input', 'select', 'textarea', 'summary'].includes(\n this.host.tagName.toLowerCase(),\n );\n }\n\n private matchesFocusVisible(): boolean {\n // `:focus-visible` is unsupported in some test environments; treating an\n // unsupported selector as \"not keyboard focus\" would silently disable the\n // keyboard path, so fall back to opening on any focus.\n try {\n return this.host.matches(':focus-visible');\n } catch {\n return true;\n }\n }\n\n private teardown(): void {\n this.hideNow();\n\n const overlayEl = this.overlayRef?.overlayElement;\n overlayEl?.removeEventListener('mouseenter', this.onPointerEnterPanel);\n overlayEl?.removeEventListener('mouseleave', this.onPointerLeavePanel);\n\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.portal = null;\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, TemplateRef, ViewEncapsulation, input } from '@angular/core';\n\n/**\n * The floating surface a `wm-rich-tooltip` renders into.\n *\n * This is deliberately a separate panel from `WmTooltipPanel`: the latter's\n * text node owns `white-space: pre-line`, while this panel must leave the\n * projected template's markup and layout intact.\n */\n@Component({\n selector: 'wm-rich-tooltip-panel',\n imports: [NgTemplateOutlet],\n template: `<div\n class=\"wm-tooltip-panel wm-rich-tooltip-panel\"\n [class.wm-tooltip-panel--visible]=\"visible()\"\n [id]=\"panelId()\"\n role=\"tooltip\"\n >\n <ng-container [ngTemplateOutlet]=\"content()\"></ng-container>\n </div>`,\n styleUrl: './tooltip.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class WmRichTooltipPanel {\n /** The caller-owned Angular template rendered as the tooltip body. */\n readonly content = input<TemplateRef<unknown> | null>(null);\n\n /** Id the trigger points at with aria-describedby / aria-labelledby. */\n readonly panelId = input<string>('');\n\n /** Drives the enter transition after the overlay has attached. */\n readonly visible = input<boolean>(false);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n DestroyRef,\n Directive,\n ElementRef,\n Injector,\n Renderer2,\n TemplateRef,\n ViewEncapsulation,\n contentChild,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n ConnectedPosition,\n OverlayRef,\n createFlexibleConnectedPositionStrategy,\n createOverlayRef,\n createRepositionScrollStrategy,\n} from '@angular/cdk/overlay';\nimport { Subscription } from 'rxjs';\n\nimport { onViewportChange } from '../overlay/viewport-change';\nimport type { WmTooltipPosition, WmTooltipRelation } from './tooltip';\nimport { withIdToken, withoutIdToken } from './aria-tokens';\nimport { WmRichTooltipPanel } from './rich-tooltip-panel';\n\n/** Marks the projected element that owns a rich tooltip. */\n@Directive({\n selector: '[wmRichTooltipTrigger]',\n})\nexport class WmRichTooltipTrigger {\n readonly elementRef = inject(ElementRef<HTMLElement>);\n}\n\n/** Marks the projected Angular template used as a rich tooltip's body. */\n@Directive({\n selector: 'ng-template[wmRichTooltipContent]',\n})\nexport class WmRichTooltipContent {\n readonly templateRef = inject(TemplateRef<unknown>);\n}\n\nlet nextRichTooltipId = 0;\nconst HIDE_DELAY_MS = 120;\n\n/**\n * `wm-rich-tooltip` — a tooltip-shaped CDK overlay with projected Angular\n * template content.\n *\n * ```html\n * <wm-rich-tooltip position=\"top\">\n * <span wmRichTooltipTrigger>feature/checkout</span>\n * <ng-template wmRichTooltipContent>\n * <strong>feature/checkout</strong>\n * <div class=\"legend-row\">\n * <span class=\"swatch\" aria-hidden=\"true\"></span>\n * <span>Pull request linked</span>\n * </div>\n * </ng-template>\n * </wm-rich-tooltip>\n * ```\n *\n * The body is an Angular `TemplateRef`, not an HTML string. Consumers can use\n * normal Angular markup, bindings, loops, and components; callers should not\n * use this as a path for unsanitized user HTML. If a caller explicitly uses\n * Angular's `[innerHTML]`, Angular's normal sanitizer remains the boundary.\n *\n * The interaction contract matches `WmTooltip`: hover and keyboard focus,\n * Escape dismissal, a hoverable panel, scroll/resize re-anchoring, clipping\n * detection, and an `aria-describedby` relationship by default. Rich tooltip\n * content should remain non-interactive; use `WmPopover` for menus, links,\n * forms, or other content that needs focus and interaction.\n */\n@Component({\n selector: 'wm-rich-tooltip',\n template: `\n <ng-content select=\"[wmRichTooltipTrigger]\"></ng-content>\n <ng-content select=\"ng-template[wmRichTooltipContent]\"></ng-content>\n `,\n host: { style: 'display: contents' },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class WmRichTooltip {\n /** Preferred side. Flips automatically when the viewport has no room. */\n readonly position = input<WmTooltipPosition>('bottom');\n\n /** Milliseconds a pointer must rest on the trigger before opening. */\n readonly delay = input<number>(250);\n\n /** Suppress the tooltip without removing its projected content. */\n readonly disabled = input<boolean>(false);\n\n /** Whether the panel describes the trigger or names it. */\n readonly relation = input<WmTooltipRelation>('description');\n\n /** Make a non-focusable projected trigger reachable by keyboard when needed. */\n readonly focusable = input<boolean>(false);\n\n private readonly injector = inject(Injector);\n private readonly renderer = inject(Renderer2);\n private readonly triggerQuery = contentChild(WmRichTooltipTrigger);\n private readonly contentQuery = contentChild(WmRichTooltipContent);\n private readonly panelId = `wm-rich-tooltip-${nextRichTooltipId++}`;\n\n private triggerElement: HTMLElement | null = null;\n private contentTemplate: TemplateRef<unknown> | null = null;\n private triggerCleanups: Array<() => void> = [];\n private addedTabIndex = false;\n\n private overlayRef: OverlayRef | null = null;\n private panelRef: ComponentRef<WmRichTooltipPanel> | null = null;\n private portal: ComponentPortal<WmRichTooltipPanel> | null = null;\n private positionChanges: Subscription | null = null;\n\n private showTimer: ReturnType<typeof setTimeout> | null = null;\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n private raiseFrame: number | null = null;\n\n private pointerOnTrigger = false;\n private pointerOnPanel = false;\n private triggerFocused = false;\n private detachDocumentListeners: (() => void) | null = null;\n private clippingAncestors: HTMLElement[] = [];\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.teardown());\n\n effect(() => {\n const trigger = this.triggerQuery();\n const content = this.contentQuery();\n const focusable = this.focusable();\n\n if (!trigger || !content) {\n this.hideNow();\n this.unbindTrigger();\n this.contentTemplate = null;\n return;\n }\n\n const element = trigger.elementRef.nativeElement;\n if (element !== this.triggerElement) this.bindTrigger(element);\n this.contentTemplate = content.templateRef;\n this.updateFocusable(element, focusable);\n\n if (this.panelRef) {\n this.panelRef.setInput('content', this.contentTemplate);\n this.panelRef.changeDetectorRef.detectChanges();\n }\n });\n\n effect(() => {\n if (this.disabled()) this.hideNow();\n });\n }\n\n /** Open the rich tooltip immediately, bypassing the hover delay. */\n show(): void {\n this.clearTimer('show');\n this.clearTimer('hide');\n\n const trigger = this.triggerElement;\n const content = this.contentTemplate ?? this.contentQuery()?.templateRef ?? null;\n if (this.overlayRef?.hasAttached()) return;\n if (!trigger || !content || this.disabled()) return;\n\n const overlayRef = this.ensureOverlay(trigger);\n this.panelRef = overlayRef.attach(this.portal!);\n this.panelRef.setInput('content', content);\n this.panelRef.setInput('panelId', this.panelId);\n this.panelRef.changeDetectorRef.detectChanges();\n\n this.linkTriggerToPanel(trigger);\n this.clippingAncestors = this.resolveClippingAncestors(trigger);\n this.attachDocumentListeners();\n\n this.raiseFrame = requestAnimationFrame(() => {\n this.raiseFrame = null;\n this.panelRef?.setInput('visible', true);\n this.panelRef?.changeDetectorRef.detectChanges();\n });\n }\n\n /** Close the rich tooltip immediately, without the pointer grace period. */\n hideNow(): void {\n this.clearTimer('show');\n this.clearTimer('hide');\n\n if (this.raiseFrame !== null) {\n cancelAnimationFrame(this.raiseFrame);\n this.raiseFrame = null;\n }\n\n this.releaseDocumentListeners();\n this.unlinkTriggerFromPanel();\n this.clippingAncestors = [];\n\n if (this.overlayRef?.hasAttached()) this.overlayRef.detach();\n this.panelRef = null;\n }\n\n /** True while the rich tooltip panel is attached. */\n get isOpen(): boolean {\n return this.overlayRef?.hasAttached() === true;\n }\n\n private bindTrigger(element: HTMLElement): void {\n if (this.triggerElement === element && this.triggerCleanups.length > 0) return;\n\n this.hideNow();\n this.unbindTrigger();\n this.triggerElement = element;\n this.triggerCleanups = [\n this.renderer.listen(element, 'mouseenter', () => this.onPointerEnterTrigger()),\n this.renderer.listen(element, 'mouseleave', () => this.onPointerLeaveTrigger()),\n this.renderer.listen(element, 'focusin', () => this.onFocusTrigger()),\n this.renderer.listen(element, 'focusout', () => this.onBlurTrigger()),\n this.renderer.listen(element, 'click', () => this.hideNow()),\n ];\n }\n\n private unbindTrigger(): void {\n for (const cleanup of this.triggerCleanups) cleanup();\n this.triggerCleanups = [];\n\n if (this.addedTabIndex && this.triggerElement?.getAttribute('tabindex') === '0') {\n this.renderer.removeAttribute(this.triggerElement, 'tabindex');\n }\n this.addedTabIndex = false;\n this.triggerElement = null;\n }\n\n private updateFocusable(element: HTMLElement, focusable: boolean): void {\n if (focusable && !this.isNativelyFocusable(element)) {\n if (!element.hasAttribute('tabindex')) {\n this.renderer.setAttribute(element, 'tabindex', '0');\n this.addedTabIndex = true;\n }\n return;\n }\n\n if (this.addedTabIndex && element.getAttribute('tabindex') === '0') {\n this.renderer.removeAttribute(element, 'tabindex');\n this.addedTabIndex = false;\n }\n }\n\n private onPointerEnterTrigger(): void {\n this.pointerOnTrigger = true;\n this.scheduleShow();\n }\n\n private onPointerLeaveTrigger(): void {\n this.pointerOnTrigger = false;\n this.scheduleHide();\n }\n\n private onFocusTrigger(): void {\n if (!this.matchesFocusVisible()) return;\n this.triggerFocused = true;\n this.show();\n }\n\n private onBlurTrigger(): void {\n this.triggerFocused = false;\n this.scheduleHide();\n }\n\n private scheduleShow(): void {\n if (this.isOpen) {\n this.clearTimer('hide');\n return;\n }\n if (this.disabled() || !this.triggerElement || !this.contentTemplate) return;\n\n this.clearTimer('hide');\n this.clearTimer('show');\n const delay = Math.max(0, this.delay());\n this.showTimer = setTimeout(() => {\n this.showTimer = null;\n this.show();\n }, delay);\n }\n\n private scheduleHide(): void {\n this.clearTimer('show');\n this.clearTimer('hide');\n this.hideTimer = setTimeout(() => {\n this.hideTimer = null;\n if (this.pointerOnTrigger || this.pointerOnPanel || this.triggerFocused) return;\n this.hideNow();\n }, HIDE_DELAY_MS);\n }\n\n private clearTimer(which: 'show' | 'hide'): void {\n const timer = which === 'show' ? this.showTimer : this.hideTimer;\n if (timer === null) return;\n clearTimeout(timer);\n if (which === 'show') this.showTimer = null;\n else this.hideTimer = null;\n }\n\n private ensureOverlay(trigger: HTMLElement): OverlayRef {\n if (this.overlayRef) return this.overlayRef;\n\n const positionStrategy = createFlexibleConnectedPositionStrategy(this.injector, trigger)\n .withFlexibleDimensions(false)\n .withPush(true)\n .withPositions(this.positions());\n\n this.overlayRef = createOverlayRef(this.injector, {\n positionStrategy,\n scrollStrategy: createRepositionScrollStrategy(this.injector),\n panelClass: ['wm-tooltip-overlay', 'wm-rich-tooltip-overlay'],\n hasBackdrop: false,\n });\n\n const overlayEl = this.overlayRef.overlayElement;\n overlayEl.addEventListener('mouseenter', this.onPointerEnterPanel);\n overlayEl.addEventListener('mouseleave', this.onPointerLeavePanel);\n\n this.positionChanges = positionStrategy.positionChanges.subscribe((change) => {\n const above = change.connectionPair.overlayY === 'bottom';\n overlayEl.classList.toggle('wm-tooltip-above', above);\n });\n\n this.portal = new ComponentPortal(WmRichTooltipPanel, null, this.injector);\n return this.overlayRef;\n }\n\n private positions(): ConnectedPosition[] {\n const offset = 6;\n const below: ConnectedPosition = {\n originX: 'center', originY: 'bottom',\n overlayX: 'center', overlayY: 'top', offsetY: offset,\n };\n const above: ConnectedPosition = {\n originX: 'center', originY: 'top',\n overlayX: 'center', overlayY: 'bottom', offsetY: -offset,\n };\n const after: ConnectedPosition = {\n originX: 'end', originY: 'center',\n overlayX: 'start', overlayY: 'center', offsetX: offset,\n };\n const before: ConnectedPosition = {\n originX: 'start', originY: 'center',\n overlayX: 'end', overlayY: 'center', offsetX: -offset,\n };\n\n switch (this.position()) {\n case 'top': return [above, below, after, before];\n case 'left': return [before, after, above, below];\n case 'right': return [after, before, above, below];\n default: return [below, above, after, before];\n }\n }\n\n private readonly onPointerEnterPanel = (): void => {\n this.pointerOnPanel = true;\n this.clearTimer('hide');\n };\n\n private readonly onPointerLeavePanel = (): void => {\n this.pointerOnPanel = false;\n this.scheduleHide();\n };\n\n private attachDocumentListeners(): void {\n if (this.detachDocumentListeners) return;\n\n const onKeydown = (event: KeyboardEvent): void => {\n if (event.key === 'Escape') this.hideNow();\n };\n const onPointerDown = (): void => this.hideNow();\n const stopFollowing = onViewportChange(() => this.reanchor());\n\n document.addEventListener('keydown', onKeydown, true);\n document.addEventListener('pointerdown', onPointerDown, true);\n\n this.detachDocumentListeners = () => {\n document.removeEventListener('keydown', onKeydown, true);\n document.removeEventListener('pointerdown', onPointerDown, true);\n stopFollowing();\n };\n }\n\n private releaseDocumentListeners(): void {\n this.detachDocumentListeners?.();\n this.detachDocumentListeners = null;\n }\n\n private reanchor(): void {\n if (!this.overlayRef?.hasAttached()) return;\n if (this.isTriggerClipped()) {\n this.hideNow();\n return;\n }\n this.overlayRef.updatePosition();\n }\n\n private resolveClippingAncestors(trigger: HTMLElement): HTMLElement[] {\n const clipping: HTMLElement[] = [];\n let node = trigger.parentElement;\n\n while (node) {\n const style = getComputedStyle(node);\n const clips = [style.overflow, style.overflowX, style.overflowY].some(\n (value) => value === 'auto' || value === 'scroll' || value === 'hidden',\n );\n if (clips) clipping.push(node);\n node = node.parentElement;\n }\n return clipping;\n }\n\n private isTriggerClipped(): boolean {\n if (!this.triggerElement) return true;\n const trigger = this.triggerElement.getBoundingClientRect();\n const outside = (bounds: { top: number; bottom: number; left: number; right: number }) =>\n trigger.bottom < bounds.top ||\n trigger.top > bounds.bottom ||\n trigger.right < bounds.left ||\n trigger.left > bounds.right;\n\n const viewport = {\n top: 0,\n left: 0,\n bottom: window.innerHeight || document.documentElement.clientHeight,\n right: window.innerWidth || document.documentElement.clientWidth,\n };\n if (outside(viewport)) return true;\n return this.clippingAncestors.some((ancestor) => outside(ancestor.getBoundingClientRect()));\n }\n\n private relationAttribute(): string {\n return this.relation() === 'label' ? 'aria-labelledby' : 'aria-describedby';\n }\n\n private linkTriggerToPanel(trigger: HTMLElement): void {\n const attribute = this.relationAttribute();\n const next = withIdToken(trigger.getAttribute(attribute), this.panelId);\n this.renderer.setAttribute(trigger, attribute, next);\n }\n\n private unlinkTriggerFromPanel(): void {\n if (!this.triggerElement) return;\n for (const attribute of ['aria-describedby', 'aria-labelledby']) {\n const current = this.triggerElement.getAttribute(attribute);\n if (current === null) continue;\n\n const next = withoutIdToken(current, this.panelId);\n if (next === null) this.renderer.removeAttribute(this.triggerElement, attribute);\n else if (next !== current) this.renderer.setAttribute(this.triggerElement, attribute, next);\n }\n }\n\n private isNativelyFocusable(element: HTMLElement): boolean {\n if (element.hasAttribute('tabindex')) return true;\n return ['a', 'button', 'input', 'select', 'textarea', 'summary'].includes(\n element.tagName.toLowerCase(),\n );\n }\n\n private matchesFocusVisible(): boolean {\n if (!this.triggerElement) return false;\n try {\n return this.triggerElement.matches(':focus-visible');\n } catch {\n return true;\n }\n }\n\n private teardown(): void {\n this.hideNow();\n this.unbindTrigger();\n\n const overlayEl = this.overlayRef?.overlayElement;\n overlayEl?.removeEventListener('mouseenter', this.onPointerEnterPanel);\n overlayEl?.removeEventListener('mouseleave', this.onPointerLeavePanel);\n this.positionChanges?.unsubscribe();\n this.positionChanges = null;\n\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.portal = null;\n }\n}\n","// Components\nexport { WmModal } from './modal/modal';\nexport { WmDialog } from './dialog/dialog';\nexport { WmSelect } from './select/select';\nexport { WmPopover } from './popover/popover';\nexport { WmAutoFocus } from './popover/auto-focus.directive';\nexport { WmTabs } from './tabs/tabs';\nexport { WmTab } from './tabs/tab';\nexport { WmButton } from './button/button';\nexport { Checkbox } from './checkbox/checkbox';\nexport { NumberInput } from './number-input/number-input';\nexport { Toggle } from './toggle/toggle';\nexport { GhostField } from './ghost-field/ghost-field';\nexport { PageHeader } from './page-header/page-header';\nexport { WmCombobox } from './combobox/combobox';\nexport { WmToastContainer } from './toast/toast-container';\nexport { WmToastService } from './toast/toast.service';\nexport { WmTooltip } from './tooltip/tooltip';\nexport {\n WmRichTooltip,\n WmRichTooltipContent,\n WmRichTooltipTrigger,\n} from './tooltip/rich-tooltip';\nexport { WmAnchoredScrollStrategy } from './overlay/anchored-scroll-strategy';\nexport { onViewportChange } from './overlay/viewport-change';\n\n// The license UI is the separate `@wildmason/aegis/license` entry point\n// (`license/index.ts`): it calls Tauri commands, and this entry must stay\n// importable by a web app that has no Tauri runtime.\n\n// Types\nexport type { DialogSize } from './dialog/dialog';\nexport type { SelectOption } from './select/option';\nexport type { ButtonVariant, ButtonSize } from './button/button';\nexport type { ToastType, Toast } from './toast/toast.service';\nexport type { ComboboxOption } from './combobox/option';\nexport type { WmTooltipPosition, WmTooltipRelation } from './tooltip/tooltip';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["nextId","HIDE_DELAY_MS"],"mappings":";;;;;;;;;;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;MAQU,OAAO,CAAA;;AAElB,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAW;;IAGnC,OAAO,GAAG,MAAM,EAAQ;AAExB;;;;AAIG;AACH,IAAA,KAAK,GAAG,KAAK,CAAmB,QAAQ,4EAAC;IAGzC,QAAQ,GAAA;QACN,IAAI,IAAI,CAAC,OAAO,EAAE;AAAE,YAAA,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;IACzC;wGAjBW,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAP,OAAO,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAA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AA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,oBAAoB,8FACpB,oBAAoB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC3GnE;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"wildmason-aegis.mjs","sources":["../../src/modal/modal.ts","../../src/modal/modal.html","../../src/dialog/dialog.ts","../../src/dialog/dialog.html","../../src/overlay/viewport-change.ts","../../src/overlay/anchored-scroll-strategy.ts","../../src/select/select.ts","../../src/select/select.html","../../src/popover/popover.ts","../../src/popover/popover.html","../../src/popover/auto-focus.directive.ts","../../src/tabs/tab.ts","../../src/tabs/tabs.ts","../../src/tabs/tabs.html","../../src/button/button.ts","../../src/button/button.html","../../src/button/button.directive.ts","../../src/checkbox/checkbox.ts","../../src/checkbox/checkbox.html","../../src/number-input/number-input.ts","../../src/number-input/number-input.html","../../src/toggle/toggle.ts","../../src/toggle/toggle.html","../../src/slider/slider.ts","../../src/slider/slider.html","../../src/toggle-group/toggle-group.ts","../../src/ghost-field/ghost-field.ts","../../src/page-header/page-header.ts","../../src/page-header/page-header.html","../../src/combobox/combobox-panel.ts","../../src/combobox/combobox-panel.html","../../src/combobox/combobox.ts","../../src/combobox/combobox.html","../../src/toast/toast.service.ts","../../src/toast/toast-container.ts","../../src/toast/toast-container.html","../../src/tooltip/tooltip-panel.ts","../../src/tooltip/aria-tokens.ts","../../src/tooltip/tooltip.ts","../../src/tooltip/rich-tooltip-panel.ts","../../src/tooltip/rich-tooltip.ts","../../src/index.ts","../../src/wildmason-aegis.ts"],"sourcesContent":["import { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { Component, HostListener, input, output, ChangeDetectionStrategy } from '@angular/core';\n\n/**\n * WmModal — Lightweight modal backdrop with Escape key and click-outside dismissal.\n *\n * Owns the fixed backdrop, centering, keyboard/pointer dismissal AND the focus trap,\n * so individual modal components don't need to repeat this logic or add their own\n * HostListeners. The consumer supplies the whole panel: its surface, size, header\n * and close control.\n *\n * ## wm-modal or wm-dialog\n *\n * Reach for `wm-dialog` first. It is a complete dialog — header, title wired to\n * `aria-labelledby`, close button, padded scrolling body — and it is not limited to\n * its `size` presets: `--wm-dialog-width` sets any width (Helm uses up to 960px).\n * Use `wm-modal` when that chrome is wrong for the surface: a two-pane browser, a\n * command palette, a panel with its own toolbar or its own scroll regions.\n *\n * ## Focus is trapped here, and it has to be\n *\n * The trap lives on the wrapper INSIDE this component's `@if (visible())`, exactly as\n * `wm-dialog` does. That placement is not a style preference — it is the only placement\n * that works. `CdkTrapFocus.ngAfterContentInit` calls `attachAnchors()`, which is a\n * no-op unless the element already has a `parentNode`. An element the consumer projects\n * in through `<ng-content/>` does not have one at that moment, so a consumer-applied\n * `cdkTrapFocus` attaches zero anchors and silently traps nothing — `autoCapture` still\n * pulls focus in, which makes it look like it works, while Tab walks straight out the\n * back of the dialog. Three Helm surfaces shipped that way before it was measured.\n *\n * Consumers must therefore NOT add their own `cdkTrapFocus`; nesting a second trap\n * inside this one only creates a conflict. Consumers DO still own `role=\"dialog\"`,\n * `aria-modal` and the accessible name, because only they know what the dialog is.\n *\n * Usage:\n * <wm-modal [visible]=\"visible()\" (dismiss)=\"close()\">\n * <div class=\"panel\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"panel-title\">\n * <h2 id=\"panel-title\">Browse snapshot</h2>\n * <!-- modal panel content, including a visible close control -->\n * </div>\n * </wm-modal>\n *\n * For top-aligned panels (e.g. search/command palettes), use align=\"top\":\n * <wm-modal [visible]=\"visible()\" (dismiss)=\"close()\" align=\"top\">\n *\n * The projected content is wrapped in a stop-propagation container so clicks inside\n * the panel do not bubble up to the backdrop and trigger a dismiss.\n *\n * The backdrop's layout lives in this component's stylesheet, so it needs no utility\n * framework in the consumer. Its colour stays an inline\n * `background: var(--wm-modal-backdrop)`, because consumers detect an open modal\n * with `[style*=\"--wm-modal-backdrop\"]`.\n */\n@Component({\n selector: 'wm-modal',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CdkTrapFocus],\n templateUrl: './modal.html',\n styleUrl: './modal.css',\n})\nexport class WmModal {\n /** Whether the modal is currently open. */\n visible = input.required<boolean>();\n\n /** Emitted when the user requests the modal to close (Escape or backdrop click). */\n dismiss = output<void>();\n\n /**\n * Vertical alignment of the panel within the backdrop.\n * - 'center' (default): panel is centered on both axes\n * - 'top': panel sits 5rem below the top edge, for search/command overlays\n */\n align = input<'center' | 'top'>('center');\n\n @HostListener('document:keydown.escape')\n onEscape(): void {\n if (this.visible()) this.dismiss.emit();\n }\n}\n","@if (visible()) {\n <!-- The inline background is a contract, not a leftover: consumers detect an open\n modal with `[style*=\"--wm-modal-backdrop\"]`, so it must stay on this element. -->\n <div class=\"wm-modal-backdrop\"\n [class.wm-modal-backdrop--top]=\"align() === 'top'\"\n style=\"background: var(--wm-modal-backdrop)\"\n (click)=\"dismiss.emit()\">\n <!-- The trap must sit on an element this template owns, inside this `@if`, so it\n has a parentNode by the time CdkTrapFocus runs ngAfterContentInit. A consumer\n cannot achieve that on projected content — see the class doc. -->\n <div (click)=\"$event.stopPropagation()\" cdkTrapFocus [cdkTrapFocusAutoCapture]=\"true\">\n <ng-content />\n </div>\n </div>\n}\n","import { Component, HostListener, input, model } from '@angular/core';\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\n\nexport type DialogSize = 'sm' | 'md' | 'lg';\n\n/**\n * WmDialog — Modal dialog with backdrop, focus trap, and Escape key handling.\n *\n * Renders a fixed-position overlay that is always viewport-relative (not clipped\n * by ancestor overflow:hidden). Do NOT place inside a container that uses\n * CSS transform, perspective, or filter — fixed positioning breaks in that context.\n *\n * Usage:\n * <wm-dialog [(isOpen)]=\"open\" title=\"Confirm action\">\n * <div body>\n * <p>Are you sure?</p>\n * <div class=\"wm-dialog-footer\">\n * <wm-button variant=\"secondary\" (click)=\"open.set(false)\">Cancel</wm-button>\n * <wm-button variant=\"primary\" (click)=\"onConfirm()\">Confirm</wm-button>\n * </div>\n * </div>\n * </wm-dialog>\n *\n * Width:\n * `size` picks a preset (sm 360px, md 480px, lg 640px). For any other width, set the\n * `--wm-dialog-width` custom property on the host; it overrides every preset:\n * <wm-dialog [(isOpen)]=\"open\" title=\"Line history\" style=\"--wm-dialog-width: 800px\">\n * Fluid values work too, e.g. `min(90vw, 48rem)`. Whatever the width, the panel is\n * capped at `calc(100vw - 2rem)` wide and `calc(100dvh - 4rem)` tall.\n *\n * When the dialog chrome itself is wrong for the surface (a two-pane browser, a\n * command palette, a panel with its own toolbar), use `wm-modal` with your own panel.\n *\n * Accessibility:\n * - role=\"dialog\" + aria-modal=\"true\" on the panel\n * - aria-labelledby wired to the title element (when title is set)\n * - Focus is trapped inside the panel when open (cdkTrapFocus). Do not add a\n * cdkTrapFocus of your own inside the body; it would nest a second trap.\n * - Escape key closes the dialog\n * - Clicking the backdrop closes the dialog\n * - On close, focus returns to the element that had it when the dialog opened\n * (cdkTrapFocusAutoCapture records that element and refocuses it when the\n * trap is destroyed)\n */\n@Component({\n selector: 'wm-dialog',\n templateUrl: './dialog.html',\n styleUrl: './dialog.css',\n imports: [CdkTrapFocus],\n})\nexport class WmDialog {\n /** Two-way binding for open/closed state. */\n isOpen = model(false);\n\n /** Dialog heading text. When set, aria-labelledby is applied automatically. */\n title = input('');\n\n /**\n * Panel width preset. sm = 360px, md = 480px (default), lg = 640px.\n * `--wm-dialog-width` on the host overrides every preset.\n */\n size = input<DialogSize>('md');\n\n close(): void { this.isOpen.set(false); }\n\n @HostListener('document:keydown.escape')\n onEscape(): void {\n if (this.isOpen()) this.close();\n }\n}\n","@if (isOpen()) {\n <!-- Backdrop — click to close -->\n <div class=\"wm-dialog-backdrop\" (click)=\"close()\" aria-hidden=\"true\"></div>\n\n <!-- Panel -->\n <div\n class=\"wm-dialog\"\n [class]=\"'wm-dialog--' + size()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? 'wm-dialog-title' : null\"\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\"\n >\n <div class=\"wm-dialog-header\">\n <h2 class=\"wm-dialog-title\" id=\"wm-dialog-title\">{{ title() }}</h2>\n <button\n class=\"wm-dialog-close\"\n type=\"button\"\n (click)=\"close()\"\n aria-label=\"Close dialog\"\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"/>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"/>\n </svg>\n </button>\n </div>\n\n <div class=\"wm-dialog-body\">\n <ng-content select=\"[body]\" />\n </div>\n </div>\n}\n","/**\n * Notify a handler whenever anything that can move an anchored overlay moves.\n *\n * This exists because of one property of the DOM that CDK's `ScrollDispatcher`\n * does not account for: **`scroll` does not bubble.**\n *\n * `ScrollDispatcher` has exactly two sources. It listens for `scroll` on the\n * document in the *bubbling* phase, which therefore only ever hears the\n * document itself scrolling; and it hears containers that registered\n * themselves through a `cdkScrollable` directive. In an application shell that\n * is a fixed-height frame with an inner scrolling element — which is every\n * Wildmason product — the document never scrolls and nothing is registered, so\n * both sources are empty and any scroll strategy built on the dispatcher is a\n * silent no-op. The overlay keeps the coordinates it was born with while its\n * trigger scrolls out from under it.\n *\n * A **capture-phase** listener on the document sees the event from any\n * descendant, so nothing has to be annotated. Requiring every consumer to mark\n * their scroll containers — and failing invisibly when they forget — is not a\n * contract a design system should hand out.\n *\n * @param handler called on any scroll or resize while the subscription is live\n * @returns a function that removes exactly what was added\n */\nexport function onViewportChange(handler: () => void): () => void {\n // The capture flag must match between add and remove. A listener added with\n // capture and removed without it is never removed at all, and nothing\n // observable goes wrong until every scroll on the page is paying for\n // overlays that closed long ago.\n document.addEventListener('scroll', handler, true);\n window.addEventListener('resize', handler);\n\n return () => {\n document.removeEventListener('scroll', handler, true);\n window.removeEventListener('resize', handler);\n };\n}\n","import { OverlayRef, ScrollStrategy } from '@angular/cdk/overlay';\n\nimport { onViewportChange } from './viewport-change';\n\n/**\n * A scroll strategy that keeps a connected overlay anchored to its trigger,\n * including when the thing that scrolled was an ordinary `overflow: auto`\n * element rather than the document.\n *\n * CDK's own reposition strategy does the right thing and is simply never told:\n * it listens through `ScrollDispatcher`, which cannot hear a scroll from a\n * container that is not marked `cdkScrollable`. See `onViewportChange` for the\n * full account. This strategy listens in the capture phase instead, so the\n * consumer annotates nothing.\n */\nexport class WmAnchoredScrollStrategy implements ScrollStrategy {\n private overlayRef: OverlayRef | null = null;\n private release: (() => void) | null = null;\n\n attach(overlayRef: OverlayRef): void {\n this.overlayRef = overlayRef;\n }\n\n enable(): void {\n // enable() is called on every attach and can arrive more than once for one\n // overlay; a second subscription would reposition twice per scroll event.\n if (this.release) return;\n\n this.release = onViewportChange(() => {\n if (this.overlayRef?.hasAttached()) this.overlayRef.updatePosition();\n });\n }\n\n disable(): void {\n this.release?.();\n this.release = null;\n }\n\n detach(): void {\n this.disable();\n this.overlayRef = null;\n }\n}\n\n/*\n * Why each component holds its own instance rather than an application-wide\n * provider supplying one:\n *\n * A ScrollStrategy is inherently per-overlay. `attach()` stores a single\n * `overlayRef`, and `enable()` / `disable()` take no argument, so one shared\n * instance cannot tell two open overlays apart - a select inside a popover\n * would leave one of them anchored to the other. CDK's own strategies are\n * built by a factory for exactly this reason, and the only public token in\n * CDK 21, `CDK_CONNECTED_OVERLAY_DEFAULT_CONFIG`, carries an *instance*.\n *\n * So `wm-popover`, `wm-select` and `wm-combobox` each construct one. That also\n * makes the fix arrive with no setup: a consumer upgrading gets anchored\n * overlays without adding a provider, and an application that declares its own\n * `cdkConnectedOverlay` can pass `new WmAnchoredScrollStrategy()` to\n * `[cdkConnectedOverlayScrollStrategy]` the same way.\n *\n * `[wmTooltip]` does not use this - it owns its overlay directly and anchors\n * itself, including closing when its trigger is scrolled out of view.\n */\n","import {\n Component,\n ElementRef,\n computed,\n inject,\n input,\n model,\n signal,\n} from '@angular/core';\nimport { CdkConnectedOverlay, CdkOverlayOrigin, ConnectedPosition } from '@angular/cdk/overlay';\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { SelectOption } from './option';\nimport { WmAnchoredScrollStrategy } from '../overlay/anchored-scroll-strategy';\n\n/**\n * WmSelect — Accessible dropdown select built on Angular CDK Overlay.\n *\n * Provides a styled, keyboard-accessible alternative to the native <select> element\n * when you need custom option rendering or consistent cross-platform appearance.\n *\n * When to use:\n * - Single selection from a list of 4+ options\n * - When option labels are complex (icons, descriptions, status badges)\n * - When native <select> appearance is insufficient\n *\n * When NOT to use:\n * - 3 or fewer options → use a radio group (more scannable, no extra click)\n * - Multi-select → use a checkbox group or a combobox with chips\n * - Yes/No choices → use a Toggle or two radio buttons\n *\n * Options API:\n * options: SelectOption[] — Array of { value, label, disabled? } objects.\n *\n * Two-way binding:\n * <wm-select [(value)]=\"selectedValue\" [options]=\"myOptions\" />\n *\n * Accessibility:\n * - Trigger has role=\"combobox\", aria-expanded, aria-haspopup=\"listbox\"\n * - Panel has role=\"listbox\"; each option has role=\"option\" + aria-selected\n * - Disabled options have aria-disabled=\"true\"\n * - Focus is trapped inside the open panel (cdkTrapFocus)\n * - Clicking the backdrop closes the panel and returns focus to the trigger\n * - Keyboard: Enter/Space on trigger opens; Escape closes; arrow keys\n * navigate options (relies on natural tab order within the panel)\n * - Always pair with a visible label via <wm-label> or aria-label on the host\n */\n@Component({\n selector: 'wm-select',\n imports: [CdkConnectedOverlay, CdkOverlayOrigin, CdkTrapFocus],\n templateUrl: './select.html',\n styleUrl: './select.css',\n})\nexport class WmSelect {\n /**\n * Keeps the panel anchored to its trigger while an ancestor scrolls.\n *\n * One instance per component, because a ScrollStrategy holds a single\n * overlayRef and could not tell two open overlays apart. Without it the\n * panel takes CDK's default, which cannot hear a scroll from any container\n * that is not marked `cdkScrollable` - so in a fixed-height shell the panel\n * keeps the coordinates it was born with while the trigger scrolls away.\n */\n protected readonly scrollStrategy = new WmAnchoredScrollStrategy();\n\n /** Array of options to display. */\n options = input<SelectOption[]>([]);\n\n /** The currently selected value. Two-way bindable. */\n value = model<unknown>(null);\n\n /** Placeholder text shown when no option is selected. */\n placeholder = input('Select…');\n\n /** Disables the trigger and prevents the panel from opening. */\n disabled = input(false);\n\n protected isOpen = signal(false);\n\n protected selectedOption = computed(() =>\n this.options().find((o: SelectOption) => o.value === this.value()) ?? null\n );\n\n private hostEl = inject(ElementRef<HTMLElement>);\n\n protected get overlayWidth(): number {\n return this.hostEl.nativeElement.offsetWidth || 200;\n }\n\n protected positions: ConnectedPosition[] = [\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },\n ];\n\n protected toggleOpen(): void {\n if (!this.disabled()) {\n this.isOpen.update((v: boolean) => !v);\n }\n }\n\n protected selectOption(opt: SelectOption): void {\n if (!opt.disabled) {\n this.value.set(opt.value);\n this.isOpen.set(false);\n }\n }\n}\n","<!-- Trigger button — anchors the CDK overlay -->\n<div\n class=\"wm-select-host\"\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n>\n <button\n type=\"button\"\n role=\"combobox\"\n class=\"wm-select-trigger\"\n [class.is-open]=\"isOpen()\"\n [class.is-disabled]=\"disabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n aria-haspopup=\"listbox\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n [disabled]=\"disabled() || null\"\n (click)=\"toggleOpen()\"\n >\n <span class=\"wm-select-value\" [class.is-placeholder]=\"!selectedOption()\">\n {{ selectedOption()?.label ?? placeholder() }}\n </span>\n <!-- Chevron icon — rotates when open -->\n <svg\n class=\"wm-select-chevron\"\n [class.is-open]=\"isOpen()\"\n width=\"16\" height=\"16\" viewBox=\"0 0 24 24\"\n fill=\"none\" aria-hidden=\"true\"\n >\n <path d=\"M6 9l6 6 6-6\"\n stroke=\"currentColor\" stroke-width=\"2\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n\n<!-- Dropdown panel — rendered in CDK overlay container -->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"wm-select-backdrop\"\n (backdropClick)=\"isOpen.set(false)\"\n (detach)=\"isOpen.set(false)\"\n>\n <div\n class=\"wm-select-panel\"\n role=\"listbox\"\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\"\n >\n @for (opt of options(); track opt.value) {\n <button\n type=\"button\"\n role=\"option\"\n class=\"wm-select-option\"\n [class.is-selected]=\"opt.value === value()\"\n [class.is-disabled]=\"!!opt.disabled\"\n [attr.aria-selected]=\"opt.value === value()\"\n [attr.aria-disabled]=\"opt.disabled ? true : null\"\n [disabled]=\"opt.disabled || null\"\n (click)=\"selectOption(opt)\"\n >\n <span class=\"wm-select-option-label\">{{ opt.label }}</span>\n @if (opt.value === value()) {\n <!-- Checkmark for selected option -->\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <polyline points=\"20 6 9 17 4 12\"\n stroke=\"currentColor\" stroke-width=\"2.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n }\n </button>\n }\n </div>\n</ng-template>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Renderer2,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { CdkConnectedOverlay, CdkOverlayOrigin, ConnectedPosition } from '@angular/cdk/overlay';\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { WmAnchoredScrollStrategy } from '../overlay/anchored-scroll-strategy';\n\n/**\n * WmPopover — general-purpose CDK-overlay floating panel.\n *\n * A low-level primitive for dropdowns, menus, pickers, and any floating UI.\n * The parent controls open/close state; this component handles positioning,\n * backdrop, focus-trapping, and ARIA attribute management.\n *\n * Slots:\n * - [trigger] — the anchor element. Put the attribute on the focusable\n * element itself, never on a wrapper or on a component host\n * such as <wm-button>: the ARIA below goes to the element\n * that carries it. For an Aegis-styled trigger, use\n * `<button wmButton trigger>`. Nothing reads\n * `data-popover-trigger`\n * - [content] — the panel body (menu items, form, etc.). The panel carries\n * the role, so the body takes no role of its own\n *\n * Usage:\n * ```html\n * <wm-popover\n * [isOpen]=\"open()\"\n * (closed)=\"open.set(false)\"\n * role=\"menu\"\n * ariaLabel=\"Options\"\n * hasPopup=\"menu\"\n * align=\"end\"\n * >\n * <button trigger (click)=\"open.set(!open())\">Options</button>\n * <div content>\n * <button role=\"menuitem\" (click)=\"doThing()\">Do thing</button>\n * </div>\n * </wm-popover>\n * ```\n *\n * Accessibility:\n * - Trigger element automatically receives aria-haspopup (from `hasPopup`),\n * aria-expanded and aria-controls, plus role=\"button\" when it has no role.\n * They are rewritten on every change to `isOpen` or `hasPopup`, so the\n * consumer does not bind them\n * - Panel receives the configured role and optional accessible name. The\n * role goes on the panel only: the host element, which wraps the trigger,\n * never carries it, even when a consumer writes `role` as a static attribute\n * - A `dialog` or `alertdialog` panel receives aria-modal=\"true\" while it\n * captures focus (see `trapFocusAutoCapture`)\n * - Focus is trapped inside the open panel (cdkTrapFocus)\n * - A modal panel whose content has nothing tabbable (text only, or a lone\n * disabled button) takes focus itself (tabindex=\"-1\") and keeps it on Tab,\n * so focus is never left on the trigger that aria-modal makes inert\n * - Escape key closes the panel\n * - Backdrop click closes the panel\n *\n * Auto-focus:\n * - Add [wmAutoFocus] to any element inside [content] to focus it on open.\n * Import WmAutoFocus from @wildmason/aegis/components and add it to your component's imports.\n */\n@Component({\n selector: 'wm-popover',\n imports: [CdkConnectedOverlay, CdkOverlayOrigin, CdkTrapFocus],\n templateUrl: './popover.html',\n styleUrl: './popover.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n // A consumer writes `role=\"dialog\"` as a plain attribute, and Angular\n // copies a static attribute onto the host element as well as into the\n // `role` input. The host wraps only the trigger, so that copy would put\n // the trigger inside a second, unnamed dialog, or inside a menu that owns\n // no menuitem. The role belongs to the panel alone.\n '[attr.role]': 'null',\n },\n})\nexport class WmPopover {\n /**\n * Keeps the panel anchored to its trigger while an ancestor scrolls.\n *\n * One instance per component, because a ScrollStrategy holds a single\n * overlayRef and could not tell two open overlays apart. Without it the\n * panel takes CDK's default, which cannot hear a scroll from any container\n * that is not marked `cdkScrollable` - so in a fixed-height shell the panel\n * keeps the coordinates it was born with while the trigger scrolls away.\n */\n protected readonly scrollStrategy = new WmAnchoredScrollStrategy();\n\n /** Whether the panel is currently open. */\n readonly isOpen = input<boolean>(false);\n\n /** Panel width in pixels, or 'auto' to match content. */\n readonly width = input<string | number>('auto');\n\n /** ARIA role for the floating panel element. Use 'menu', 'listbox', 'dialog', etc. */\n readonly role = input<string>('dialog');\n\n /**\n * Accessible name applied to the floating panel element.\n *\n * Dialog-style popovers must provide either this label or their own\n * equivalent labelling relationship. Keeping the name on the panel shell\n * ensures the trigger's aria-controls points to the named semantic surface.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /** Value for aria-haspopup on the trigger element. */\n readonly hasPopup = input<string | boolean>('dialog');\n\n /** Horizontal alignment: 'start' aligns left edges, 'end' aligns right edges. */\n readonly align = input<'start' | 'end'>('start');\n\n /**\n * Whether the focus trap auto-captures focus into the panel on attach\n * and restores it on detach. Defaults to `true`, which is right for\n * menu / picker / dialog popovers where the user expects the first\n * focusable item inside the panel to receive focus.\n *\n * Set to `false` for typeahead surfaces (combobox dropdowns, autocomplete\n * pickers) where focus must stay on the trigger input — auto-capture\n * pulls focus into the panel and its restore-on-detach behaviour can\n * re-fire the trigger's `(focus)` handler in a way that re-opens the\n * popover, leaving the CDK overlay backdrop stuck on top of subsequent\n * clicks. The trap still constrains Tab/Shift+Tab cycling within the\n * panel when it has focus; this only opts out of the auto-capture and\n * auto-restore.\n */\n readonly trapFocusAutoCapture = input<boolean>(true);\n\n /**\n * `\"true\"` for a `dialog` or `alertdialog` panel that captures focus, else\n * no attribute.\n *\n * The panel opens over a click-catching backdrop, and a modal panel keeps\n * focus inside itself (see `onAttach` and `onPanelKeydown`), so nothing\n * outside it can be reached until it closes. A dialog that is modal must say\n * so, or a screen reader keeps reading the page behind it. `aria-modal` is\n * defined for those two roles only, so a menu or listbox panel gets no\n * attribute. With `trapFocusAutoCapture` off, focus is meant to stay on the\n * trigger outside the panel, and `aria-modal` would hide that focused\n * trigger from a screen reader, so the panel is not declared modal.\n */\n protected readonly ariaModal = computed(() => {\n const role = this.role();\n const modalRole = role === 'dialog' || role === 'alertdialog';\n return modalRole && this.trapFocusAutoCapture() ? 'true' : null;\n });\n\n /**\n * `-1` on a modal panel, so the panel itself can take focus when its content\n * has nothing tabbable. A non-modal panel stays unfocusable: a click on it\n * must not pull focus off a typeahead trigger input.\n */\n protected readonly panelTabIndex = computed(() => (this.ariaModal() ? -1 : null));\n\n /** Emitted when the panel should close (backdrop click, Escape key, CDK detach). */\n readonly closed = output<void>();\n\n private readonly renderer = inject(Renderer2);\n private readonly hostEl = inject(ElementRef);\n private readonly cdr = inject(ChangeDetectorRef);\n\n protected readonly panelId = 'wm-popover-' + Math.random().toString(36).substring(2, 9);\n protected readonly panel = viewChild<ElementRef<HTMLElement>>('panel');\n private readonly trap = viewChild(CdkTrapFocus);\n\n constructor() {\n effect(() => {\n const open = this.isOpen();\n const popup = this.hasPopup();\n this.cdr.markForCheck();\n\n const el: Element | null = this.hostEl.nativeElement.querySelector('[trigger]');\n if (!el) return;\n\n this.renderer.setAttribute(el, 'aria-haspopup', String(popup));\n this.renderer.setAttribute(el, 'aria-expanded', String(open));\n this.renderer.setAttribute(el, 'aria-controls', this.panelId);\n\n if (!el.getAttribute('role')) {\n this.renderer.setAttribute(el, 'role', 'button');\n }\n });\n }\n\n protected get positions(): ConnectedPosition[] {\n const x = this.align();\n return [\n { originX: x, originY: 'bottom', overlayX: x, overlayY: 'top', offsetY: 4 },\n { originX: x, originY: 'top', overlayX: x, overlayY: 'bottom', offsetY: -4 },\n ];\n }\n\n /**\n * Runs after the focus trap's own capture, which CDK defers to the next\n * render. A `[wmAutoFocus]` element takes focus first. Otherwise a modal\n * panel that the trap left without focus takes focus itself. The trap finds\n * nothing to focus when the content has no tabbable element (text only, or a\n * lone disabled button), and it then leaves focus on the trigger, which\n * `aria-modal` has just made inert to a screen reader.\n */\n protected onAttach(): void {\n setTimeout(() => {\n const panelEl = this.panel()?.nativeElement;\n if (!panelEl) return;\n const el = panelEl.querySelector('[wmAutoFocus]') as HTMLElement | null;\n if (!el) {\n if (this.ariaModal() && !panelEl.contains(panelEl.ownerDocument.activeElement)) {\n panelEl.focus();\n }\n return;\n }\n el.focus();\n if (typeof (el as any).showPicker === 'function') {\n const type = (el as HTMLInputElement).type;\n if (el.tagName === 'SELECT' || ['date', 'time', 'color'].includes(type)) {\n try { (el as any).showPicker(); } catch { /* ignore */ }\n }\n }\n }, 10);\n }\n\n /**\n * Tab and Shift+Tab while focus is on a modal panel itself, not on a control\n * inside it. Focus moves to the first or the last tabbable control. With none,\n * focus stays on the panel. The trap's own boundary anchors cannot do this:\n * with nothing tabbable inside, the anchor keeps focus, and the next Tab\n * leaves the overlay for the page behind the backdrop.\n */\n protected onPanelKeydown(event: KeyboardEvent): void {\n if (event.key !== 'Tab' || !this.ariaModal()) return;\n if (event.target !== this.panel()?.nativeElement) return;\n event.preventDefault();\n const focusTrap = this.trap()?.focusTrap;\n if (event.shiftKey) {\n focusTrap?.focusLastTabbableElement();\n } else {\n focusTrap?.focusFirstTabbableElement();\n }\n }\n\n protected onClose(): void {\n this.closed.emit();\n }\n}\n","<!-- Trigger anchor -->\n<div cdkOverlayOrigin #origin=\"cdkOverlayOrigin\" class=\"wm-popover-trigger\">\n <ng-content select=\"[trigger]\"></ng-content>\n</div>\n\n<!-- Floating panel -->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"onClose()\"\n (detach)=\"onClose()\"\n (attach)=\"onAttach()\"\n>\n <div\n #panel\n [id]=\"panelId\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"ariaModal()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.tabindex]=\"panelTabIndex()\"\n class=\"wm-popover-panel\"\n [style.width]=\"width() === 'auto' ? 'auto' : width() + 'px'\"\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"trapFocusAutoCapture()\"\n (keydown.escape)=\"onClose()\"\n (keydown)=\"onPanelKeydown($event)\"\n >\n <ng-content select=\"[content]\"></ng-content>\n </div>\n</ng-template>\n","import { AfterViewInit, Directive, ElementRef, Input, inject } from '@angular/core';\n\n/**\n * WmAutoFocus — focuses an element when it enters the DOM.\n *\n * Usage: add [wmAutoFocus] to any focusable element inside a <wm-popover> panel.\n * For date/time/color/select inputs, also attempts to open the native picker UI.\n *\n * @example\n * <input wmAutoFocus type=\"text\" />\n * <input [wmAutoFocus]=\"shouldFocus\" type=\"date\" />\n */\n@Directive({\n selector: '[wmAutoFocus]',\n})\nexport class WmAutoFocus implements AfterViewInit {\n @Input('wmAutoFocus') enabled: boolean | '' = true;\n\n readonly #el = inject(ElementRef<HTMLElement>);\n\n ngAfterViewInit(): void {\n if (this.enabled === false) return;\n\n setTimeout(() => {\n const el = this.#el.nativeElement;\n if (!el) return;\n\n el.focus();\n\n const isPickerType =\n el.tagName === 'SELECT' ||\n (el.tagName === 'INPUT' &&\n ['date', 'time', 'color', 'datetime-local', 'month', 'week'].includes(\n (el as HTMLInputElement).type\n ));\n\n if (isPickerType && typeof (el as any).showPicker === 'function') {\n try {\n (el as any).showPicker();\n } catch {\n // Browser may reject showPicker() if not triggered by user gesture\n }\n }\n }, 50);\n }\n}\n","import { Component, ChangeDetectionStrategy, input, viewChild, TemplateRef } from '@angular/core';\n\n@Component({\n selector: 'wm-tab',\n template: `<ng-template #tmpl><ng-content /></ng-template>`,\n host: { style: 'display: none' },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WmTab {\n readonly value = input.required<string>();\n\n /**\n * Keeps a prerequisite-gated tab discoverable while preventing activation.\n * Unlike a native disabled button, unavailable tabs remain in the roving\n * focus order so keyboard and assistive-technology users can learn why the\n * destination cannot be opened yet.\n */\n readonly unavailable = input(false);\n\n /** Exact prerequisite guidance exposed to both pointer and AT users. */\n readonly unavailableReason = input('');\n\n /** Render a non-interactive group divider immediately before this tab. */\n readonly separatorBefore = input(false);\n\n readonly tmpl = viewChild.required<TemplateRef<void>>('tmpl');\n}\n","import {\n Component,\n ChangeDetectionStrategy,\n ElementRef,\n computed,\n contentChildren,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { WmTab } from './tab';\n\n/**\n * WmTabs — an ARIA tablist of `<wm-tab>` children with a roving tab stop.\n *\n * Usage:\n * <wm-tabs [activeValue]=\"tool()\" ariaLabel=\"Navigator tools\" (select)=\"tool.set($event)\">\n * <wm-tab value=\"graph\">Graph</wm-tab>\n * <wm-tab value=\"search\">Search</wm-tab>\n * </wm-tabs>\n *\n * Selection:\n * - `activeValue` names the selected tab. `null`, or a value no tab carries,\n * selects nothing: every tab reports aria-selected=\"false\" and none paints\n * as active. Use it when the stage shows something that is not any tab's\n * panel, such as a document opened from a second tablist in the same row.\n * - The tablist always keeps exactly one tab stop: the focused tab while\n * focus is inside, otherwise the selected tab, otherwise the first tab that\n * is not unavailable (the first tab when every tab is unavailable).\n * - Arrow keys, Home and End move focus only. A tab is selected on click,\n * Enter or Space, which emit `(select)`; the consumer sets `activeValue`.\n *\n * Accessibility:\n * - `ariaLabel` or `ariaLabelledby` names the inner role=\"tablist\". Name\n * every tablist that shares a surface with another one, or assistive\n * technology cannot tell them apart. `ariaLabelledby` wins when both are\n * set. An `aria-label` attribute on the `<wm-tabs>` host names nothing: the\n * host has no role, so the attribute never reaches the tablist.\n * - Each tab is `id=\"wm-tab-{value}\"` with `aria-controls=\"wm-panel-{value}\"`.\n * Give the panel that id and role=\"tabpanel\". The ids are built from the\n * value alone, so values must be unique across every tablist on the page.\n */\n@Component({\n selector: 'wm-tabs',\n templateUrl: './tabs.html',\n styleUrl: './tabs.css',\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WmTabs {\n /**\n * Value of the selected tab. `null`, or a value that matches no tab, selects\n * nothing; the tablist still keeps one tab stop (see the class comment).\n */\n readonly activeValue = input.required<string | null>();\n readonly variant = input<'line' | 'pill'>('line');\n\n /** Accessible name for the tablist. Ignored while `ariaLabelledby` is set. */\n readonly ariaLabel = input<string | null>(null);\n\n /**\n * Id of a visible element that names the tablist. Prefer it over\n * `ariaLabel` when a visible caption exists, so the accessible name matches\n * the visible text (WCAG 2.5.3, Label in Name).\n */\n readonly ariaLabelledby = input<string | null>(null);\n\n readonly select = output<string>();\n\n protected readonly tabs = contentChildren(WmTab);\n\n /**\n * Value of the tab that holds focus, or null while focus is outside the\n * tablist. Keyed by value, not index, so a tab added or removed before it\n * cannot move the stop onto a different tab or off the end of the list.\n */\n protected readonly focusedValue = signal<string | null>(null);\n\n /** Index of the one tab that is in the page's Tab order. */\n protected readonly tabStop = computed(() => {\n const tabs = this.tabs();\n const focused = this.focusedValue();\n const focusedIndex = focused === null ? -1 : tabs.findIndex(t => t.value() === focused);\n if (focusedIndex >= 0) return focusedIndex;\n const active = this.activeValue();\n const activeIndex = active === null ? -1 : tabs.findIndex(t => t.value() === active);\n if (activeIndex >= 0) return activeIndex;\n const firstAvailable = tabs.findIndex(t => !t.unavailable());\n return firstAvailable >= 0 ? firstAvailable : 0;\n });\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n protected selectTab(tab: WmTab): void {\n this.focusedValue.set(tab.value());\n if (!tab.unavailable()) this.select.emit(tab.value());\n }\n\n protected onBlur(): void {\n setTimeout(() => {\n // This tablist only. Focus that moved to a second <wm-tabs> must still\n // return this one's stop to its selected tab.\n if (!this.host.nativeElement.contains(document.activeElement)) {\n this.focusedValue.set(null);\n }\n }, 0);\n }\n\n protected onKeyDown(event: KeyboardEvent, container: HTMLElement): void {\n const tabs = this.tabs();\n if (tabs.length === 0) return;\n const currentIndex = this.tabStop();\n let nextIndex: number | null = null;\n\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowDown':\n nextIndex = (currentIndex + 1) % tabs.length;\n break;\n case 'ArrowLeft':\n case 'ArrowUp':\n nextIndex = (currentIndex - 1 + tabs.length) % tabs.length;\n break;\n case 'Home': nextIndex = 0; break;\n case 'End': nextIndex = tabs.length - 1; break;\n }\n\n if (nextIndex !== null) {\n event.preventDefault();\n this.focusedValue.set(tabs[nextIndex].value());\n const btns = container.querySelectorAll<HTMLButtonElement>('[role=\"tab\"]');\n btns[nextIndex]?.focus();\n }\n }\n}\n","<div\n class=\"wm-tabs\"\n [class.wm-tabs--line]=\"variant() === 'line'\"\n [class.wm-tabs--pill]=\"variant() === 'pill'\"\n role=\"tablist\"\n [attr.aria-label]=\"ariaLabelledby() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledby() || null\"\n #container\n (keydown)=\"onKeyDown($event, container)\"\n>\n @for (tab of tabs(); track tab.value(); let i = $index) {\n @if (tab.separatorBefore()) {\n <span\n class=\"wm-tab-separator\"\n role=\"separator\"\n aria-orientation=\"vertical\"\n ></span>\n }\n <button\n type=\"button\"\n role=\"tab\"\n class=\"wm-tab\"\n [id]=\"'wm-tab-' + tab.value()\"\n [attr.aria-selected]=\"activeValue() === tab.value()\"\n [attr.aria-controls]=\"'wm-panel-' + tab.value()\"\n [attr.aria-disabled]=\"tab.unavailable() ? true : null\"\n [attr.aria-description]=\"tab.unavailable() ? tab.unavailableReason() : null\"\n [attr.title]=\"tab.unavailable() ? tab.unavailableReason() : null\"\n [tabIndex]=\"tabStop() === i ? 0 : -1\"\n [class.is-active]=\"activeValue() === tab.value()\"\n [class.is-unavailable]=\"tab.unavailable()\"\n (click)=\"selectTab(tab)\"\n (focus)=\"focusedValue.set(tab.value())\"\n (blur)=\"onBlur()\"\n >\n <ng-container [ngTemplateOutlet]=\"tab.tmpl()\" />\n </button>\n }\n</div>\n","import { Component, computed, input } from '@angular/core';\n\n/**\n * `dashed` is the empty slot: the place a new item goes, at the end of the\n * list it adds to. It sets colour and the dash only; a full-width slot is a\n * `[wmButton]` with the consumer's own width class. For any other quiet\n * action, use `ghost`.\n */\nexport type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'destructive' | 'flat' | 'dashed';\nexport type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';\n\n/**\n * The class set for one button. `<wm-button>` puts it on its inner `<button>`\n * and `[wmButton]` puts it on the host, so the two forms cannot drift apart.\n */\nexport function wmButtonClass(variant: ButtonVariant, size: ButtonSize, iconOnly: boolean): string {\n const base = `wm-btn wm-btn--${variant} wm-btn--${size}`;\n return iconOnly ? `${base} btn-icon-only` : base;\n}\n\n/**\n * WmButton — an Aegis button as an element: `<wm-button variant=\"ghost\">`.\n *\n * The host wraps a real `<button>` and passes it four inputs: `disabled`,\n * `type`, `ariaLabel` (as `aria-label`) and `btnTitle` (as `title`). Nothing\n * else crosses. An attribute, class or directive written on `<wm-button>` stays on\n * the host, which has no role and cannot take focus. When something must reach\n * the element a screen reader and the keyboard use (ARIA state such as\n * `aria-pressed` or `aria-expanded`, `cdkFocusInitial`, an `id` another element\n * points at, a popover `trigger`, `[wmTooltip]`, a class that changes the\n * button's own box), write a native element with `[wmButton]` instead:\n *\n * ```html\n * <button wmButton variant=\"ghost\" [attr.aria-pressed]=\"wrap()\">Wrap</button>\n * ```\n */\n@Component({\n selector: 'wm-button',\n templateUrl: './button.html',\n styleUrl: './button.css',\n})\nexport class WmButton {\n readonly variant = input<ButtonVariant>('primary');\n readonly size = input<ButtonSize>('md');\n readonly disabled = input(false);\n readonly type = input<'button' | 'submit' | 'reset'>('button');\n\n /** Makes the button square (equal width/height). Use for icon-only buttons. */\n readonly iconOnly = input(false);\n\n /** Accessible label forwarded to the inner <button>. Required for icon-only buttons. */\n readonly ariaLabel = input('');\n\n /** Tooltip text forwarded to the inner <button>. Named btnTitle to avoid native attribute conflict. */\n readonly btnTitle = input('');\n\n protected readonly btnClass = computed(() =>\n wmButtonClass(this.variant(), this.size(), this.iconOnly()),\n );\n}\n","<button\n [class]=\"btnClass()\"\n [disabled]=\"disabled()\"\n [type]=\"type()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.title]=\"btnTitle() || null\"\n>\n <ng-content />\n</button>\n","import { Directive, ElementRef, booleanAttribute, computed, inject, input } from '@angular/core';\nimport { ButtonSize, ButtonVariant, wmButtonClass } from './button';\n\n/**\n * WmButtonDirective — the Aegis button classes on a native `<button>` or `<a>`.\n *\n * It renders exactly the class set `<wm-button>` puts on its inner button, but\n * on the element the consumer writes. That element is the focusable one, so\n * every attribute and directive on it reaches the right place with no\n * forwarding list: ARIA state, `cdkFocusInitial`, `id`, `form`, a popover\n * `trigger`, `[wmTooltip]`, test ids and consumer classes.\n *\n * Use `<wm-button>` by default. Use this when one of those has to land on the\n * button itself (see `WmButton` for what the component forwards).\n *\n * - `variant`, `size` and `iconOnly` mean what they mean on `<wm-button>`.\n * - Classes the consumer writes, static or bound, are kept.\n * - A `<button>` with no `type` gets `type=\"button\"`, the `<wm-button>`\n * default, so it does not submit a surrounding form. A written or bound\n * `type` wins. An `<a>` is left alone.\n * - Everything else is native: write `disabled`, `aria-label` and `title`\n * directly. An `<a>` cannot be disabled.\n *\n * @example\n * <button wmButton variant=\"ghost\" size=\"sm\" [attr.aria-pressed]=\"wrap()\" (click)=\"toggleWrap()\">\n * Wrap lines\n * </button>\n * <button wmButton variant=\"secondary\" cdkFocusInitial (click)=\"cancel()\">Keep editing</button>\n * <a wmButton variant=\"ghost\" href=\"/back\">Back</a>\n */\n@Directive({\n selector: 'button[wmButton], a[wmButton]',\n host: {\n '[class]': 'hostClass()',\n },\n})\nexport class WmButtonDirective {\n readonly variant = input<ButtonVariant>('primary');\n readonly size = input<ButtonSize>('md');\n /** Makes the button square. An icon-only button still needs an `aria-label`. */\n readonly iconOnly = input(false, { transform: booleanAttribute });\n\n protected readonly hostClass = computed(() =>\n wmButtonClass(this.variant(), this.size(), this.iconOnly()),\n );\n\n constructor() {\n // Static attributes are on the element before a directive is constructed,\n // and a `[type]` or `[attr.type]` binding runs after, so this sets a default\n // that anything the consumer writes overrides.\n const element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n if (element.tagName === 'BUTTON' && !element.hasAttribute('type')) {\n element.setAttribute('type', 'button');\n }\n }\n}\n","import { Component, computed, input, model } from '@angular/core';\n\n/**\n * WmCheckbox — Boolean selection control with optional indeterminate state.\n *\n * When to use:\n * - Multi-select lists (each item is independent)\n * - Form options that require explicit confirmation before taking effect\n * - Parent/child hierarchical selection (use indeterminate for \"some selected\")\n *\n * When NOT to use:\n * - Mutually exclusive choices → use radio buttons instead\n * - Immediate-effect toggles (e.g. dark mode) → use Toggle instead\n *\n * Accessibility:\n * - role=\"checkbox\" with aria-checked=\"true|false|mixed\"\n * - \"mixed\" maps to the indeterminate state for screen readers\n * - Space activates the checkbox (native button behaviour)\n * - Focus ring uses a double-ring (canvas gap + accent) pattern for maximum visibility\n * across all themes, meeting WCAG 2.1 SC 1.4.11 Non-text Contrast\n * - When wrapping in a group, add role=\"group\" + aria-labelledby to the container\n */\n@Component({\n selector: 'wm-checkbox',\n templateUrl: './checkbox.html',\n styleUrl: './checkbox.css',\n})\nexport class Checkbox {\n /** Two-way bindable checked state. */\n checked = model(false);\n\n /**\n * Shows a dash icon instead of a checkmark. Typically used for a \"select all\"\n * checkbox when only some child items are selected.\n * Note: indeterminate is display-only — clicking always toggles to true/false.\n */\n indeterminate = input(false);\n\n /** Visible text label rendered next to the checkbox box. */\n label = input('');\n\n disabled = input(false);\n\n /** Maps to aria-checked: true, false, or \"mixed\" (for indeterminate). */\n protected ariaChecked = computed<boolean | 'mixed'>(() => {\n if (this.indeterminate() && !this.checked()) return 'mixed';\n return this.checked();\n });\n\n toggle(): void {\n if (!this.disabled()) {\n this.checked.update(v => !v);\n }\n }\n}\n","<label class=\"wm-checkbox-wrap\" [class.is-disabled]=\"disabled()\">\n <button\n type=\"button\"\n role=\"checkbox\"\n class=\"wm-checkbox-box\"\n [class.is-checked]=\"checked()\"\n [class.is-indeterminate]=\"indeterminate() && !checked()\"\n [attr.aria-checked]=\"ariaChecked()\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n [disabled]=\"disabled() || null\"\n (click)=\"toggle()\"\n (keydown.space)=\"$event.preventDefault(); toggle()\"\n >\n @if (indeterminate() && !checked()) {\n <!-- Dash for indeterminate (\"some selected\") state -->\n <svg class=\"wm-checkbox-icon\" viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n <line x1=\"2\" y1=\"6\" x2=\"10\" y2=\"6\"\n stroke=\"currentColor\" stroke-width=\"2.25\" stroke-linecap=\"round\"/>\n </svg>\n } @else if (checked()) {\n <!-- Animated checkmark for selected state -->\n <svg class=\"wm-checkbox-icon\" viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n <polyline class=\"check-mark\" points=\"2,6.5 4.5,9 10,3\"\n fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n }\n </button>\n\n @if (label()) {\n <span class=\"wm-checkbox-label\">{{ label() }}</span>\n }\n</label>\n","import {\n Component,\n ElementRef,\n forwardRef,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/**\n * WmNumberInput — Numeric input with stepper buttons.\n *\n * Implements ControlValueAccessor so it works with both template-driven forms\n * (ngModel) and reactive forms (formControl / formControlName).\n *\n * When to use:\n * - Quantity fields (items in cart, repetitions, page count)\n * - Bounded numeric settings with a known min/max (timeout seconds, font size)\n *\n * When NOT to use:\n * - Free-form numeric entry without bounds → plain <input type=\"number\">\n * - Currency or phone numbers → use a text input with masking\n *\n * Accessibility:\n * - The underlying <input type=\"number\"> is the focusable control.\n * - Stepper buttons have tabindex=\"-1\" — they are mouse/touch targets only.\n * Keyboard users use the arrow keys on the input itself (native browser behaviour).\n * - Always provide an aria-label or visible label via <wm-field> + <wm-label>.\n * - The buttons use mousedown + preventDefault to avoid stealing focus from the input.\n *\n * Form integration:\n * <!-- Template-driven -->\n * <wm-number-input [(ngModel)]=\"count\" [min]=\"0\" [max]=\"100\" />\n *\n * <!-- Reactive -->\n * <wm-number-input formControlName=\"quantity\" [step]=\"5\" />\n */\n@Component({\n selector: 'wm-number-input',\n templateUrl: './number-input.html',\n styleUrl: './number-input.css',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NumberInput),\n multi: true,\n },\n ],\n})\nexport class NumberInput implements ControlValueAccessor {\n /** Minimum allowed value. */\n min = input<number | null>(null);\n\n /** Maximum allowed value. */\n max = input<number | null>(null);\n\n /** Amount to increment/decrement per step. Defaults to 1. */\n step = input(1);\n\n /** Placeholder text shown when the field is empty. */\n placeholder = input('0');\n\n /** Disables the control from the template. Also set automatically by reactive forms. */\n disabled = input(false);\n\n protected inputRef = viewChild<ElementRef<HTMLInputElement>>('inputEl');\n protected internalValue = signal<number | null>(null);\n\n private onChangeFn: (v: number | null) => void = () => {};\n protected onTouchedFn: () => void = () => {};\n\n /** CVA interface — called when the form model changes programmatically. */\n writeValue(value: number | null): void {\n this.internalValue.set(value ?? null);\n }\n\n registerOnChange(fn: (v: number | null) => void): void {\n this.onChangeFn = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouchedFn = fn;\n }\n\n protected onInputChange(event: Event): void {\n const raw = (event.target as HTMLInputElement).value;\n const num = raw === '' ? null : parseFloat(raw);\n this.internalValue.set(num);\n this.onChangeFn(num);\n this.onTouchedFn();\n }\n\n protected increment(): void {\n const curr = this.internalValue() ?? 0;\n const next = curr + this.step();\n const max = this.max();\n this.setValue(max !== null ? Math.min(next, max) : next);\n }\n\n protected decrement(): void {\n const curr = this.internalValue() ?? 0;\n const next = curr - this.step();\n const min = this.min();\n this.setValue(min !== null ? Math.max(next, min) : next);\n }\n\n /**\n * Prevents the stepper buttons from stealing focus away from the input element.\n * Without this, clicking a button would blur the input, hiding any validation state.\n */\n protected preventFocusSteal(event: MouseEvent): void {\n event.preventDefault();\n }\n\n private setValue(val: number): void {\n this.internalValue.set(val);\n this.onChangeFn(val);\n this.onTouchedFn();\n const el = this.inputRef();\n if (el) el.nativeElement.value = String(val);\n }\n}\n","<!--\n Uses .wm-input-group and .wm-number-* classes from inputs.css.\n The input fills the group; the controls column sits at the trailing edge.\n-->\n<div\n class=\"wm-input-group wm-number-field\"\n [class.is-disabled]=\"disabled()\"\n>\n <input\n #inputEl\n type=\"number\"\n class=\"wm-input-bare wm-number-input\"\n [value]=\"internalValue() ?? ''\"\n [placeholder]=\"placeholder()\"\n [attr.min]=\"min() ?? null\"\n [attr.max]=\"max() ?? null\"\n [step]=\"step()\"\n [disabled]=\"disabled() || null\"\n (change)=\"onInputChange($event)\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onTouchedFn()\"\n />\n\n <div class=\"wm-number-controls\" aria-hidden=\"true\">\n <button\n type=\"button\"\n class=\"wm-number-btn\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || null\"\n (mousedown)=\"preventFocusSteal($event)\"\n (click)=\"increment()\"\n aria-label=\"Increment\"\n >\n <!-- chevron-up (lucide) -->\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"m18 15-6-6-6 6\"/>\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wm-number-btn\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || null\"\n (mousedown)=\"preventFocusSteal($event)\"\n (click)=\"decrement()\"\n aria-label=\"Decrement\"\n >\n <!-- chevron-down (lucide) -->\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"m6 9 6 6 6-6\"/>\n </svg>\n </button>\n </div>\n</div>\n","import { Component, input, model } from '@angular/core';\n\n/**\n * WmToggle — Binary on/off control.\n *\n * Use for settings that take effect immediately without a form submit.\n * For settings that need an explicit \"Save\" action, prefer a checkbox.\n *\n * Accessibility:\n * - role=\"switch\" communicates binary state to screen readers\n * - aria-checked reflects true/false\n * - aria-label required when no visible text label surrounds the toggle\n * - Space and Enter activate the toggle (native button behaviour)\n * - When disabled, aria state is preserved so SR users understand why it can't be changed\n */\n@Component({\n selector: 'wm-toggle',\n templateUrl: './toggle.html',\n styleUrl: './toggle.css',\n})\nexport class Toggle {\n /** Two-way bindable state. Use [(checked)]=\"mySignal\" or [checked]=\"val\" (changeChecked)=\"val=$event\". */\n checked = model(false);\n\n /** Visually and functionally disables the toggle. State is still readable by assistive tech. */\n disabled = input(false);\n\n /** Accessible label. Required if no visible label text surrounds the toggle in the DOM. */\n ariaLabel = input('Toggle');\n\n toggle(): void {\n if (!this.disabled()) {\n this.checked.update(v => !v);\n }\n }\n}\n","<button\n type=\"button\"\n role=\"switch\"\n class=\"wm-toggle\"\n [class.is-on]=\"checked()\"\n [class.is-disabled]=\"disabled()\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n [disabled]=\"disabled() || null\"\n (click)=\"toggle()\"\n>\n <span class=\"wm-toggle-track\" aria-hidden=\"true\">\n <span class=\"wm-toggle-thumb\"></span>\n </span>\n</button>\n","import {\n Component,\n computed,\n effect,\n forwardRef,\n input,\n model,\n signal,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/** How the track itself is drawn. See the `track` input. */\nexport type WmSliderTrack = 'rail' | 'segmented';\n\n/** A stop on the grid. A tick outside min..max is not drawn. */\nexport interface WmSliderTick {\n value: number;\n /** Optional caption under the tick. Ticks without one draw as a bare mark. */\n label?: string;\n /**\n * Visual weight. `major` is the default and draws a full mark; `minor` draws a\n * shorter, lighter one. Two levels are what let a dense range carry a readable\n * grid — a labelled major every 10 with a minor every 5 — without the grid\n * having to match the step.\n */\n level?: 'major' | 'minor';\n}\n\n/**\n * Computes the grid from the live range. Use it when the stops are not a fixed\n * list and not a constant interval — a logarithmic scale, or a grid that changes\n * with the bounds.\n */\nexport type WmSliderTickFn = (ctx: {\n min: number;\n max: number;\n step: number;\n}) => WmSliderTick[];\n\n/**\n * Upper bound on generated marks. A numeric interval that would exceed it draws\n * NOTHING rather than a truncated grid or a frozen tab: an empty rail is\n * obviously wrong to whoever set it, where a silently shortened grid is not.\n */\nconst MAX_TICKS = 1000;\n\n/**\n * Upper bound on reserved readout strings. Only labelled stops reach this, so\n * it is a guard against a pathological grid rather than a limit anyone meets.\n */\nconst MAX_VALUE_CANDIDATES = 64;\n\n/** One tick after it has been measured against the current range. */\ninterface ResolvedTick extends WmSliderTick {\n level: 'major' | 'minor';\n fraction: number;\n left: string;\n passed: boolean;\n}\n\n/** One block of a segmented track, bounded by two adjacent grid stops. */\ninterface Segment {\n from: number;\n to: number;\n span: number;\n /** How far the value has travelled into this block, 0..1. */\n fill: number;\n passed: boolean;\n current: boolean;\n}\n\n/**\n * WmSlider — Continuous value selection along a bounded range.\n *\n * Built on a native `<input type=\"range\">`. The native control is the whole\n * interaction: pointer drag, touch, arrow keys, Home/End, Page Up/Page Down,\n * RTL mirroring and the implicit `role=\"slider\"` with `aria-valuenow` all come\n * from the browser rather than from hand-written handlers. Aegis styles the\n * track and thumb through the range pseudo-elements, so there is no invisible\n * overlay input and no drag maths to get wrong.\n *\n * When to use:\n * - A bounded value where the approximate position matters more than the exact\n * number (volume, opacity, zoom, a brightness or threshold setting)\n * - A value the user wants to sweep through and preview as it changes\n *\n * When NOT to use:\n * - An exact number the user knows before they start typing it → <wm-number-input>\n * - Fewer than about five discrete choices → <wm-toggle-group> or <wm-select>\n * - An unbounded value — a slider has to have a min and a max\n *\n * Value pipeline: every value, whether it arrives from a two-way binding, a\n * form, or a drag, is clamped into min..max and snapped onto the step grid\n * measured FROM MIN. The snapped value is written back, so the binding, the\n * form control and the thumb never disagree.\n *\n * Accessibility:\n * - The native input is the focusable control and carries the slider role.\n * - `ariaLabel` is required unless visible surrounding text names the control.\n * - `formatValue` also drives `aria-valuetext`, so a screen reader announces\n * \"40 percent\" rather than \"40\" when the raw number means nothing alone.\n * - Ticks and the value readout are decoration; the native value is the truth.\n *\n * Form integration:\n * <!-- Template-driven -->\n * <wm-slider [(ngModel)]=\"volume\" [min]=\"0\" [max]=\"100\" />\n *\n * <!-- Reactive -->\n * <wm-slider formControlName=\"opacity\" [min]=\"0\" [max]=\"1\" [step]=\"0.05\" />\n *\n * <!-- Two-way signal binding, no forms -->\n * <wm-slider [(value)]=\"volume\" ariaLabel=\"Volume\" />\n */\n@Component({\n selector: 'wm-slider',\n templateUrl: './slider.html',\n styleUrl: './slider.css',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WmSlider),\n multi: true,\n },\n ],\n})\nexport class WmSlider implements ControlValueAccessor {\n /** Two-way bindable value. Always reads back clamped and snapped to the step grid. */\n readonly value = model(0);\n\n /** Lower bound, inclusive. */\n readonly min = input(0);\n\n /** Upper bound, inclusive. Values never exceed it, even when it is off the step grid. */\n readonly max = input(100);\n\n /** Grid spacing, measured from `min`. Use 0 for a continuous slider. */\n readonly step = input(1);\n\n /** Disables the control from the template. Reactive forms set this independently. */\n readonly disabled = input(false);\n\n /** Accessible name. Required unless visible text already names the control. */\n readonly ariaLabel = input('');\n\n /** Shows a live readout beside the rail. */\n readonly showValue = input(false);\n\n /**\n * Renders the value for humans. Also sets `aria-valuetext`, so pass one\n * whenever the bare number would not be understood on its own.\n */\n readonly formatValue = input<((value: number) => string) | null>(null);\n\n /**\n * How the track is drawn. `rail` is one continuous bar. `segmented` breaks it\n * into blocks bounded by the grid stops, and the block holding the value fills\n * partially — so a segmented track does not have to mean one block per step,\n * and survives a dense range that one-block-per-step cannot.\n */\n readonly track = input<WmSliderTrack>('rail');\n\n /**\n * The grid, in one of three shapes:\n * - a **number** — a stop every N, measured from `min`\n * - an **array** of {@link WmSliderTick} — explicit stops, with labels and levels\n * - a **{@link WmSliderTickFn}** — computed from the live range\n *\n * Whatever the shape, the result is clamped to the range, sorted, and\n * de-duplicated. The same resolved grid draws the marks AND bounds the blocks\n * of a segmented track, so the two renderings cannot disagree.\n *\n * The grid is deliberately independent of `step`: a 0–100 slider stepping by 1\n * carries 101 reachable values and should still draw about 11 marks.\n */\n readonly ticks = input<number | WmSliderTick[] | WmSliderTickFn>([]);\n\n /** Set by reactive forms through setDisabledState, independent of the input. */\n private readonly formDisabled = signal(false);\n\n protected readonly isDisabled = computed(() => this.disabled() || this.formDisabled());\n\n /** Position of the thumb across the span, 0..1, as a CSS-ready string. */\n protected readonly fraction = computed(() => trim(this.fractionOf(this.value())));\n\n protected readonly displayValue = computed(() => {\n const format = this.formatValue();\n return format ? format(this.value()) : String(this.value());\n });\n\n /**\n * Every string the readout can show at a grid stop, de-duplicated.\n *\n * The shell is `1fr auto`, so a readout column sized by the CURRENT value\n * takes its width from the rail and gives it back on the next value — the bar\n * moves while you drag it. Rendering these hidden in the readout's own grid\n * cell makes the browser reserve the widest of them once, with no measuring.\n *\n * Only LABELLED stops contribute. An unlabelled stop is a position rather\n * than a word, and a numeric readout is already bounded by tabular numerals\n * and the two endpoints — so a 101-mark grid reserves two slots, not 101.\n */\n protected readonly valueCandidates = computed<string[]>(() => {\n const format = this.formatValue();\n const render = (value: number) => (format ? format(value) : String(value));\n\n const values = [\n this.min(),\n this.max(),\n ...this.resolvedTicks()\n .filter(tick => tick.label !== undefined)\n .map(tick => tick.value),\n ];\n\n const out = new Set<string>();\n for (const value of values) {\n out.add(render(value));\n if (out.size >= MAX_VALUE_CANDIDATES) break;\n }\n return [...out];\n });\n\n /** Null unless a formatter is set — a valuetext echoing valuenow is noise. */\n protected readonly valueText = computed(() => {\n const format = this.formatValue();\n return format ? format(this.value()) : null;\n });\n\n /** The declared grid, before it is measured against the range. */\n private readonly declaredTicks = computed<WmSliderTick[]>(() => {\n const raw = this.ticks();\n if (typeof raw === 'number') {\n return gridEvery(this.min(), this.max(), raw);\n }\n if (typeof raw === 'function') {\n return raw({ min: this.min(), max: this.max(), step: this.step() }) ?? [];\n }\n return raw ?? [];\n });\n\n protected readonly resolvedTicks = computed<ResolvedTick[]>(() => {\n const min = this.min();\n const max = this.max();\n const current = this.value();\n const seen = new Set<number>();\n\n return this.declaredTicks()\n .filter(tick => tick.value >= min && tick.value <= max)\n // A duplicate value is not cosmetic — two marks at one value collide on\n // the @for track key and Angular throws. First declaration wins, so an\n // explicit label is never dropped in favour of a bare repeat.\n .filter(tick => {\n if (seen.has(tick.value)) return false;\n seen.add(tick.value);\n return true;\n })\n .sort((a, b) => a.value - b.value)\n .map(tick => {\n const fraction = this.fractionOf(tick.value);\n return {\n ...tick,\n level: tick.level ?? 'major',\n fraction,\n left: `calc(var(--wm-slider-thumb) / 2 + ${trim(fraction)} * (100% - var(--wm-slider-thumb)))`,\n passed: tick.value <= current,\n };\n });\n });\n\n /**\n * Blocks of a segmented track. The boundaries are the grid stops plus the two\n * ends of the range, so the blocks are the intervals BETWEEN stops — which is\n * what a block can honestly represent. Each one is sized by its own span, so\n * an uneven grid produces uneven blocks rather than lying about the scale.\n */\n protected readonly segments = computed<Segment[]>(() => {\n if (this.track() !== 'segmented') return [];\n\n const min = this.min();\n const max = this.max();\n if (max <= min) return [];\n\n const current = this.value();\n const bounds = [...new Set([min, ...this.resolvedTicks().map(t => t.value), max])].sort(\n (a, b) => a - b,\n );\n\n const out: Segment[] = [];\n for (let i = 0; i < bounds.length - 1; i++) {\n const from = bounds[i];\n const to = bounds[i + 1];\n const span = to - from;\n if (span <= 0) continue;\n const fill = Math.min(Math.max((current - from) / span, 0), 1);\n out.push({\n from,\n to,\n span,\n fill,\n passed: fill >= 1,\n current: fill > 0 && fill < 1,\n });\n }\n return out;\n });\n\n protected readonly hasTickLabels = computed(() =>\n this.resolvedTicks().some(tick => tick.label !== undefined),\n );\n\n private onChangeFn: (value: number) => void = () => {};\n protected onTouchedFn: () => void = () => {};\n\n constructor() {\n // Normalisation runs on the value itself rather than on a derived signal,\n // so a caller that binds [(value)] or a form control gets the corrected\n // number back instead of holding one the thumb does not sit on.\n effect(() => {\n const resolved = this.resolve(this.value());\n if (resolved !== this.value()) {\n this.value.set(resolved);\n this.onChangeFn(resolved);\n }\n });\n }\n\n writeValue(value: number | null): void {\n this.value.set(this.resolve(value ?? this.min()));\n }\n\n registerOnChange(fn: (value: number) => void): void {\n this.onChangeFn = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouchedFn = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n\n protected onRangeInput(event: Event): void {\n const resolved = this.resolve(Number((event.target as HTMLInputElement).value));\n this.value.set(resolved);\n this.onChangeFn(resolved);\n }\n\n /** Clamps into min..max, then snaps onto the step grid measured from min. */\n private resolve(raw: number): number {\n const min = this.min();\n const max = this.max();\n if (!Number.isFinite(raw)) return min;\n if (max <= min) return min;\n\n const clamped = Math.min(Math.max(raw, min), max);\n const step = this.step();\n if (!Number.isFinite(step) || step <= 0) return clamped;\n\n // Rounding through a fixed number of decimals keeps a 0.1 grid on 0.3\n // rather than 0.30000000000000004, which would then render and compare\n // as a different number than the one the caller asked for.\n const decimals = decimalsOf(step) + decimalsOf(min);\n const snapped = round(min + Math.round((clamped - min) / step) * step, decimals);\n // Snapping up can overshoot a max that is not a whole number of steps\n // above min; the last reachable stop is one step back.\n return snapped > max ? round(snapped - step, decimals) : snapped;\n }\n\n private fractionOf(value: number): number {\n const span = this.max() - this.min();\n if (span <= 0) return 0;\n return (value - this.min()) / span;\n }\n}\n\n/**\n * A stop every `interval`, starting at `min` and never passing `max`. Returns\n * nothing for an interval that is not positive, or one that would draw more\n * than {@link MAX_TICKS} marks.\n */\nfunction gridEvery(min: number, max: number, interval: number): WmSliderTick[] {\n if (!Number.isFinite(interval) || interval <= 0) return [];\n const span = max - min;\n if (!Number.isFinite(span) || span <= 0) return [];\n\n const count = Math.floor(span / interval + 1e-9);\n if (count + 1 > MAX_TICKS) return [];\n\n const decimals = decimalsOf(interval) + decimalsOf(min);\n const out: WmSliderTick[] = [];\n for (let i = 0; i <= count; i++) {\n out.push({ value: round(min + i * interval, decimals) });\n }\n return out;\n}\n\n/** Decimal places in a number's plain decimal form, capped to what f64 can hold. */\nfunction decimalsOf(value: number): number {\n const text = String(value);\n if (text.includes('e') || text.includes('E')) return 10;\n const dot = text.indexOf('.');\n return dot === -1 ? 0 : Math.min(text.length - dot - 1, 10);\n}\n\nfunction round(value: number, decimals: number): number {\n return Number(value.toFixed(Math.min(decimals, 10)));\n}\n\n/** A CSS-ready fraction: enough precision to be exact, no trailing noise. */\nfunction trim(fraction: number): string {\n return String(round(fraction, 6));\n}\n","<!--\n The native <input type=\"range\"> is the control, not a decoration over one:\n its track and thumb are the styled surfaces. --wm-slider-p carries the thumb\n position to the CSS so the filled part of the track, every tick and every\n block are placed from the same number the thumb is.\n-->\n<div\n class=\"wm-slider\"\n [attr.data-track]=\"track()\"\n [class.is-disabled]=\"isDisabled()\"\n [class.has-ticks]=\"resolvedTicks().length > 0\"\n [style.--wm-slider-p]=\"fraction()\"\n>\n <div class=\"wm-slider-rail\">\n @if (segments().length > 0) {\n <!--\n Blocks sit under the transparent native track. They are bounded by the\n same resolved grid the marks come from, so a block and the mark on its\n edge can never disagree about where a value falls.\n -->\n <div class=\"wm-slider-segments\" aria-hidden=\"true\">\n @for (segment of segments(); track segment.from) {\n <span\n class=\"wm-slider-seg\"\n [class.is-passed]=\"segment.passed\"\n [class.is-current]=\"segment.current\"\n [style.flexGrow]=\"segment.span\"\n [style.--wm-slider-seg-p]=\"segment.fill\"\n ></span>\n }\n </div>\n }\n\n @if (resolvedTicks().length > 0) {\n <div class=\"wm-slider-ticks\" aria-hidden=\"true\">\n @for (tick of resolvedTicks(); track tick.value) {\n <span\n class=\"wm-slider-tick\"\n [class.wm-slider-tick--minor]=\"tick.level === 'minor'\"\n [class.is-passed]=\"tick.passed\"\n [style.left]=\"tick.left\"\n ></span>\n }\n </div>\n }\n\n <input\n class=\"wm-slider-input\"\n type=\"range\"\n [value]=\"value()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [step]=\"step() > 0 ? step() : 'any'\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-valuetext]=\"valueText()\"\n (input)=\"onRangeInput($event)\"\n (blur)=\"onTouchedFn()\"\n />\n </div>\n\n @if (showValue()) {\n <!--\n The sizers stack on the output in one grid cell, so the column reserves\n the widest string the readout can hold and stops stealing width from the\n rail every time the value changes.\n -->\n <div class=\"wm-slider-value-cell\">\n <output class=\"wm-slider-value\">{{ displayValue() }}</output>\n @for (candidate of valueCandidates(); track candidate) {\n <span class=\"wm-slider-value-sizer\" aria-hidden=\"true\">{{ candidate }}</span>\n }\n </div>\n }\n\n @if (hasTickLabels()) {\n <div class=\"wm-slider-tick-labels\" aria-hidden=\"true\">\n @for (tick of resolvedTicks(); track tick.value) {\n @if (tick.label !== undefined) {\n <span class=\"wm-slider-tick-label\" [style.left]=\"tick.left\">{{ tick.label }}</span>\n }\n }\n </div>\n }\n</div>\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostAttributeToken,\n Signal,\n ViewEncapsulation,\n computed,\n contentChildren,\n forwardRef,\n inject,\n input,\n linkedSignal,\n output,\n signal,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/** How the group is drawn. See `WmToggleGroup.appearance`. */\nexport type WmToggleGroupAppearance = 'segmented' | 'chip';\n\n/** Control height: `sm` is 24px, `md` is 28px. */\nexport type WmToggleGroupSize = 'sm' | 'md';\n\n/**\n * WmToggleGroupItem — one choice in a `<wm-toggle-group>`.\n *\n * The element itself is the `role=\"radio\"`, so anything written on it lands\n * on the control a screen reader and the keyboard use: `aria-label` for an\n * icon-only item, `[wmTooltip]`, `data-testid`, a consumer class.\n */\n@Component({\n selector: 'wm-toggle-group-item',\n template: '<ng-content />',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n role: 'radio',\n class: 'wm-toggle-group-item',\n '[class.is-checked]': 'checked()',\n '[class.is-disabled]': 'isDisabled()',\n '[attr.aria-checked]': 'checked()',\n '[attr.aria-disabled]': 'isDisabled() || null',\n '[attr.tabindex]': 'tabIndex()',\n '(click)': 'group.select(this)',\n },\n})\nexport class WmToggleGroupItem {\n /**\n * The value the group takes, and emits, when this item is checked. Give\n * every item one.\n *\n * Not `input.required`: the group reads every item's value to place the tab\n * stop, and an item rendered by `@for` has its host bindings run before the\n * next item's inputs are set. A required input throws NG0950 on that read;\n * this one reads `undefined`, the group places the stop without it, and the\n * binding settles when the next item's value arrives in the same pass.\n */\n readonly value = input<unknown>(undefined);\n\n /** Takes this item out of the focus order and out of selection. */\n readonly disabled = input(false);\n\n protected readonly group = inject(WmToggleGroup);\n\n /** @internal The item's own element, which carries role=\"radio\". */\n readonly element: HTMLElement = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n protected readonly checked: Signal<boolean> = computed(() => this.group.isChecked(this));\n\n /** @internal Disabled by its own input or by the group. */\n readonly isDisabled: Signal<boolean> = computed(\n () => this.disabled() || this.group.isDisabled(),\n );\n\n /**\n * 0 for the one tab stop, -1 for the rest. A disabled item gets no tabindex\n * at all: -1 would still let a pointer press focus it.\n */\n protected readonly tabIndex: Signal<0 | -1 | null> = computed(() => {\n if (this.isDisabled()) return null;\n return this.group.tabStop() === this ? 0 : -1;\n });\n}\n\n/**\n * WmToggleGroup — a single-select choice among a few options, drawn as joined\n * segments or as separate chips.\n *\n * Usage:\n * <wm-toggle-group [(value)]=\"strategy\" ariaLabel=\"Pull strategy\">\n * <wm-toggle-group-item value=\"merge\">Merge</wm-toggle-group-item>\n * <wm-toggle-group-item value=\"rebase\">Rebase</wm-toggle-group-item>\n * </wm-toggle-group>\n *\n * When to use:\n * - Two to about five mutually exclusive options that should all stay visible:\n * a setting (pull strategy, tab size, config scope), a view mode, a verdict\n * - A single-select filter row → `appearance=\"chip\"`\n *\n * When NOT to use:\n * - Choosing which panel shows → `<wm-tabs>`. A tab controls a panel; a toggle\n * group sets a value\n * - An on/off setting → `<wm-toggle>` or a checkbox\n * - Several options that can be on together → checkboxes\n * - More options than fit on one line → `<wm-select>`\n *\n * Selection:\n * - `value` names the checked item. `null`, or a value no item carries,\n * checks nothing; the group still keeps one tab stop.\n * - `(valueChange)` fires once per user choice and only then: never for a\n * value written from outside, never for the item that is already checked,\n * and never with null. A two-way binding to a signal that cannot hold null\n * therefore type-checks.\n * - Items compare by `Object.is`, so a value keeps its type: `[value]=\"4\"` on\n * an item emits the number 4, not the string \"4\".\n *\n * Keyboard (the WAI-ARIA APG radio group):\n * - Tab enters the group on one stop: the focused item while focus is inside,\n * otherwise the checked item, otherwise the first item that is not disabled.\n * - Arrow keys move focus AND check, wrapping at both ends and stepping over\n * disabled items. Left and Right swap in a right-to-left layout; Up and Down\n * follow document order. `Home` and `End` go to the first and last items.\n * - `Space` checks the focused item. `Enter` does not, as on a native radio.\n *\n * Accessibility:\n * - The `<wm-toggle-group>` element is the `role=\"radiogroup\"` and each item\n * is a `role=\"radio\"` with `aria-checked`. Name the group with `ariaLabel`,\n * or `ariaLabelledby` when a visible caption exists; `ariaLabelledby` wins.\n * An `aria-label` written straight on the element also works, because the\n * element carries the role.\n * - An icon-only item needs its own `aria-label`, written on the item.\n * - A disabled item keeps `aria-disabled=\"true\"` and leaves the focus order.\n * A disabled group does the same for every item.\n *\n * Form integration: a ControlValueAccessor, so `formControlName`,\n * `[formControl]` and `[(ngModel)]` all work. The control is marked touched\n * when focus leaves the group.\n */\n@Component({\n selector: 'wm-toggle-group',\n template: '<ng-content />',\n styleUrl: './toggle-group.css',\n // Items are projected content, so an emulated stylesheet here would never\n // reach them. The rules are written against .wm-toggle-group-* classes.\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WmToggleGroup),\n multi: true,\n },\n ],\n host: {\n role: 'radiogroup',\n class: 'wm-toggle-group',\n '[class.wm-toggle-group--segmented]': \"appearance() === 'segmented'\",\n '[class.wm-toggle-group--chip]': \"appearance() === 'chip'\",\n '[class.wm-toggle-group--sm]': \"size() === 'sm'\",\n '[attr.aria-label]': 'accessibleLabel()',\n '[attr.aria-labelledby]': 'accessibleLabelledby()',\n '[attr.aria-disabled]': 'isDisabled() || null',\n '(keydown)': 'onKeydown($event)',\n '(focusin)': 'onFocusIn($event)',\n '(focusout)': 'onFocusOut($event)',\n },\n})\nexport class WmToggleGroup<T = unknown> implements ControlValueAccessor {\n /** Value of the checked item. `null`, or a value no item carries, checks nothing. */\n readonly value = input<T | null>(null);\n\n /** The value of the item the user checked. Never null; see the class comment. */\n readonly valueChange = output<T>();\n\n /** Accessible name for the radiogroup. Ignored while `ariaLabelledby` is set. */\n readonly ariaLabel = input<string | null>(null);\n\n /**\n * Id of a visible element that names the group. Prefer it over `ariaLabel`\n * when a visible caption exists, so the accessible name matches the visible\n * text (WCAG 2.5.3, Label in Name).\n */\n readonly ariaLabelledby = input<string | null>(null);\n\n /**\n * `segmented` joins the items in one sunken track, for a setting or a view\n * mode. `chip` spaces them as separate rounded chips that wrap, for a filter\n * row or a verdict.\n */\n readonly appearance = input<WmToggleGroupAppearance>('segmented');\n\n readonly size = input<WmToggleGroupSize>('md');\n\n /** Disables every item. Reactive forms set this independently. */\n readonly disabled = input(false);\n\n private readonly items = contentChildren(WmToggleGroupItem, { descendants: true });\n\n private readonly host: HTMLElement = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n // An aria-label or aria-labelledby attribute written on the element is kept\n // when the matching input is unset. The element carries the role, so the\n // attribute is a valid way to name it, and the host binding below would\n // otherwise erase it on the first change detection.\n private readonly staticLabel = inject(new HostAttributeToken('aria-label'), { optional: true });\n private readonly staticLabelledby = inject(new HostAttributeToken('aria-labelledby'), {\n optional: true,\n });\n\n protected readonly accessibleLabelledby = computed(\n () => this.ariaLabelledby() || this.staticLabelledby || null,\n );\n\n protected readonly accessibleLabel = computed(() =>\n this.accessibleLabelledby() ? null : this.ariaLabel() || this.staticLabel || null,\n );\n\n /** The checked value. Follows `value`, and moves at once on a user choice or a form write. */\n private readonly checkedValue = linkedSignal<T | null>(() => this.value());\n\n /** Set by reactive forms through setDisabledState, independent of the input. */\n private readonly formDisabled = signal(false);\n\n /** @internal */\n readonly isDisabled = computed(() => this.disabled() || this.formDisabled());\n\n /**\n * The item that holds focus, or null while focus is outside the group. Kept\n * as the item itself rather than an index, so an item added or removed\n * before it cannot move the stop onto another item.\n */\n private readonly focusedItem = signal<WmToggleGroupItem | null>(null);\n\n /** @internal The one item in the page's Tab order, or null when none can take focus. */\n readonly tabStop: Signal<WmToggleGroupItem | null> = computed(() => {\n if (this.isDisabled()) return null;\n const items = this.items();\n const focused = this.focusedItem();\n if (focused && items.includes(focused) && !focused.disabled()) return focused;\n const checked = items.find((item) => !item.disabled() && this.isChecked(item));\n return checked ?? items.find((item) => !item.disabled()) ?? null;\n });\n\n private onChange: (value: T) => void = () => {};\n private onTouched: () => void = () => {};\n\n /** @internal */\n isChecked(item: WmToggleGroupItem): boolean {\n const checked = this.checkedValue();\n return checked !== null && Object.is(item.value(), checked);\n }\n\n /** @internal Checks `item` on a user action. */\n select(item: WmToggleGroupItem): void {\n if (item.isDisabled()) return;\n const value = item.value() as T;\n if (Object.is(this.checkedValue(), value)) return;\n this.checkedValue.set(value);\n this.onChange(value);\n this.valueChange.emit(value);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (this.isDisabled() || event.altKey || event.ctrlKey || event.metaKey) return;\n const items = this.items();\n const current = items.find((item) => item.element.contains(event.target as Node));\n if (!current) return;\n\n if (event.key === ' ') {\n event.preventDefault();\n this.select(current);\n return;\n }\n\n const rtl = getComputedStyle(this.host).direction === 'rtl';\n let target: WmToggleGroupItem | undefined;\n switch (event.key) {\n case 'ArrowDown':\n target = this.step(items, current, 1);\n break;\n case 'ArrowUp':\n target = this.step(items, current, -1);\n break;\n case 'ArrowRight':\n target = this.step(items, current, rtl ? -1 : 1);\n break;\n case 'ArrowLeft':\n target = this.step(items, current, rtl ? 1 : -1);\n break;\n case 'Home':\n target = items.find((item) => !item.disabled());\n break;\n case 'End': {\n const enabled = items.filter((item) => !item.disabled());\n target = enabled[enabled.length - 1];\n break;\n }\n default:\n return;\n }\n\n event.preventDefault();\n if (!target) return;\n this.focusedItem.set(target);\n target.element.focus();\n this.select(target);\n }\n\n protected onFocusIn(event: FocusEvent): void {\n const item = this.items().find((candidate) => candidate.element.contains(event.target as Node));\n if (item) this.focusedItem.set(item);\n }\n\n protected onFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget as Node | null;\n if (next && this.host.contains(next)) return;\n this.focusedItem.set(null);\n this.onTouched();\n }\n\n /** The next item in `direction` that is not disabled, wrapping at both ends. */\n private step(\n items: readonly WmToggleGroupItem[],\n from: WmToggleGroupItem,\n direction: 1 | -1,\n ): WmToggleGroupItem | undefined {\n const count = items.length;\n const start = items.indexOf(from);\n for (let offset = 1; offset <= count; offset += 1) {\n const candidate = items[(((start + direction * offset) % count) + count) % count];\n if (!candidate.disabled()) return candidate;\n }\n return undefined;\n }\n\n // ── ControlValueAccessor ──────────────────────────────────────────────────\n\n writeValue(value: T | null): void {\n this.checkedValue.set(value ?? null);\n }\n\n registerOnChange(fn: (value: T) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n}\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n/**\n * GhostField — transparent-until-hover wrapper for inline-editable fields.\n *\n * Applies .wm-ghost-field to its content; all visual behaviour is CSS-driven\n * (inputs.css). No inputs or outputs — interactivity belongs to the inner\n * element projected via ng-content.\n *\n * Usage:\n * <wm-ghost-field>\n * <input class=\"wm-input-bare\" [(ngModel)]=\"title\" aria-label=\"Task title\" />\n * </wm-ghost-field>\n */\n@Component({\n selector: 'wm-ghost-field',\n standalone: true,\n template: `<div class=\"wm-ghost-field\"><ng-content /></div>`,\n encapsulation: ViewEncapsulation.None,\n})\nexport class GhostField {}\n","import { Component, ChangeDetectionStrategy, ViewEncapsulation, input } from '@angular/core';\n\n/**\n * PageHeader — standardised page-level heading with eyebrow label, title,\n * optional subtitle, optional status badge, and projected action/back slots.\n *\n * Slots:\n * [icon] — 12×12 icon projected into the eyebrow row (optional)\n * [back] — back-navigation element (link or button) placed in the status row (optional)\n * default — action buttons / controls placed below the status row\n *\n * Usage:\n * <wm-page-header flavourText=\"Sprints\" title=\"Active Sprint\" [badgeLabel]=\"daysLeft\">\n * <svg icon .../>\n * <a back href=\"...\">← Board</a>\n * <wm-button>New Sprint</wm-button>\n * </wm-page-header>\n */\n@Component({\n selector: 'wm-page-header',\n standalone: true,\n templateUrl: './page-header.html',\n styleUrl: './page-header.css',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PageHeader {\n readonly flavourText = input.required<string>();\n readonly title = input.required<string>();\n readonly subtitle = input<string>();\n readonly badgeLabel = input<string>();\n}\n","<header class=\"wm-page-header\">\n <div class=\"wm-page-header__left\">\n <div class=\"wm-page-header__eyebrow\">\n <ng-content select=\"[icon]\" />\n <span>{{ flavourText() }}</span>\n </div>\n <h2 class=\"wm-page-header__title\">{{ title() }}</h2>\n @if (subtitle()) {\n <p class=\"wm-page-header__subtitle\">{{ subtitle() }}</p>\n }\n </div>\n\n <div class=\"wm-page-header__right\">\n <div class=\"wm-page-header__status\">\n @if (badgeLabel()) {\n <span class=\"wm-page-header__badge\">{{ badgeLabel() }}</span>\n }\n <ng-content select=\"[back]\" />\n </div>\n <div class=\"wm-page-header__actions\">\n <ng-content />\n </div>\n </div>\n</header>\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewChild,\n computed,\n effect,\n input,\n output,\n} from '@angular/core';\nimport { CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';\nimport { ComboboxOption } from './option';\n\n/** Module-level counter for unique panel instance IDs. */\nlet nextPanelId = 0;\n\n/**\n * Segment of an option label, split by filter-query matches.\n * `match: true` means this segment matched the query and should be bolded.\n */\ninterface LabelSegment {\n text: string;\n match: boolean;\n}\n\n/**\n * Internal sub-component that renders the virtual-scrolled option list\n * inside the WmCombobox's CDK overlay. NOT exported from Aegis.\n */\n@Component({\n selector: 'wm-combobox-panel',\n imports: [ScrollingModule],\n templateUrl: './combobox-panel.html',\n styleUrl: './combobox-panel.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ComboboxPanel {\n /** Filtered options to display. */\n readonly options = input<ComboboxOption[]>([]);\n\n /** Index of the keyboard-highlighted option (-1 = none). */\n readonly highlightIndex = input(-1);\n\n /** Values currently selected (for checkmark display). */\n readonly selectedValues = input<Set<unknown>>(new Set());\n\n /** Whether the parent is multi-select. */\n readonly multiple = input(false);\n\n /** Pixel height per row. */\n readonly itemHeight = input(36);\n\n /** Max panel height in pixels. */\n readonly maxHeight = input(256);\n\n /** Current filter text — used for match highlighting in labels. */\n readonly filterQuery = input('');\n\n /** Show spinner when async filter is pending. */\n readonly loading = input(false);\n\n /** Shown in empty state when freeform input is enabled. */\n readonly freeformHint = input('');\n\n /** Emitted on mousedown (not click) to prevent focus steal. */\n readonly optionClicked = output<{ option: ComboboxOption; index: number }>();\n\n @ViewChild(CdkVirtualScrollViewport)\n private viewport?: CdkVirtualScrollViewport;\n\n /** Unique instance ID for generating DOM IDs. */\n private readonly instanceId = nextPanelId++;\n\n /** The DOM ID of the listbox element — used by parent for aria-controls. */\n readonly listboxId = `wm-combobox-${this.instanceId}-listbox`;\n\n /** Computed viewport height: min of (options * itemHeight) and maxHeight. */\n protected readonly viewportHeight = computed(() => {\n const count = this.options().length;\n return Math.min(count * this.itemHeight(), this.maxHeight());\n });\n\n /** Whether to show the empty state. */\n protected readonly showEmpty = computed(\n () => this.options().length === 0 && !this.loading()\n );\n\n /** Text for the empty state. */\n protected readonly emptyText = computed(\n () => this.freeformHint() || 'No matches'\n );\n\n /**\n * Precomputed label segments for each option, split by the current filter query.\n * Recomputes whenever options or filterQuery changes.\n */\n protected readonly segmentedLabels = computed(() => {\n const query = this.filterQuery().trim();\n return this.options().map(opt => this.splitLabel(opt.label, query));\n });\n\n /** Map from option value to a stable key for DOM IDs. */\n private optionKeyMap = new Map<unknown, string>();\n private nextObjectIndex = 0;\n\n constructor() {\n // Scroll the highlighted option into view whenever highlightIndex changes.\n effect(() => {\n const idx = this.highlightIndex();\n if (idx >= 0 && this.viewport) {\n this.viewport.scrollToIndex(idx);\n }\n });\n }\n\n /** Returns a stable DOM ID for the option at the given index. */\n optionIdAt(index: number): string {\n const opts = this.options();\n if (index < 0 || index >= opts.length) {\n return '';\n }\n return `wm-combobox-${this.instanceId}-opt-${this.keyFor(opts[index].value)}`;\n }\n\n /** Handle mousedown on an option — emits event and prevents default. */\n protected onOptionMousedown(event: MouseEvent, option: ComboboxOption, index: number): void {\n event.preventDefault();\n if (!option.disabled) {\n this.optionClicked.emit({ option, index });\n }\n }\n\n /** Check whether a value is currently selected. */\n protected isSelected(value: unknown): boolean {\n return this.selectedValues().has(value);\n }\n\n /** Get label segments for the option at the given virtual-scroll index. */\n protected segmentsAt(index: number): LabelSegment[] {\n return this.segmentedLabels()[index] ?? [{ text: '', match: false }];\n }\n\n /**\n * Returns a stable string key for an option value.\n * Strings/numbers use the value directly. Objects use a monotonic index.\n */\n private keyFor(value: unknown): string {\n if (typeof value === 'string' || typeof value === 'number') {\n return String(value);\n }\n let key = this.optionKeyMap.get(value);\n if (key == null) {\n key = `obj-${this.nextObjectIndex++}`;\n this.optionKeyMap.set(value, key);\n }\n return key;\n }\n\n /**\n * Split a label into segments where the query matches (case-insensitive).\n * Returns an array of { text, match } segments.\n */\n private splitLabel(label: string, query: string): LabelSegment[] {\n if (!query) {\n return [{ text: label, match: false }];\n }\n const segments: LabelSegment[] = [];\n const lowerLabel = label.toLowerCase();\n const lowerQuery = query.toLowerCase();\n let cursor = 0;\n while (cursor < label.length) {\n const matchIndex = lowerLabel.indexOf(lowerQuery, cursor);\n if (matchIndex === -1) {\n segments.push({ text: label.slice(cursor), match: false });\n break;\n }\n if (matchIndex > cursor) {\n segments.push({ text: label.slice(cursor, matchIndex), match: false });\n }\n segments.push({\n text: label.slice(matchIndex, matchIndex + query.length),\n match: true,\n });\n cursor = matchIndex + query.length;\n }\n return segments;\n }\n}\n","@if (loading()) {\n <div class=\"wm-cb-loading\" aria-live=\"polite\">\n <svg\n class=\"wm-cb-spinner\"\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"\n fill=\"none\" aria-hidden=\"true\"\n >\n <circle\n cx=\"10\" cy=\"10\" r=\"8\"\n stroke=\"currentColor\" stroke-width=\"2\"\n stroke-dasharray=\"40 60\"\n stroke-linecap=\"round\"\n />\n </svg>\n <span class=\"wm-cb-loading-text\">Loading…</span>\n </div>\n} @else if (showEmpty()) {\n <div class=\"wm-cb-empty\" aria-live=\"polite\">{{ emptyText() }}</div>\n} @else {\n <cdk-virtual-scroll-viewport\n [itemSize]=\"itemHeight()\"\n [style.height.px]=\"viewportHeight()\"\n class=\"wm-cb-viewport\"\n >\n <div\n [id]=\"listboxId\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"multiple() ? true : null\"\n >\n <div\n *cdkVirtualFor=\"let opt of options(); let i = index\"\n role=\"option\"\n class=\"wm-cb-option\"\n [id]=\"optionIdAt(i)\"\n [class.is-highlighted]=\"i === highlightIndex()\"\n [class.is-selected]=\"isSelected(opt.value)\"\n [class.is-disabled]=\"!!opt.disabled\"\n [attr.aria-selected]=\"isSelected(opt.value)\"\n [attr.aria-disabled]=\"opt.disabled ? true : null\"\n (mousedown)=\"onOptionMousedown($event, opt, i)\"\n >\n <span class=\"wm-cb-option-label\">\n @for (seg of segmentsAt(i); track $index) {\n @if (seg.match) {\n <b class=\"wm-cb-match\">{{ seg.text }}</b>\n } @else {\n {{ seg.text }}\n }\n }\n </span>\n @if (isSelected(opt.value)) {\n <svg\n class=\"wm-cb-check\"\n width=\"14\" height=\"14\" viewBox=\"0 0 24 24\"\n fill=\"none\" aria-hidden=\"true\"\n >\n <polyline\n points=\"20 6 9 17 4 12\"\n stroke=\"currentColor\" stroke-width=\"2.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"\n />\n </svg>\n }\n </div>\n </div>\n </cdk-virtual-scroll-viewport>\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n OnDestroy,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n CdkConnectedOverlay,\n CdkOverlayOrigin,\n ConnectedPosition,\n} from '@angular/cdk/overlay';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {\n Subject,\n Subscription,\n debounceTime,\n switchMap,\n catchError,\n of,\n finalize,\n} from 'rxjs';\nimport { ComboboxOption } from './option';\nimport { ComboboxPanel } from './combobox-panel';\nimport { WmAnchoredScrollStrategy } from '../overlay/anchored-scroll-strategy';\n\n/**\n * WmCombobox — Accessible combobox with filtering, single/multi-select,\n * freeform entry, chips, and virtual-scrolled panel.\n *\n * Built on Angular CDK Overlay and the WAI-ARIA APG combobox pattern.\n * DOM focus ALWAYS stays on the input; assistive tech focus moves via\n * `aria-activedescendant`.\n *\n * Implements ControlValueAccessor for both template-driven and reactive forms.\n *\n * Usage:\n * <!-- Single-select -->\n * <wm-combobox [options]=\"opts\" [(value)]=\"selected\" />\n *\n * <!-- Multi-select with chips -->\n * <wm-combobox [options]=\"opts\" [(values)]=\"selectedIds\" [multiple]=\"true\" />\n *\n * <!-- Async filter -->\n * <wm-combobox [options]=\"opts\" [filterFn]=\"searchApi\" />\n *\n * <!-- Reactive form -->\n * <wm-combobox formControlName=\"tag\" [options]=\"tags\" />\n */\n@Component({\n selector: 'wm-combobox',\n imports: [CdkConnectedOverlay, CdkOverlayOrigin, ComboboxPanel],\n templateUrl: './combobox.html',\n styleUrl: './combobox.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WmCombobox),\n multi: true,\n },\n ],\n})\nexport class WmCombobox implements ControlValueAccessor, OnDestroy {\n /**\n * Keeps the panel anchored to its trigger while an ancestor scrolls.\n *\n * One instance per component, because a ScrollStrategy holds a single\n * overlayRef and could not tell two open overlays apart. Without it the\n * panel takes CDK's default, which cannot hear a scroll from any container\n * that is not marked `cdkScrollable` - so in a fixed-height shell the panel\n * keeps the coordinates it was born with while the trigger scrolls away.\n */\n protected readonly scrollStrategy = new WmAnchoredScrollStrategy();\n\n // ── Public inputs ──────────────────────────────────────────────────────\n\n /** Full option list (before filtering). */\n readonly options = input<ComboboxOption[]>([]);\n\n /** Selected value (single-select). Two-way bindable. */\n readonly value = model<unknown>(null);\n\n /** Selected values (multi-select). Two-way bindable. */\n readonly values = model<unknown[]>([]);\n\n /** Enable multi-select mode with chips. */\n readonly multiple = input(false);\n\n /** Allow typed text to be accepted as a freeform value. */\n readonly allowFreeform = input(false);\n\n /** Placeholder text for the input. */\n readonly placeholder = input('Search\\u2026');\n\n /**\n * Accessible name for the combobox input.\n *\n * Required unless `ariaLabelledby` is supplied. The host `<wm-combobox>` is\n * not a labelable element, so a consumer's `<label for=\"\\u2026\">` cannot reach the\n * inner input \\u2014 and the placeholder is blanked as soon as a chip is selected,\n * so in multi-select mode there is otherwise no accessible name at all once\n * the user picks anything.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /**\n * ID of a visible element that names this combobox. Prefer this over\n * `ariaLabel` when a visible caption exists, so the accessible name matches\n * the visible text (WCAG 2.5.3, Label in Name).\n */\n readonly ariaLabelledby = input<string | null>(null);\n\n /** Disable the combobox. */\n readonly disabled = input(false);\n\n /** Custom async filter function. Overrides default substring matching. */\n readonly filterFn = input<\n ((query: string) => import('rxjs').Observable<ComboboxOption[]>) | null\n >(null);\n\n /** Pixel height of each option row. */\n readonly itemHeight = input(36);\n\n /** Max panel height in pixels. */\n readonly maxPanelHeight = input(256);\n\n // ── Public outputs ─────────────────────────────────────────────────────\n\n /** Emitted when the input text changes. */\n readonly query = output<string>();\n\n /** Emitted when the panel opens. */\n readonly opened = output<void>();\n\n /** Emitted when the panel closes. */\n readonly closed = output<void>();\n\n // ── View children ──────────────────────────────────────────────────────\n\n protected readonly inputRef = viewChild<ElementRef<HTMLInputElement>>('inputEl');\n protected readonly panel = viewChild(ComboboxPanel);\n\n // ── Internal state ─────────────────────────────────────────────────────\n\n protected readonly isOpen = signal(false);\n protected readonly inputText = signal('');\n protected readonly highlightIndex = signal(-1);\n protected readonly asyncLoading = signal(false);\n protected readonly asyncResults = signal<ComboboxOption[] | null>(null);\n\n /** Text the input had when the panel opened — restored on Escape. */\n private savedText = '';\n\n private readonly hostEl = inject(ElementRef<HTMLElement>);\n\n // ── CVA state ──────────────────────────────────────────────────────────\n\n private onChangeFn: (v: unknown) => void = () => {};\n protected onTouchedFn: () => void = () => {};\n\n // ── Async filter plumbing ──────────────────────────────────────────────\n\n private readonly filterSubject = new Subject<string>();\n private filterSub: Subscription | null = null;\n\n // ── Live region debounce ───────────────────────────────────────────────\n\n protected readonly liveText = signal('');\n private liveTimer: ReturnType<typeof setTimeout> | null = null;\n\n // ── Computed ───────────────────────────────────────────────────────────\n\n /** Set of currently selected values for the panel. */\n protected readonly selectedValues = computed(() => {\n if (this.multiple()) {\n return new Set<unknown>(this.values());\n }\n const v = this.value();\n return v != null ? new Set<unknown>([v]) : new Set<unknown>();\n });\n\n /** Filtered options shown in the panel. */\n protected readonly filteredOptions = computed(() => {\n // If async filterFn is set and we have results, use those.\n const asyncRes = this.asyncResults();\n if (this.filterFn() && asyncRes !== null) {\n return asyncRes;\n }\n\n const query = this.inputText().trim().toLowerCase();\n const opts = this.options();\n if (!query) return opts;\n return opts.filter(o => o.label.toLowerCase().includes(query));\n });\n\n /** Chips for multi-select mode. */\n protected readonly chips = computed(() => {\n if (!this.multiple()) return [];\n const vals = this.values();\n const opts = this.options();\n return vals.map(v => {\n const opt = opts.find(o => o.value === v);\n return { value: v, label: opt?.label ?? String(v) };\n });\n });\n\n /** The aria-activedescendant value. */\n protected readonly activeDescendant = computed(() => {\n const idx = this.highlightIndex();\n const p = this.panel();\n if (idx < 0 || !p) return null;\n return p.optionIdAt(idx) || null;\n });\n\n /** The listbox ID from the panel (for aria-controls). */\n protected readonly panelListboxId = computed(() => {\n const p = this.panel();\n return p ? p.listboxId : null;\n });\n\n /** Freeform hint for empty state. */\n protected readonly freeformHint = computed(() => {\n if (!this.allowFreeform()) return '';\n const text = this.inputText().trim();\n return text ? `Press Enter to add \"${text}\"` : '';\n });\n\n /** Overlay width tracks host element width. */\n protected get overlayWidth(): number {\n return this.hostEl.nativeElement.offsetWidth || 200;\n }\n\n /** Overlay positions: below-first with above-fallback. */\n protected readonly positions: ConnectedPosition[] = [\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },\n ];\n\n constructor() {\n // Wire up async filter subscription.\n this.filterSub = this.filterSubject\n .pipe(\n debounceTime(200),\n switchMap(q => {\n const fn = this.filterFn();\n if (!fn) return of(null);\n this.asyncLoading.set(true);\n return fn(q).pipe(\n catchError(() => of([] as ComboboxOption[])),\n finalize(() => this.asyncLoading.set(false)),\n );\n }),\n )\n .subscribe(results => {\n if (results !== null) {\n this.asyncResults.set(results);\n }\n });\n\n // Sync the displayed input text to the single-select value whenever\n // the value changes externally (e.g. parent updates a [(value)] model\n // or supplies a freeform string the component itself didn't commit).\n // Skipped while the panel is open so the user's in-flight typing\n // isn't clobbered — on close, syncInputToSelection handles the sync.\n effect(() => {\n if (this.multiple()) return;\n if (this.isOpen()) return;\n const v = this.value();\n if (v == null) {\n this.inputText.set('');\n return;\n }\n const opts = this.options();\n const opt = opts.find(o => o.value === v);\n this.inputText.set(\n opt?.label ?? (typeof v === 'string' ? v : ''),\n );\n });\n\n // Update live region when filtered options change (debounced 300ms).\n effect(() => {\n const count = this.filteredOptions().length;\n const total = this.options().length;\n // Read isOpen to track it in this effect.\n const open = this.isOpen();\n\n // Clear any pending timer.\n if (this.liveTimer !== null) {\n clearTimeout(this.liveTimer);\n }\n\n if (!open) {\n this.liveText.set('');\n return;\n }\n\n this.liveTimer = setTimeout(() => {\n if (count === 0) {\n this.liveText.set('No results');\n } else if (this.filterFn() || this.inputText().trim()) {\n this.liveText.set(\n total > 0 && count < total\n ? `${count} of ${total} results`\n : `${count} results available`,\n );\n } else {\n this.liveText.set(`${count} results available`);\n }\n }, 300);\n });\n }\n\n ngOnDestroy(): void {\n this.filterSub?.unsubscribe();\n if (this.liveTimer !== null) {\n clearTimeout(this.liveTimer);\n }\n }\n\n // ── CVA ────────────────────────────────────────────────────────────────\n\n writeValue(value: unknown): void {\n if (this.multiple()) {\n const arr = Array.isArray(value) ? value : [];\n this.values.set(arr);\n } else {\n this.value.set(value);\n // Show label for current value. When the value isn't in options\n // (freeform commit, or a string the parent supplied before the\n // options array catches up), fall back to the string itself so\n // the input doesn't appear blank when the model is non-empty.\n const opt = this.options().find(o => o.value === value);\n this.inputText.set(\n opt?.label ?? (typeof value === 'string' ? value : ''),\n );\n }\n }\n\n registerOnChange(fn: (v: unknown) => void): void {\n this.onChangeFn = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouchedFn = fn;\n }\n\n // ── Panel open/close ───────────────────────────────────────────────────\n\n protected open(highlightFirst = false, highlightLast = false): void {\n if (this.disabled() || this.isOpen()) return;\n this.savedText = this.inputText();\n this.isOpen.set(true);\n this.opened.emit();\n\n if (highlightFirst) {\n this.highlightFirst();\n } else if (highlightLast) {\n this.highlightLast();\n } else {\n this.highlightIndex.set(-1);\n }\n }\n\n protected close(restoreText = false): void {\n if (!this.isOpen()) return;\n this.isOpen.set(false);\n this.highlightIndex.set(-1);\n this.closed.emit();\n\n if (restoreText) {\n this.inputText.set(this.savedText);\n } else if (!this.multiple()) {\n // Restore label of selected value.\n this.syncInputToSelection();\n }\n }\n\n // ── Input events ───────────────────────────────────────────────────────\n\n protected onInput(event: Event): void {\n const text = (event.target as HTMLInputElement).value;\n this.inputText.set(text);\n this.query.emit(text);\n this.highlightIndex.set(-1);\n this.asyncResults.set(null);\n\n if (this.filterFn()) {\n this.filterSubject.next(text);\n }\n\n if (!this.isOpen()) {\n this.open();\n }\n }\n\n protected onBlur(): void {\n this.onTouchedFn();\n\n // Short delay so mousedown on an option fires first.\n setTimeout(() => {\n if (!this.isOpen()) return;\n\n if (this.allowFreeform() && !this.multiple()) {\n this.acceptFreeform();\n }\n\n this.close();\n }, 150);\n }\n\n protected onTriggerClick(): void {\n if (this.disabled()) return;\n\n if (this.isOpen()) {\n this.close();\n } else {\n this.open();\n // In single-select, select the input text for easy re-typing.\n if (!this.multiple() && this.inputText()) {\n const el = this.inputRef()?.nativeElement;\n el?.select();\n }\n }\n }\n\n // ── Keyboard ───────────────────────────────────────────────────────────\n\n protected onKeydown(event: KeyboardEvent): void {\n if (this.disabled()) return;\n\n const open = this.isOpen();\n const hi = this.highlightIndex();\n const opts = this.filteredOptions();\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n if (!open) {\n if (event.altKey) {\n this.open(false, false); // Alt+ArrowDown: open without highlight\n } else {\n this.open(true, false); // ArrowDown: open + highlight first\n }\n } else if (hi < 0) {\n this.highlightFirst();\n } else {\n const next = this.nextEnabled(hi, 1, opts);\n this.highlightIndex.set(next);\n }\n break;\n\n case 'ArrowUp':\n event.preventDefault();\n if (!open) {\n this.open(false, true); // ArrowUp: open + highlight last\n } else if (event.altKey) {\n this.close();\n } else if (hi < 0) {\n this.highlightLast();\n } else {\n const prev = this.nextEnabled(hi, -1, opts);\n this.highlightIndex.set(prev);\n }\n break;\n\n case 'Enter':\n if (open) {\n event.preventDefault();\n if (hi >= 0 && hi < opts.length) {\n this.selectOption(opts[hi]);\n } else if (this.allowFreeform() && this.inputText().trim()) {\n this.acceptFreeform();\n this.close();\n }\n }\n break;\n\n case 'Escape':\n if (open) {\n event.preventDefault();\n this.close(true); // Restore text\n } else {\n // Clear input text.\n this.inputText.set('');\n this.query.emit('');\n }\n break;\n\n case 'Tab':\n if (open) {\n if (hi >= 0 && hi < opts.length) {\n this.selectOption(opts[hi]);\n }\n this.close();\n }\n break;\n\n case 'ArrowLeft':\n case 'ArrowRight':\n case 'Home':\n case 'End':\n // Clear highlight so cursor navigation works normally.\n if (open && hi >= 0) {\n this.highlightIndex.set(-1);\n }\n break;\n\n case 'Backspace':\n if (open && hi >= 0) {\n // Clear highlight, let deletion happen in input.\n this.highlightIndex.set(-1);\n } else if (\n this.multiple() &&\n !this.inputText() &&\n this.values().length > 0\n ) {\n // Remove last chip.\n this.removeChipByIndex(this.values().length - 1);\n }\n break;\n\n default:\n // Printable character: clear highlight, let it type.\n if (open && hi >= 0 && event.key.length === 1 && !event.ctrlKey && !event.metaKey) {\n this.highlightIndex.set(-1);\n }\n // If closed and printable, open panel.\n if (!open && event.key.length === 1 && !event.ctrlKey && !event.metaKey) {\n this.open();\n }\n break;\n }\n }\n\n // ── Option selection ───────────────────────────────────────────────────\n\n protected onOptionClicked(event: { option: ComboboxOption; index: number }): void {\n this.selectOption(event.option);\n // Refocus input since mousedown prevented default.\n this.inputRef()?.nativeElement.focus();\n }\n\n private selectOption(opt: ComboboxOption): void {\n if (opt.disabled) return;\n\n if (this.multiple()) {\n const current = this.values();\n const idx = current.indexOf(opt.value);\n if (idx >= 0) {\n // Deselect.\n this.values.set(current.filter((_, i) => i !== idx));\n } else {\n this.values.set([...current, opt.value]);\n }\n // Clear input, keep panel open.\n this.inputText.set('');\n this.query.emit('');\n this.highlightIndex.set(-1);\n this.onChangeFn(this.values());\n } else {\n this.value.set(opt.value);\n this.inputText.set(opt.label);\n this.onChangeFn(opt.value);\n this.close();\n }\n }\n\n // ── Chip removal ───────────────────────────────────────────────────────\n\n protected removeChip(chipValue: unknown): void {\n const current = this.values();\n this.values.set(current.filter(v => v !== chipValue));\n this.onChangeFn(this.values());\n this.inputRef()?.nativeElement.focus();\n }\n\n private removeChipByIndex(index: number): void {\n const current = this.values();\n this.values.set(current.filter((_, i) => i !== index));\n this.onChangeFn(this.values());\n }\n\n // ── Freeform ───────────────────────────────────────────────────────────\n\n private acceptFreeform(): void {\n const text = this.inputText().trim();\n if (!text) return;\n\n if (this.multiple()) {\n const current = this.values();\n if (!current.includes(text)) {\n this.values.set([...current, text]);\n this.onChangeFn(this.values());\n }\n this.inputText.set('');\n this.query.emit('');\n } else {\n this.value.set(text);\n this.onChangeFn(text);\n }\n }\n\n // ── Highlight helpers ──────────────────────────────────────────────────\n\n private highlightFirst(): void {\n const opts = this.filteredOptions();\n for (let i = 0; i < opts.length; i++) {\n if (!opts[i].disabled) {\n this.highlightIndex.set(i);\n return;\n }\n }\n this.highlightIndex.set(-1);\n }\n\n private highlightLast(): void {\n const opts = this.filteredOptions();\n for (let i = opts.length - 1; i >= 0; i--) {\n if (!opts[i].disabled) {\n this.highlightIndex.set(i);\n return;\n }\n }\n this.highlightIndex.set(-1);\n }\n\n /**\n * Find the next enabled option in the given direction.\n * Returns -1 if wrapping past the end/start (clears highlight).\n */\n private nextEnabled(\n from: number,\n direction: 1 | -1,\n opts: ComboboxOption[],\n ): number {\n let i = from + direction;\n if (i < 0 || i >= opts.length) return -1; // Wrap clears highlight.\n while (i >= 0 && i < opts.length) {\n if (!opts[i].disabled) return i;\n i += direction;\n }\n return -1;\n }\n\n /** Sync input text to the currently selected option label (single-select).\n * Mirrors the writeValue freeform fallback — a string value not in the\n * options list still shows in the input, so a freeform commit doesn't\n * look like a no-op after close(). */\n private syncInputToSelection(): void {\n const v = this.value();\n if (v == null) {\n this.inputText.set('');\n return;\n }\n const opt = this.options().find(o => o.value === v);\n this.inputText.set(\n opt?.label ?? (typeof v === 'string' ? v : ''),\n );\n }\n}\n","<!-- Trigger wrapper — anchors the CDK overlay -->\n<div\n class=\"wm-cb-trigger\"\n [class.is-open]=\"isOpen()\"\n [class.is-disabled]=\"disabled()\"\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n (click)=\"onTriggerClick()\"\n>\n <!-- Multi-select chips -->\n @if (multiple()) {\n @for (chip of chips(); track chip.value) {\n <span class=\"wm-cb-chip\">\n <span class=\"wm-cb-chip-label\">{{ chip.label }}</span>\n <button\n type=\"button\"\n class=\"wm-cb-chip-remove\"\n tabindex=\"-1\"\n [attr.aria-label]=\"'Remove ' + chip.label\"\n (mousedown)=\"$event.preventDefault(); $event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); removeChip(chip.value)\"\n >\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M18 6L6 18M6 6l12 12\"\n stroke=\"currentColor\" stroke-width=\"2\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n </span>\n }\n }\n\n <!-- Text input -->\n <input\n #inputEl\n type=\"text\"\n class=\"wm-cb-input\"\n role=\"combobox\"\n autocomplete=\"off\"\n [attr.placeholder]=\"chips().length ? '' : placeholder()\"\n [attr.aria-label]=\"ariaLabelledby() ? null : ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-expanded]=\"isOpen()\"\n aria-haspopup=\"listbox\"\n [attr.aria-autocomplete]=\"allowFreeform() ? 'both' : 'list'\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-controls]=\"isOpen() ? panelListboxId() : null\"\n [disabled]=\"disabled() || null\"\n [value]=\"inputText()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n />\n\n <!-- Chevron -->\n <svg\n class=\"wm-cb-chevron\"\n [class.is-open]=\"isOpen()\"\n width=\"16\" height=\"16\" viewBox=\"0 0 24 24\"\n fill=\"none\" aria-hidden=\"true\"\n >\n <path d=\"M6 9l6 6 6-6\"\n stroke=\"currentColor\" stroke-width=\"2\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n</div>\n\n<!-- Live region for screen readers -->\n<span class=\"wm-cb-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {{ liveText() }}\n</span>\n\n<!-- Dropdown panel in CDK overlay -->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"wm-cb-backdrop\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div class=\"wm-cb-panel\">\n <wm-combobox-panel\n [options]=\"filteredOptions()\"\n [highlightIndex]=\"highlightIndex()\"\n [selectedValues]=\"selectedValues()\"\n [multiple]=\"multiple()\"\n [itemHeight]=\"itemHeight()\"\n [maxHeight]=\"maxPanelHeight()\"\n [filterQuery]=\"inputText()\"\n [loading]=\"asyncLoading()\"\n [freeformHint]=\"freeformHint()\"\n (optionClicked)=\"onOptionClicked($event)\"\n />\n </div>\n</ng-template>\n","import { Injectable, signal } from '@angular/core';\n\nexport type ToastType = 'success' | 'error' | 'info' | 'progress';\n\nexport interface Toast {\n id: number;\n message: string;\n type: ToastType;\n /** If true, toast does not auto-dismiss. Caller must dismiss it manually. */\n persistent?: boolean;\n /** Epoch ms when this toast was created (used for elapsed time display). */\n createdAt?: number;\n /** Callback invoked when the user clicks the Cancel button (progress toasts only). */\n onCancel?: () => void;\n}\n\nlet nextId = 0;\n\n/**\n * WmToastService — Application-wide toast notification manager.\n *\n * Provided in root; inject anywhere and call success(), error(), info(), or progress().\n * Render `<wm-toast-container>` once at the app root to display toasts.\n *\n * Auto-dismiss: success/info after 4 s, error after 6 s.\n * Progress toasts persist until explicitly dismissed.\n * Custom duration via show(message, type, durationMs).\n */\n@Injectable({ providedIn: 'root' })\nexport class WmToastService {\n readonly toasts = signal<Toast[]>([]);\n\n show(message: string, type: ToastType = 'info', duration?: number): number {\n const id = ++nextId;\n this.toasts.update(list => [...list, { id, message, type }]);\n const ms = duration ?? (type === 'error' ? 6000 : 4000);\n setTimeout(() => this.dismiss(id), ms);\n return id;\n }\n\n success(message: string): number { return this.show(message, 'success'); }\n error(message: string): number { return this.show(message, 'error'); }\n info(message: string): number { return this.show(message, 'info'); }\n\n /**\n * Show a persistent progress toast with spinner and elapsed timer.\n * Returns the toast ID — caller must call dismiss(id) when done.\n *\n * @param message - Display message (e.g. \"Generating docs…\")\n * @param onCancel - Optional callback invoked when the user clicks Cancel.\n * The caller should abort the operation and then dismiss the toast.\n */\n progress(message: string, onCancel?: () => void): number {\n const id = ++nextId;\n this.toasts.update(list => [\n ...list,\n { id, message, type: 'progress', persistent: true, createdAt: Date.now(), onCancel },\n ]);\n return id;\n }\n\n dismiss(id: number): void {\n this.toasts.update(list => list.filter(t => t.id !== id));\n }\n}\n","import { Component, inject, ChangeDetectionStrategy, signal, OnDestroy } from '@angular/core';\nimport { WmToastService, Toast } from './toast.service';\n\n/**\n * WmToastContainer — Renders the current stack of toasts.\n *\n * Place once at the application root (e.g. inside the shell or app component).\n * Uses inline SVG icons — no external icon library dependency.\n *\n * Accessibility:\n * - Container has role=\"log\" + aria-live=\"polite\" so new toasts are announced\n * - Each toast has role=\"status\"\n * - Dismiss button has an accessible label\n */\n@Component({\n selector: 'wm-toast-container',\n templateUrl: './toast-container.html',\n styleUrl: './toast-container.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WmToastContainer implements OnDestroy {\n protected readonly toastService = inject(WmToastService);\n\n /** Tick signal that updates every second — drives the elapsed time display. */\n protected readonly tick = signal(Date.now());\n private tickInterval = setInterval(() => {\n // Only tick when there are progress toasts with createdAt\n if (this.toastService.toasts().some(t => t.type === 'progress' && t.createdAt)) {\n this.tick.set(Date.now());\n }\n }, 1000);\n\n ngOnDestroy(): void {\n clearInterval(this.tickInterval);\n }\n\n protected dismiss(id: number): void {\n this.toastService.dismiss(id);\n }\n\n protected cancel(toast: Toast): void {\n toast.onCancel?.();\n this.toastService.dismiss(toast.id);\n }\n\n protected typeClass(toast: Toast): string {\n return `wm-toast wm-toast--${toast.type}`;\n }\n\n protected elapsed(createdAt: number): string {\n const now = this.tick(); // reactive dependency on tick\n const diff = Math.max(0, Math.floor((now - createdAt) / 1000));\n if (diff < 60) return `${diff}s`;\n const mins = Math.floor(diff / 60);\n const secs = diff % 60;\n return `${mins}m ${secs.toString().padStart(2, '0')}s`;\n }\n}\n","<div class=\"wm-toast-container\" role=\"log\" aria-live=\"polite\" aria-label=\"Notifications\">\n @for (toast of toastService.toasts(); track toast.id) {\n <div [class]=\"typeClass(toast)\" role=\"status\">\n <!-- Success icon (check-circle) -->\n @if (toast.type === 'success') {\n <svg class=\"wm-toast-icon\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\"\n fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"/>\n <polyline points=\"22 4 12 14.01 9 11.01\"/>\n </svg>\n }\n <!-- Error icon (x-circle) -->\n @if (toast.type === 'error') {\n <svg class=\"wm-toast-icon\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\"\n fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"/>\n <line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\"/>\n <line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\"/>\n </svg>\n }\n <!-- Info icon -->\n @if (toast.type === 'info') {\n <svg class=\"wm-toast-icon\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\"\n fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"/>\n <line x1=\"12\" y1=\"16\" x2=\"12\" y2=\"12\"/>\n <line x1=\"12\" y1=\"8\" x2=\"12.01\" y2=\"8\"/>\n </svg>\n }\n <!-- Progress spinner -->\n @if (toast.type === 'progress') {\n <span class=\"wm-toast-spinner\" aria-hidden=\"true\"></span>\n }\n\n <span class=\"wm-toast-message\">\n {{ toast.message }}\n @if (toast.type === 'progress' && toast.createdAt) {\n <span class=\"wm-toast-elapsed\"> ({{ elapsed(toast.createdAt) }})</span>\n }\n </span>\n\n <!-- Cancel button for progress toasts with an onCancel callback -->\n @if (toast.type === 'progress' && toast.onCancel) {\n <button class=\"wm-toast-cancel\" (click)=\"cancel(toast)\" aria-label=\"Cancel operation\">Cancel</button>\n }\n\n <!-- Dismiss button — always shown -->\n <button class=\"wm-toast-dismiss\" (click)=\"dismiss(toast.id)\" aria-label=\"Dismiss notification\">\n <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\"\n fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"/>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"/>\n </svg>\n </button>\n </div>\n }\n</div>\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, input } from '@angular/core';\n\n/**\n * The floating surface a `[wmTooltip]` renders into.\n *\n * Internal to the tooltip — consumers never place this element themselves. It\n * exists as a component rather than a hand-built `<div>` so the panel's styles\n * ship with the component that needs them, the same arrangement `wm-popover`\n * uses for its panel.\n *\n * `ViewEncapsulation.None` is required, not stylistic: the panel is attached to\n * the CDK overlay container at the end of `<body>`, outside the host\n * component's DOM, so an emulated-encapsulation attribute selector would never\n * match it.\n */\n@Component({\n selector: 'wm-tooltip-panel',\n template: `<div\n class=\"wm-tooltip-panel\"\n [class.wm-tooltip-panel--visible]=\"visible()\"\n [id]=\"panelId()\"\n role=\"tooltip\"\n >{{ text() }}</div>`,\n styleUrl: './tooltip.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class WmTooltipPanel {\n /** Tooltip body. Newlines are preserved — see `white-space` in tooltip.css. */\n readonly text = input<string>('');\n\n /** Id the host points at with aria-describedby / aria-labelledby. */\n readonly panelId = input<string>('');\n\n /**\n * Drives the enter transition.\n *\n * The panel attaches with this false and is raised on the next frame, so the\n * fade has two states to move between. Attaching straight to the visible\n * state would give the browser nothing to interpolate from.\n */\n readonly visible = input<boolean>(false);\n}\n","/**\n * Add and remove one id from a space-separated ARIA id-reference attribute.\n *\n * A tooltip does not own `aria-describedby`. The host may already point at an\n * error message, a hint, or a description the application wrote, and the\n * tooltip has to sit alongside those rather than replace them. It also has to\n * leave the attribute exactly as it found it once the tooltip hides, because a\n * tooltip opens and closes many times over the life of one element and any\n * drift accumulates.\n *\n * Kept as pure string functions so the rule is testable without a DOM: this is\n * the part that has to be right every time, and the overlay around it is not.\n */\n\n/** Split an id-reference list into its tokens, discarding empty runs. */\nexport function idTokens(value: string | null): string[] {\n if (!value) return [];\n return value.split(/\\s+/).filter((token) => token.length > 0);\n}\n\n/**\n * Return the attribute value with `id` present exactly once, appended last.\n *\n * Appending rather than prepending matters: assistive technology announces a\n * description list in order, and the application's own description is the more\n * specific one. The tooltip is supplementary, so it speaks last.\n */\nexport function withIdToken(value: string | null, id: string): string {\n const tokens = idTokens(value).filter((token) => token !== id);\n tokens.push(id);\n return tokens.join(' ');\n}\n\n/**\n * Return the attribute value with `id` removed, or `null` when nothing is left.\n *\n * `null` is the signal to remove the attribute outright. An empty\n * `aria-describedby=\"\"` is not the same as no attribute: some assistive\n * technology treats the empty string as a broken reference, and it also makes\n * a host that never carried the attribute look, on inspection, as though it\n * did.\n */\nexport function withoutIdToken(value: string | null, id: string): string | null {\n const tokens = idTokens(value).filter((token) => token !== id);\n return tokens.length > 0 ? tokens.join(' ') : null;\n}\n","import {\n ComponentRef,\n DestroyRef,\n Directive,\n ElementRef,\n Injector,\n Renderer2,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n ConnectedPosition,\n OverlayRef,\n createFlexibleConnectedPositionStrategy,\n createOverlayRef,\n createRepositionScrollStrategy,\n} from '@angular/cdk/overlay';\n\nimport { onViewportChange } from '../overlay/viewport-change';\nimport { WmTooltipPanel } from './tooltip-panel';\nimport { withIdToken, withoutIdToken } from './aria-tokens';\n\n/** Where the panel sits relative to its host, before any viewport fallback. */\nexport type WmTooltipPosition = 'top' | 'bottom' | 'left' | 'right';\n\n/**\n * How the panel is related to the host for assistive technology.\n *\n * `description` points the host at the panel with `aria-describedby`. Use it\n * when the host already has a name and the tooltip adds detail — an icon with\n * an `aria-label`, a truncated cell, a status mark.\n *\n * `label` uses `aria-labelledby` instead, for an icon-only control whose only\n * name is the tooltip. Do not use it alongside an `aria-label` on the same\n * host: `aria-labelledby` wins, and the two texts then disagree about what the\n * control is called depending on whether the tooltip happens to be open.\n */\nexport type WmTooltipRelation = 'description' | 'label';\n\n/** Grace period before a pointer leaving the host closes the tooltip. */\nconst HIDE_DELAY_MS = 120;\n\nlet nextId = 0;\n\n/**\n * WmTooltip — accessible floating explanation for any element.\n *\n * ```html\n * <button class=\"wm-btn btn-icon-only\" aria-label=\"Undo\" [wmTooltip]=\"'Undo the last commit'\">…</button>\n * ```\n *\n * Why this exists next to the CSS `[data-tooltip]` chip: that chip is a\n * pseudo-element on the host, so it cannot escape an ancestor's\n * `overflow: hidden`, cannot wrap, and is invisible to assistive technology —\n * it is a visual hint that must be paired with an `aria-label` saying the same\n * thing twice. Reach for the chip for a one-to-five word label on a toolbar\n * button. Reach for this directive when the text explains something, when the\n * host sits inside a scrolling container, or when the explanation must be part\n * of the accessible description rather than a duplicate of it.\n *\n * Accessibility:\n * - The panel carries `role=\"tooltip\"` and a generated id.\n * - While open, the host points at that id with `aria-describedby` (default)\n * or `aria-labelledby`. The id is appended to whatever the host already\n * referenced and removed again on hide, so an application's own description\n * survives untouched.\n * - Opens on hover and on `:focus-visible`, so a mouse click that moves focus\n * to a button does not leave a tooltip hanging behind the pointer.\n * - WCAG 1.4.13 (Content on Hover or Focus): Escape dismisses without moving\n * focus; the pointer can travel into the panel and read it without it\n * closing; nothing auto-dismisses on a timer.\n *\n * Keyboard reachability is the caller's responsibility. A tooltip on an element\n * that cannot take focus is unreachable by keyboard, so set\n * `wmTooltipFocusable` to make the host a tab stop — but NOT inside a\n * roving-tabindex container (tree, listbox, grid, tablist). There the container\n * is a single tab stop by design, and adding one stop per row is worse for\n * keyboard users than the gap it closes. Put the tooltip on the row itself, or\n * expose it from a control the roving focus already reaches.\n */\n@Directive({\n selector: '[wmTooltip]',\n exportAs: 'wmTooltip',\n host: {\n '(mouseenter)': 'onPointerEnterHost()',\n '(mouseleave)': 'onPointerLeaveHost()',\n '(focusin)': 'onFocusHost()',\n '(focusout)': 'onBlurHost()',\n '(click)': 'hideNow()',\n },\n})\nexport class WmTooltip {\n /** Tooltip body. Blank or absent means the tooltip never opens. */\n readonly wmTooltip = input<string | null | undefined>('');\n\n /** Preferred side. Flips automatically when the viewport has no room. */\n readonly wmTooltipPosition = input<WmTooltipPosition>('bottom');\n\n /** Milliseconds a pointer must rest on the host before the panel opens. */\n readonly wmTooltipDelay = input<number>(250);\n\n /** Suppress the tooltip without unbinding it — for a control whose explanation only applies in some states. */\n readonly wmTooltipDisabled = input<boolean>(false);\n\n /** Whether the panel describes the host or names it. See WmTooltipRelation. */\n readonly wmTooltipRelation = input<WmTooltipRelation>('description');\n\n /**\n * Make a non-focusable host a tab stop so a keyboard user can reach the\n * tooltip. Only applied when the host is not already focusable, and never\n * safe inside a roving-tabindex container — see the class comment.\n */\n readonly wmTooltipFocusable = input<boolean>(false);\n\n private readonly host = inject(ElementRef).nativeElement as HTMLElement;\n private readonly injector = inject(Injector);\n private readonly renderer = inject(Renderer2);\n\n private readonly panelId = `wm-tooltip-${nextId++}`;\n\n private overlayRef: OverlayRef | null = null;\n private panelRef: ComponentRef<WmTooltipPanel> | null = null;\n private portal: ComponentPortal<WmTooltipPanel> | null = null;\n\n private showTimer: ReturnType<typeof setTimeout> | null = null;\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n private raiseFrame: number | null = null;\n\n private pointerOnHost = false;\n private pointerOnPanel = false;\n private hostFocused = false;\n\n private detachDocumentListeners: (() => void) | null = null;\n\n /**\n * Elements between the host and the document that can clip it, resolved\n * once per open. They cannot change while the panel is up, and walking the\n * ancestor chain on every scroll event would be work done per frame.\n */\n private clippingAncestors: HTMLElement[] = [];\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.teardown());\n\n effect(() => {\n const focusable = this.wmTooltipFocusable();\n // Read so the effect re-runs when the host stops carrying a tooltip.\n const hasText = this.text().length > 0;\n\n if (focusable && hasText && !this.isNativelyFocusable()) {\n this.renderer.setAttribute(this.host, 'tabindex', '0');\n }\n });\n\n effect(() => {\n const text = this.text();\n const disabled = this.wmTooltipDisabled();\n\n if (disabled || text.length === 0) {\n this.hideNow();\n return;\n }\n this.panelRef?.setInput('text', text);\n });\n }\n\n /** Open the tooltip immediately, bypassing the hover delay. */\n show(): void {\n this.clearTimer('show');\n this.clearTimer('hide');\n if (this.overlayRef?.hasAttached()) return;\n if (this.wmTooltipDisabled() || this.text().length === 0) return;\n\n const overlayRef = this.ensureOverlay();\n this.panelRef = overlayRef.attach(this.portal!);\n this.panelRef.setInput('text', this.text());\n this.panelRef.setInput('panelId', this.panelId);\n this.panelRef.changeDetectorRef.detectChanges();\n\n this.linkHostToPanel();\n this.clippingAncestors = this.resolveClippingAncestors();\n this.attachDocumentListeners();\n\n // Attach invisible, raise on the next frame: a transition needs a state to\n // move away from, and attaching straight to the visible state gives the\n // browser nothing to interpolate.\n this.raiseFrame = requestAnimationFrame(() => {\n this.raiseFrame = null;\n this.panelRef?.setInput('visible', true);\n this.panelRef?.changeDetectorRef.detectChanges();\n });\n }\n\n /** Close the tooltip immediately, without the pointer grace period. */\n hideNow(): void {\n this.clearTimer('show');\n this.clearTimer('hide');\n\n if (this.raiseFrame !== null) {\n cancelAnimationFrame(this.raiseFrame);\n this.raiseFrame = null;\n }\n\n this.releaseDocumentListeners();\n this.unlinkHostFromPanel();\n this.clippingAncestors = [];\n\n if (this.overlayRef?.hasAttached()) {\n this.overlayRef.detach();\n }\n this.panelRef = null;\n }\n\n /** True while the panel is attached. Exposed for tests and for callers driving it manually. */\n get isOpen(): boolean {\n return this.overlayRef?.hasAttached() === true;\n }\n\n // ── Trigger handling ─────────────────────────────────────────────\n\n protected onPointerEnterHost(): void {\n this.pointerOnHost = true;\n this.scheduleShow();\n }\n\n protected onPointerLeaveHost(): void {\n this.pointerOnHost = false;\n this.scheduleHide();\n }\n\n protected onFocusHost(): void {\n // Only keyboard focus opens the tooltip. Clicking a button focuses it too,\n // and a tooltip that opens on click sits under the pointer that just left.\n if (!this.matchesFocusVisible()) return;\n this.hostFocused = true;\n this.show();\n }\n\n protected onBlurHost(): void {\n this.hostFocused = false;\n this.scheduleHide();\n }\n\n // ── Internals ────────────────────────────────────────────────────\n\n private text(): string {\n return (this.wmTooltip() ?? '').toString();\n }\n\n private scheduleShow(): void {\n if (this.isOpen) {\n this.clearTimer('hide');\n return;\n }\n if (this.wmTooltipDisabled() || this.text().length === 0) return;\n\n this.clearTimer('hide');\n this.clearTimer('show');\n const delay = Math.max(0, this.wmTooltipDelay());\n this.showTimer = setTimeout(() => {\n this.showTimer = null;\n this.show();\n }, delay);\n }\n\n private scheduleHide(): void {\n this.clearTimer('show');\n this.clearTimer('hide');\n this.hideTimer = setTimeout(() => {\n this.hideTimer = null;\n if (this.pointerOnHost || this.pointerOnPanel || this.hostFocused) return;\n this.hideNow();\n }, HIDE_DELAY_MS);\n }\n\n private clearTimer(which: 'show' | 'hide'): void {\n const timer = which === 'show' ? this.showTimer : this.hideTimer;\n if (timer === null) return;\n clearTimeout(timer);\n if (which === 'show') this.showTimer = null;\n else this.hideTimer = null;\n }\n\n private ensureOverlay(): OverlayRef {\n if (this.overlayRef) return this.overlayRef;\n\n const positionStrategy = createFlexibleConnectedPositionStrategy(this.injector, this.host)\n .withFlexibleDimensions(false)\n .withPush(true)\n .withPositions(this.positions());\n\n this.overlayRef = createOverlayRef(this.injector, {\n positionStrategy,\n scrollStrategy: createRepositionScrollStrategy(this.injector),\n panelClass: 'wm-tooltip-overlay',\n hasBackdrop: false,\n });\n\n // The pointer may travel from the host into the panel. WCAG 1.4.13 requires\n // that reading the tooltip that way does not dismiss it, which matters most\n // for the long explanations this directive exists to carry.\n const overlayEl = this.overlayRef.overlayElement;\n overlayEl.addEventListener('mouseenter', this.onPointerEnterPanel);\n overlayEl.addEventListener('mouseleave', this.onPointerLeavePanel);\n\n positionStrategy.positionChanges.subscribe((change) => {\n const above = change.connectionPair.overlayY === 'bottom';\n overlayEl.classList.toggle('wm-tooltip-above', above);\n });\n\n this.portal = new ComponentPortal(WmTooltipPanel, null, this.injector);\n return this.overlayRef;\n }\n\n private positions(): ConnectedPosition[] {\n const offset = 6;\n const below: ConnectedPosition = {\n originX: 'center', originY: 'bottom',\n overlayX: 'center', overlayY: 'top', offsetY: offset,\n };\n const above: ConnectedPosition = {\n originX: 'center', originY: 'top',\n overlayX: 'center', overlayY: 'bottom', offsetY: -offset,\n };\n const after: ConnectedPosition = {\n originX: 'end', originY: 'center',\n overlayX: 'start', overlayY: 'center', offsetX: offset,\n };\n const before: ConnectedPosition = {\n originX: 'start', originY: 'center',\n overlayX: 'end', overlayY: 'center', offsetX: -offset,\n };\n\n // The preferred side first, then its opposite, then the perpendicular pair.\n // A tooltip that has run out of room on both preferred sides is better off\n // beside the host than pushed over the top of it.\n switch (this.wmTooltipPosition()) {\n case 'top': return [above, below, after, before];\n case 'left': return [before, after, above, below];\n case 'right': return [after, before, above, below];\n default: return [below, above, after, before];\n }\n }\n\n private readonly onPointerEnterPanel = (): void => {\n this.pointerOnPanel = true;\n this.clearTimer('hide');\n };\n\n private readonly onPointerLeavePanel = (): void => {\n this.pointerOnPanel = false;\n this.scheduleHide();\n };\n\n private attachDocumentListeners(): void {\n if (this.detachDocumentListeners) return;\n\n const onKeydown = (event: KeyboardEvent): void => {\n if (event.key !== 'Escape') return;\n // Dismiss without moving focus and without stopping the event: the host\n // may sit in a dialog or a menu whose own Escape handling still applies,\n // and swallowing it would trap the user one layer deeper than they are.\n this.hideNow();\n };\n\n // A pointer press anywhere settles the interaction. Without this, a panel\n // that overlaps the control below it can swallow the click that was meant\n // for that control.\n const onPointerDown = (): void => this.hideNow();\n\n // Re-anchor to the host whenever anything underneath it moves. The capture\n // phase is load-bearing and the reason this is not left to CDK's\n // reposition strategy - see `onViewportChange`.\n const stopFollowing = onViewportChange(() => this.reanchor());\n\n document.addEventListener('keydown', onKeydown, true);\n document.addEventListener('pointerdown', onPointerDown, true);\n\n this.detachDocumentListeners = () => {\n document.removeEventListener('keydown', onKeydown, true);\n document.removeEventListener('pointerdown', onPointerDown, true);\n stopFollowing();\n };\n }\n\n private releaseDocumentListeners(): void {\n this.detachDocumentListeners?.();\n this.detachDocumentListeners = null;\n }\n\n /**\n * Follow the host, or give up on it.\n *\n * Repositioning alone is not enough. Once the host has scrolled out of its\n * container the panel would be pushed against the container edge and left\n * explaining a row the reader can no longer see - worse than not being there,\n * because it now appears to describe whatever it happens to cover.\n */\n private reanchor(): void {\n if (!this.overlayRef?.hasAttached()) return;\n\n if (this.isHostClipped()) {\n this.hideNow();\n return;\n }\n this.overlayRef.updatePosition();\n }\n\n /** Every ancestor that can clip the host, nearest first. */\n private resolveClippingAncestors(): HTMLElement[] {\n const clipping: HTMLElement[] = [];\n let node = this.host.parentElement;\n\n while (node) {\n const style = getComputedStyle(node);\n const clips = [style.overflow, style.overflowX, style.overflowY].some(\n (value) => value === 'auto' || value === 'scroll' || value === 'hidden',\n );\n if (clips) clipping.push(node);\n node = node.parentElement;\n }\n return clipping;\n }\n\n /** True once no part of the host is inside every container that clips it. */\n private isHostClipped(): boolean {\n const host = this.host.getBoundingClientRect();\n\n const outside = (bounds: { top: number; bottom: number; left: number; right: number }) =>\n host.bottom < bounds.top ||\n host.top > bounds.bottom ||\n host.right < bounds.left ||\n host.left > bounds.right;\n\n const viewport = {\n top: 0,\n left: 0,\n bottom: window.innerHeight || document.documentElement.clientHeight,\n right: window.innerWidth || document.documentElement.clientWidth,\n };\n if (outside(viewport)) return true;\n\n return this.clippingAncestors.some((ancestor) =>\n outside(ancestor.getBoundingClientRect()),\n );\n }\n\n private relationAttribute(): string {\n return this.wmTooltipRelation() === 'label' ? 'aria-labelledby' : 'aria-describedby';\n }\n\n private linkHostToPanel(): void {\n const attribute = this.relationAttribute();\n const next = withIdToken(this.host.getAttribute(attribute), this.panelId);\n this.renderer.setAttribute(this.host, attribute, next);\n }\n\n private unlinkHostFromPanel(): void {\n // Both are cleared rather than only the current one: `wmTooltipRelation`\n // can change while the panel is open, and the attribute written on show\n // would otherwise be orphaned, leaving the host pointing at an id that no\n // longer exists in the document.\n for (const attribute of ['aria-describedby', 'aria-labelledby']) {\n const current = this.host.getAttribute(attribute);\n if (current === null) continue;\n\n const next = withoutIdToken(current, this.panelId);\n if (next === null) this.renderer.removeAttribute(this.host, attribute);\n else if (next !== current) this.renderer.setAttribute(this.host, attribute, next);\n }\n }\n\n private isNativelyFocusable(): boolean {\n if (this.host.hasAttribute('tabindex')) return true;\n return ['a', 'button', 'input', 'select', 'textarea', 'summary'].includes(\n this.host.tagName.toLowerCase(),\n );\n }\n\n private matchesFocusVisible(): boolean {\n // `:focus-visible` is unsupported in some test environments; treating an\n // unsupported selector as \"not keyboard focus\" would silently disable the\n // keyboard path, so fall back to opening on any focus.\n try {\n return this.host.matches(':focus-visible');\n } catch {\n return true;\n }\n }\n\n private teardown(): void {\n this.hideNow();\n\n const overlayEl = this.overlayRef?.overlayElement;\n overlayEl?.removeEventListener('mouseenter', this.onPointerEnterPanel);\n overlayEl?.removeEventListener('mouseleave', this.onPointerLeavePanel);\n\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.portal = null;\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, TemplateRef, ViewEncapsulation, input } from '@angular/core';\n\n/**\n * The floating surface a `wm-rich-tooltip` renders into.\n *\n * This is deliberately a separate panel from `WmTooltipPanel`: the latter's\n * text node owns `white-space: pre-line`, while this panel must leave the\n * projected template's markup and layout intact.\n */\n@Component({\n selector: 'wm-rich-tooltip-panel',\n imports: [NgTemplateOutlet],\n template: `<div\n class=\"wm-tooltip-panel wm-rich-tooltip-panel\"\n [class.wm-tooltip-panel--visible]=\"visible()\"\n [id]=\"panelId()\"\n role=\"tooltip\"\n >\n <ng-container [ngTemplateOutlet]=\"content()\"></ng-container>\n </div>`,\n styleUrl: './tooltip.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class WmRichTooltipPanel {\n /** The caller-owned Angular template rendered as the tooltip body. */\n readonly content = input<TemplateRef<unknown> | null>(null);\n\n /** Id the trigger points at with aria-describedby / aria-labelledby. */\n readonly panelId = input<string>('');\n\n /** Drives the enter transition after the overlay has attached. */\n readonly visible = input<boolean>(false);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n DestroyRef,\n Directive,\n ElementRef,\n Injector,\n Renderer2,\n TemplateRef,\n ViewEncapsulation,\n contentChild,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n ConnectedPosition,\n OverlayRef,\n createFlexibleConnectedPositionStrategy,\n createOverlayRef,\n createRepositionScrollStrategy,\n} from '@angular/cdk/overlay';\nimport { Subscription } from 'rxjs';\n\nimport { onViewportChange } from '../overlay/viewport-change';\nimport type { WmTooltipPosition, WmTooltipRelation } from './tooltip';\nimport { withIdToken, withoutIdToken } from './aria-tokens';\nimport { WmRichTooltipPanel } from './rich-tooltip-panel';\n\n/** Marks the projected element that owns a rich tooltip. */\n@Directive({\n selector: '[wmRichTooltipTrigger]',\n})\nexport class WmRichTooltipTrigger {\n readonly elementRef = inject(ElementRef<HTMLElement>);\n}\n\n/** Marks the projected Angular template used as a rich tooltip's body. */\n@Directive({\n selector: 'ng-template[wmRichTooltipContent]',\n})\nexport class WmRichTooltipContent {\n readonly templateRef = inject(TemplateRef<unknown>);\n}\n\nlet nextRichTooltipId = 0;\nconst HIDE_DELAY_MS = 120;\n\n/**\n * `wm-rich-tooltip` — a tooltip-shaped CDK overlay with projected Angular\n * template content.\n *\n * ```html\n * <wm-rich-tooltip position=\"top\">\n * <span wmRichTooltipTrigger>feature/checkout</span>\n * <ng-template wmRichTooltipContent>\n * <strong>feature/checkout</strong>\n * <div class=\"legend-row\">\n * <span class=\"swatch\" aria-hidden=\"true\"></span>\n * <span>Pull request linked</span>\n * </div>\n * </ng-template>\n * </wm-rich-tooltip>\n * ```\n *\n * The body is an Angular `TemplateRef`, not an HTML string. Consumers can use\n * normal Angular markup, bindings, loops, and components; callers should not\n * use this as a path for unsanitized user HTML. If a caller explicitly uses\n * Angular's `[innerHTML]`, Angular's normal sanitizer remains the boundary.\n *\n * The interaction contract matches `WmTooltip`: hover and keyboard focus,\n * Escape dismissal, a hoverable panel, scroll/resize re-anchoring, clipping\n * detection, and an `aria-describedby` relationship by default. Rich tooltip\n * content should remain non-interactive; use `WmPopover` for menus, links,\n * forms, or other content that needs focus and interaction.\n */\n@Component({\n selector: 'wm-rich-tooltip',\n template: `\n <ng-content select=\"[wmRichTooltipTrigger]\"></ng-content>\n <ng-content select=\"ng-template[wmRichTooltipContent]\"></ng-content>\n `,\n host: { style: 'display: contents' },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class WmRichTooltip {\n /** Preferred side. Flips automatically when the viewport has no room. */\n readonly position = input<WmTooltipPosition>('bottom');\n\n /** Milliseconds a pointer must rest on the trigger before opening. */\n readonly delay = input<number>(250);\n\n /** Suppress the tooltip without removing its projected content. */\n readonly disabled = input<boolean>(false);\n\n /** Whether the panel describes the trigger or names it. */\n readonly relation = input<WmTooltipRelation>('description');\n\n /** Make a non-focusable projected trigger reachable by keyboard when needed. */\n readonly focusable = input<boolean>(false);\n\n private readonly injector = inject(Injector);\n private readonly renderer = inject(Renderer2);\n private readonly triggerQuery = contentChild(WmRichTooltipTrigger);\n private readonly contentQuery = contentChild(WmRichTooltipContent);\n private readonly panelId = `wm-rich-tooltip-${nextRichTooltipId++}`;\n\n private triggerElement: HTMLElement | null = null;\n private contentTemplate: TemplateRef<unknown> | null = null;\n private triggerCleanups: Array<() => void> = [];\n private addedTabIndex = false;\n\n private overlayRef: OverlayRef | null = null;\n private panelRef: ComponentRef<WmRichTooltipPanel> | null = null;\n private portal: ComponentPortal<WmRichTooltipPanel> | null = null;\n private positionChanges: Subscription | null = null;\n\n private showTimer: ReturnType<typeof setTimeout> | null = null;\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n private raiseFrame: number | null = null;\n\n private pointerOnTrigger = false;\n private pointerOnPanel = false;\n private triggerFocused = false;\n private detachDocumentListeners: (() => void) | null = null;\n private clippingAncestors: HTMLElement[] = [];\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.teardown());\n\n effect(() => {\n const trigger = this.triggerQuery();\n const content = this.contentQuery();\n const focusable = this.focusable();\n\n if (!trigger || !content) {\n this.hideNow();\n this.unbindTrigger();\n this.contentTemplate = null;\n return;\n }\n\n const element = trigger.elementRef.nativeElement;\n if (element !== this.triggerElement) this.bindTrigger(element);\n this.contentTemplate = content.templateRef;\n this.updateFocusable(element, focusable);\n\n if (this.panelRef) {\n this.panelRef.setInput('content', this.contentTemplate);\n this.panelRef.changeDetectorRef.detectChanges();\n }\n });\n\n effect(() => {\n if (this.disabled()) this.hideNow();\n });\n }\n\n /** Open the rich tooltip immediately, bypassing the hover delay. */\n show(): void {\n this.clearTimer('show');\n this.clearTimer('hide');\n\n const trigger = this.triggerElement;\n const content = this.contentTemplate ?? this.contentQuery()?.templateRef ?? null;\n if (this.overlayRef?.hasAttached()) return;\n if (!trigger || !content || this.disabled()) return;\n\n const overlayRef = this.ensureOverlay(trigger);\n this.panelRef = overlayRef.attach(this.portal!);\n this.panelRef.setInput('content', content);\n this.panelRef.setInput('panelId', this.panelId);\n this.panelRef.changeDetectorRef.detectChanges();\n\n this.linkTriggerToPanel(trigger);\n this.clippingAncestors = this.resolveClippingAncestors(trigger);\n this.attachDocumentListeners();\n\n this.raiseFrame = requestAnimationFrame(() => {\n this.raiseFrame = null;\n this.panelRef?.setInput('visible', true);\n this.panelRef?.changeDetectorRef.detectChanges();\n });\n }\n\n /** Close the rich tooltip immediately, without the pointer grace period. */\n hideNow(): void {\n this.clearTimer('show');\n this.clearTimer('hide');\n\n if (this.raiseFrame !== null) {\n cancelAnimationFrame(this.raiseFrame);\n this.raiseFrame = null;\n }\n\n this.releaseDocumentListeners();\n this.unlinkTriggerFromPanel();\n this.clippingAncestors = [];\n\n if (this.overlayRef?.hasAttached()) this.overlayRef.detach();\n this.panelRef = null;\n }\n\n /** True while the rich tooltip panel is attached. */\n get isOpen(): boolean {\n return this.overlayRef?.hasAttached() === true;\n }\n\n private bindTrigger(element: HTMLElement): void {\n if (this.triggerElement === element && this.triggerCleanups.length > 0) return;\n\n this.hideNow();\n this.unbindTrigger();\n this.triggerElement = element;\n this.triggerCleanups = [\n this.renderer.listen(element, 'mouseenter', () => this.onPointerEnterTrigger()),\n this.renderer.listen(element, 'mouseleave', () => this.onPointerLeaveTrigger()),\n this.renderer.listen(element, 'focusin', () => this.onFocusTrigger()),\n this.renderer.listen(element, 'focusout', () => this.onBlurTrigger()),\n this.renderer.listen(element, 'click', () => this.hideNow()),\n ];\n }\n\n private unbindTrigger(): void {\n for (const cleanup of this.triggerCleanups) cleanup();\n this.triggerCleanups = [];\n\n if (this.addedTabIndex && this.triggerElement?.getAttribute('tabindex') === '0') {\n this.renderer.removeAttribute(this.triggerElement, 'tabindex');\n }\n this.addedTabIndex = false;\n this.triggerElement = null;\n }\n\n private updateFocusable(element: HTMLElement, focusable: boolean): void {\n if (focusable && !this.isNativelyFocusable(element)) {\n if (!element.hasAttribute('tabindex')) {\n this.renderer.setAttribute(element, 'tabindex', '0');\n this.addedTabIndex = true;\n }\n return;\n }\n\n if (this.addedTabIndex && element.getAttribute('tabindex') === '0') {\n this.renderer.removeAttribute(element, 'tabindex');\n this.addedTabIndex = false;\n }\n }\n\n private onPointerEnterTrigger(): void {\n this.pointerOnTrigger = true;\n this.scheduleShow();\n }\n\n private onPointerLeaveTrigger(): void {\n this.pointerOnTrigger = false;\n this.scheduleHide();\n }\n\n private onFocusTrigger(): void {\n if (!this.matchesFocusVisible()) return;\n this.triggerFocused = true;\n this.show();\n }\n\n private onBlurTrigger(): void {\n this.triggerFocused = false;\n this.scheduleHide();\n }\n\n private scheduleShow(): void {\n if (this.isOpen) {\n this.clearTimer('hide');\n return;\n }\n if (this.disabled() || !this.triggerElement || !this.contentTemplate) return;\n\n this.clearTimer('hide');\n this.clearTimer('show');\n const delay = Math.max(0, this.delay());\n this.showTimer = setTimeout(() => {\n this.showTimer = null;\n this.show();\n }, delay);\n }\n\n private scheduleHide(): void {\n this.clearTimer('show');\n this.clearTimer('hide');\n this.hideTimer = setTimeout(() => {\n this.hideTimer = null;\n if (this.pointerOnTrigger || this.pointerOnPanel || this.triggerFocused) return;\n this.hideNow();\n }, HIDE_DELAY_MS);\n }\n\n private clearTimer(which: 'show' | 'hide'): void {\n const timer = which === 'show' ? this.showTimer : this.hideTimer;\n if (timer === null) return;\n clearTimeout(timer);\n if (which === 'show') this.showTimer = null;\n else this.hideTimer = null;\n }\n\n private ensureOverlay(trigger: HTMLElement): OverlayRef {\n if (this.overlayRef) return this.overlayRef;\n\n const positionStrategy = createFlexibleConnectedPositionStrategy(this.injector, trigger)\n .withFlexibleDimensions(false)\n .withPush(true)\n .withPositions(this.positions());\n\n this.overlayRef = createOverlayRef(this.injector, {\n positionStrategy,\n scrollStrategy: createRepositionScrollStrategy(this.injector),\n panelClass: ['wm-tooltip-overlay', 'wm-rich-tooltip-overlay'],\n hasBackdrop: false,\n });\n\n const overlayEl = this.overlayRef.overlayElement;\n overlayEl.addEventListener('mouseenter', this.onPointerEnterPanel);\n overlayEl.addEventListener('mouseleave', this.onPointerLeavePanel);\n\n this.positionChanges = positionStrategy.positionChanges.subscribe((change) => {\n const above = change.connectionPair.overlayY === 'bottom';\n overlayEl.classList.toggle('wm-tooltip-above', above);\n });\n\n this.portal = new ComponentPortal(WmRichTooltipPanel, null, this.injector);\n return this.overlayRef;\n }\n\n private positions(): ConnectedPosition[] {\n const offset = 6;\n const below: ConnectedPosition = {\n originX: 'center', originY: 'bottom',\n overlayX: 'center', overlayY: 'top', offsetY: offset,\n };\n const above: ConnectedPosition = {\n originX: 'center', originY: 'top',\n overlayX: 'center', overlayY: 'bottom', offsetY: -offset,\n };\n const after: ConnectedPosition = {\n originX: 'end', originY: 'center',\n overlayX: 'start', overlayY: 'center', offsetX: offset,\n };\n const before: ConnectedPosition = {\n originX: 'start', originY: 'center',\n overlayX: 'end', overlayY: 'center', offsetX: -offset,\n };\n\n switch (this.position()) {\n case 'top': return [above, below, after, before];\n case 'left': return [before, after, above, below];\n case 'right': return [after, before, above, below];\n default: return [below, above, after, before];\n }\n }\n\n private readonly onPointerEnterPanel = (): void => {\n this.pointerOnPanel = true;\n this.clearTimer('hide');\n };\n\n private readonly onPointerLeavePanel = (): void => {\n this.pointerOnPanel = false;\n this.scheduleHide();\n };\n\n private attachDocumentListeners(): void {\n if (this.detachDocumentListeners) return;\n\n const onKeydown = (event: KeyboardEvent): void => {\n if (event.key === 'Escape') this.hideNow();\n };\n const onPointerDown = (): void => this.hideNow();\n const stopFollowing = onViewportChange(() => this.reanchor());\n\n document.addEventListener('keydown', onKeydown, true);\n document.addEventListener('pointerdown', onPointerDown, true);\n\n this.detachDocumentListeners = () => {\n document.removeEventListener('keydown', onKeydown, true);\n document.removeEventListener('pointerdown', onPointerDown, true);\n stopFollowing();\n };\n }\n\n private releaseDocumentListeners(): void {\n this.detachDocumentListeners?.();\n this.detachDocumentListeners = null;\n }\n\n private reanchor(): void {\n if (!this.overlayRef?.hasAttached()) return;\n if (this.isTriggerClipped()) {\n this.hideNow();\n return;\n }\n this.overlayRef.updatePosition();\n }\n\n private resolveClippingAncestors(trigger: HTMLElement): HTMLElement[] {\n const clipping: HTMLElement[] = [];\n let node = trigger.parentElement;\n\n while (node) {\n const style = getComputedStyle(node);\n const clips = [style.overflow, style.overflowX, style.overflowY].some(\n (value) => value === 'auto' || value === 'scroll' || value === 'hidden',\n );\n if (clips) clipping.push(node);\n node = node.parentElement;\n }\n return clipping;\n }\n\n private isTriggerClipped(): boolean {\n if (!this.triggerElement) return true;\n const trigger = this.triggerElement.getBoundingClientRect();\n const outside = (bounds: { top: number; bottom: number; left: number; right: number }) =>\n trigger.bottom < bounds.top ||\n trigger.top > bounds.bottom ||\n trigger.right < bounds.left ||\n trigger.left > bounds.right;\n\n const viewport = {\n top: 0,\n left: 0,\n bottom: window.innerHeight || document.documentElement.clientHeight,\n right: window.innerWidth || document.documentElement.clientWidth,\n };\n if (outside(viewport)) return true;\n return this.clippingAncestors.some((ancestor) => outside(ancestor.getBoundingClientRect()));\n }\n\n private relationAttribute(): string {\n return this.relation() === 'label' ? 'aria-labelledby' : 'aria-describedby';\n }\n\n private linkTriggerToPanel(trigger: HTMLElement): void {\n const attribute = this.relationAttribute();\n const next = withIdToken(trigger.getAttribute(attribute), this.panelId);\n this.renderer.setAttribute(trigger, attribute, next);\n }\n\n private unlinkTriggerFromPanel(): void {\n if (!this.triggerElement) return;\n for (const attribute of ['aria-describedby', 'aria-labelledby']) {\n const current = this.triggerElement.getAttribute(attribute);\n if (current === null) continue;\n\n const next = withoutIdToken(current, this.panelId);\n if (next === null) this.renderer.removeAttribute(this.triggerElement, attribute);\n else if (next !== current) this.renderer.setAttribute(this.triggerElement, attribute, next);\n }\n }\n\n private isNativelyFocusable(element: HTMLElement): boolean {\n if (element.hasAttribute('tabindex')) return true;\n return ['a', 'button', 'input', 'select', 'textarea', 'summary'].includes(\n element.tagName.toLowerCase(),\n );\n }\n\n private matchesFocusVisible(): boolean {\n if (!this.triggerElement) return false;\n try {\n return this.triggerElement.matches(':focus-visible');\n } catch {\n return true;\n }\n }\n\n private teardown(): void {\n this.hideNow();\n this.unbindTrigger();\n\n const overlayEl = this.overlayRef?.overlayElement;\n overlayEl?.removeEventListener('mouseenter', this.onPointerEnterPanel);\n overlayEl?.removeEventListener('mouseleave', this.onPointerLeavePanel);\n this.positionChanges?.unsubscribe();\n this.positionChanges = null;\n\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.portal = null;\n }\n}\n","// Components\nexport { WmModal } from './modal/modal';\nexport { WmDialog } from './dialog/dialog';\nexport { WmSelect } from './select/select';\nexport { WmPopover } from './popover/popover';\nexport { WmAutoFocus } from './popover/auto-focus.directive';\nexport { WmTabs } from './tabs/tabs';\nexport { WmTab } from './tabs/tab';\nexport { WmButton } from './button/button';\nexport { WmButtonDirective } from './button/button.directive';\nexport { Checkbox } from './checkbox/checkbox';\nexport { NumberInput } from './number-input/number-input';\nexport { Toggle } from './toggle/toggle';\nexport { WmSlider } from './slider/slider';\nexport { WmToggleGroup, WmToggleGroupItem } from './toggle-group/toggle-group';\nexport { GhostField } from './ghost-field/ghost-field';\nexport { PageHeader } from './page-header/page-header';\nexport { WmCombobox } from './combobox/combobox';\nexport { WmToastContainer } from './toast/toast-container';\nexport { WmToastService } from './toast/toast.service';\nexport { WmTooltip } from './tooltip/tooltip';\nexport {\n WmRichTooltip,\n WmRichTooltipContent,\n WmRichTooltipTrigger,\n} from './tooltip/rich-tooltip';\nexport { WmAnchoredScrollStrategy } from './overlay/anchored-scroll-strategy';\nexport { onViewportChange } from './overlay/viewport-change';\n\n// The license UI is the separate `@wildmason/aegis/license` entry point\n// (`license/index.ts`): it calls Tauri commands, and this entry must stay\n// importable by a web app that has no Tauri runtime.\n\n// Types\nexport type { DialogSize } from './dialog/dialog';\nexport type { SelectOption } from './select/option';\nexport type { ButtonVariant, ButtonSize } from './button/button';\nexport type { ToastType, Toast } from './toast/toast.service';\nexport type { ComboboxOption } from './combobox/option';\nexport type { WmTooltipPosition, WmTooltipRelation } from './tooltip/tooltip';\nexport type { WmSliderTick, WmSliderTickFn, WmSliderTrack } from './slider/slider';\nexport type { WmToggleGroupAppearance, WmToggleGroupSize } from './toggle-group/toggle-group';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["nextId","HIDE_DELAY_MS"],"mappings":";;;;;;;;;;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDG;MASU,OAAO,CAAA;;AAElB,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAW;;IAGnC,OAAO,GAAG,MAAM,EAAQ;AAExB;;;;AAIG;AACH,IAAA,KAAK,GAAG,KAAK,CAAmB,QAAQ,4EAAC;IAGzC,QAAQ,GAAA;QACN,IAAI,IAAI,CAAC,OAAO,EAAE;AAAE,YAAA,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;IACzC;w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