@cdevhub/ngx-tw 0.2.0 → 0.2.1
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/fesm2022/cdevhub-ngx-tw-alert.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-button.mjs +11 -7
- package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs +8 -1
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs +8 -2
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs +8 -9
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs +10 -0
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs +2 -2
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-core.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +2 -0
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs +6 -2
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-select.mjs +10 -0
- package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-sort.mjs +3 -0
- package/fesm2022/cdevhub-ngx-tw-sort.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs +2 -2
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs +2 -2
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs +5 -1
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-toast.mjs +11 -0
- package/fesm2022/cdevhub-ngx-tw-toast.mjs.map +1 -1
- package/package.json +4 -1
- package/theme/_dark.css +16 -12
- package/theme/_semantic.css +3 -2
- package/types/cdevhub-ngx-tw-code-block.d.ts +8 -7
- package/types/cdevhub-ngx-tw-select.d.ts +1 -1
- package/types/cdevhub-ngx-tw-toast.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdevhub-ngx-tw-core.mjs","sources":["../../../projects/ngx-tw/core/error-state-matcher.ts","../../../projects/ngx-tw/core/sort-handle.ts","../../../projects/ngx-tw/core/overlay/positions.ts","../../../projects/ngx-tw/core/overlay/scroll-strategy.ts","../../../projects/ngx-tw/core/overlay/escape.ts","../../../projects/ngx-tw/core/overlay/picker-overlay-coordinator.ts","../../../projects/ngx-tw/core/overlay/overlay-container-helpers.ts","../../../projects/ngx-tw/core/overlay/overlay-container-coordinator.ts","../../../projects/ngx-tw/core/tab-trigger-variants.ts","../../../projects/ngx-tw/core/time-utils.ts","../../../projects/ngx-tw/core/cdevhub-ngx-tw-core.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport type { AbstractControl } from '@angular/forms';\n\n/**\n * Minimal contract for a parent form's \"submitted\" state. Both `NgForm` and\n * `FormGroupDirective` satisfy this, so the matcher can work with either.\n */\nexport interface TwFormSubmitted {\n readonly submitted: boolean;\n}\n\n/**\n * Strategy that decides when a form control should be rendered in the error\n * state. Controls read the injected matcher (or accept a per-instance\n * override) and combine the result with their own signals. Override at any\n * injector level via {@link TW_ERROR_STATE_MATCHER}.\n */\nexport interface ErrorStateMatcher {\n /** Returns true when the control should display an error. */\n isErrorState(\n control: AbstractControl | null,\n form: TwFormSubmitted | null,\n ): boolean;\n}\n\n/**\n * Default error-state strategy: errored when the control is `invalid` and\n * either has been interacted with (`dirty` or `touched`) or its parent form\n * has been submitted. Matches Material's default behavior.\n */\nexport const defaultErrorStateMatcher: ErrorStateMatcher = {\n isErrorState(control, form) {\n if (!control) {\n return false;\n }\n const interacted = control.dirty || control.touched;\n return !!control.invalid && (interacted || !!form?.submitted);\n },\n};\n\n/**\n * Injection token carrying the {@link ErrorStateMatcher} used by every ngx-tw\n * form control. Defaults to {@link defaultErrorStateMatcher}; provide a\n * different matcher at root to change global error-display policy, or at any\n * descendant injector to scope the change.\n */\nexport const TW_ERROR_STATE_MATCHER = new InjectionToken<ErrorStateMatcher>(\n 'TW_ERROR_STATE_MATCHER',\n {\n providedIn: 'root',\n factory: () => defaultErrorStateMatcher,\n },\n);\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/**\n * Read-only view of a sortable region's state.\n *\n * Components that render column headers (e.g., `<tw-table>`) consume this handle to\n * project `aria-sort` onto the active column without taking a hard dependency on the\n * sort implementation. The canonical provider is `SortDirective` (`[twSort]`).\n */\nexport interface TwSortHandle {\n /** Signal of the id of the currently active sort header, or `null` when no sort is active. */\n readonly active: Signal<string | null>;\n /** Signal of the active sort direction (`'asc'` / `'desc'`), or `null` when cleared. */\n readonly direction: Signal<'asc' | 'desc' | null>;\n}\n\n/**\n * DI token through which sort containers expose their state to consumers. Provided by\n * `SortDirective` (`[twSort]`). Inject with `{ optional: true }` — components that need\n * aria-sort plumbing should degrade gracefully when no sort directive is present.\n */\nexport const TW_SORT_HANDLE = new InjectionToken<TwSortHandle>('TwSortHandle');\n","import type { ConnectedPosition } from '@angular/cdk/overlay';\n\n/**\n * Connected-overlay position list for \"select-like\" overlays — overlays whose\n * panel attaches directly under (or above) a trigger element and falls back to\n * the opposite vertical side when there is not enough room. Returns four\n * fallback positions: below-start, below-end, above-start, above-end.\n *\n * Used by `SelectComponent`, `ComboboxComponent`, `DatePickerComponent`, and\n * `DateRangePickerComponent` — any overlay-bearing form control that anchors\n * a listbox / menu / calendar panel to its trigger. The shape is identical for\n * all four; the historical \"select-like\" name refers to the original consumer.\n *\n * @param offset Vertical offset in pixels applied between the trigger edge and\n * the panel edge. Below-positions use `+offset`; above-positions use\n * `-offset` so the panel pulls away from the trigger consistently.\n */\nexport function buildSelectLikePositions(offset = 0): ConnectedPosition[] {\n return [\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: offset },\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: offset },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -offset },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -offset },\n ];\n}\n","import type { Overlay, ScrollStrategy } from '@angular/cdk/overlay';\n\n/** Named scroll-strategy variants supported by select-like overlays. */\nexport type SelectScrollStrategyName = 'reposition' | 'close' | 'block';\n\n/**\n * Maps a named scroll-strategy variant to the corresponding CDK\n * `ScrollStrategy` instance. `'reposition'` is the default for select-like\n * overlays; `'close'` dismisses the panel on scroll; `'block'` locks page\n * scrolling while the panel is open.\n *\n * Used by `SelectComponent`, `ComboboxComponent`, `DatePickerComponent`, and\n * `DateRangePickerComponent` — any overlay-bearing form control that exposes\n * the same three-option scroll-strategy input.\n */\nexport function resolveSelectScrollStrategy(\n name: SelectScrollStrategyName,\n overlay: Overlay,\n): ScrollStrategy {\n switch (name) {\n case 'close':\n return overlay.scrollStrategies.close();\n case 'block':\n return overlay.scrollStrategies.block();\n default:\n return overlay.scrollStrategies.reposition();\n }\n}\n","import type { OverlayRef } from '@angular/cdk/overlay';\nimport { filter } from 'rxjs/operators';\n\n/**\n * Subscribes to overlay-level `Escape` keydown events and invokes `onEscape`\n * for each one. Returns an unsubscribe function so callers can scope teardown\n * to the open lifecycle of the overlay (typically tied into a `Subscription`\n * aggregate or a `takeUntilDestroyed` flow).\n *\n * Listens via `OverlayRef.keydownEvents()` so the handler fires for any\n * keystroke originating inside the overlay, regardless of which element holds\n * DOM focus — useful for select-style overlays whose search/listbox children\n * may receive focus apart from the trigger.\n *\n * Callers remain responsible for calling `event.preventDefault()` /\n * `stopPropagation()` inside `onEscape` if they want to short-circuit further\n * key handling.\n */\nexport function consumeOverlayEscape(\n overlayRef: OverlayRef,\n onEscape: (event: KeyboardEvent) => void,\n): () => void {\n const subscription = overlayRef\n .keydownEvents()\n .pipe(filter((event) => event.key === 'Escape'))\n .subscribe((event) => onEscape(event));\n return () => subscription.unsubscribe();\n}\n","import {\n type ComponentRef,\n DestroyRef,\n ElementRef,\n inject,\n Injectable,\n Injector,\n signal,\n type Signal,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n _IdGenerator,\n FocusTrapFactory,\n} from '@angular/cdk/a11y';\nimport {\n type ConnectedPosition,\n Overlay,\n type OverlayRef,\n type ScrollStrategy,\n} from '@angular/cdk/overlay';\nimport { ComponentPortal, type ComponentType } from '@angular/cdk/portal';\nimport { Subject, type Observable } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\n\n/**\n * Enter-animation duration for date-picker / date-range-picker overlays.\n * Matches `theme/_base.css` `.scale-in 140ms` — the keyframe the picker\n * overlays apply via `animate.enter=\"scale-in\"`. The coordinator delays\n * `opened$` emission by this duration so consumers can hook the moment the\n * panel has fully appeared instead of the moment `open()` was called.\n */\nexport const PICKER_ENTER_DURATION = 140;\n\n/**\n * Leave-animation duration for date-picker / date-range-picker overlays.\n * Matches `theme/_base.css` `.scale-out 120ms` — the keyframe the picker\n * overlays apply via `animate.leave=\"scale-out\"`. The coordinator delays\n * overlay detach by this duration so the leave animation can play through.\n */\nexport const PICKER_LEAVE_DURATION = 120;\n\n/** Configuration passed to {@link PickerOverlayCoordinator.open}. */\nexport interface PickerOpenConfig<TOverlay> {\n /** Element used as the connected-overlay origin (typically the picker trigger). */\n readonly origin: ElementRef<HTMLElement>;\n /** Component type to render inside the overlay (e.g. `DatePickerOverlayComponent`). */\n readonly portalComponent: ComponentType<TOverlay>;\n /** View-container that hosts the embedded view; usually the picker's `ViewContainerRef`. */\n readonly viewContainerRef: ViewContainerRef;\n /** Optional injector forwarded to the portal so DI tokens resolve from the picker's tree. */\n readonly injector?: Injector;\n /** Connected-position list — typically the result of `buildSelectLikePositions(offset)`. */\n readonly positions: ConnectedPosition[];\n /** CDK scroll-strategy instance for the overlay. */\n readonly scrollStrategy: ScrollStrategy;\n /** CSS class applied to the CDK overlay-pane element (NOT the panel root). */\n readonly panelClass: string;\n /** Viewport margin forwarded to the CDK position-strategy. Defaults to `8`. */\n readonly viewportMargin?: number;\n}\n\n/** Synchronous return shape of {@link PickerOverlayCoordinator.open}. */\nexport interface PickerOpenResult<TOverlay> {\n /** The CDK `OverlayRef` driving the overlay — exposed for advanced consumers. */\n readonly overlayRef: OverlayRef;\n /** The Angular `ComponentRef` for the attached portal — exposed so consumers may run `detectChanges()` to flush an initial-config push synchronously. */\n readonly componentRef: ComponentRef<TOverlay>;\n /** The instance of the attached portal component. Equivalent to `componentRef.instance`. */\n readonly instance: TOverlay;\n /** Auto-generated id consumers may wire to `aria-controls` / dialog `id`. */\n readonly panelId: string;\n}\n\n/**\n * Coordinator that owns the CDK `OverlayRef`, focus trap, panel-id, and\n * animation timing for an overlay-bearing form control. Consumed by\n * `DatePickerComponent` and `DateRangePickerComponent`; both pickers register\n * the coordinator at the component level (`providers: [PickerOverlayCoordinator]`)\n * so each picker instance owns its own coordinator state.\n *\n * Per the library \"no `providedIn: 'root'` for services\" rule (see\n * `.claude/CLAUDE.md` → \"What NOT To Do\"): the coordinator holds per-overlay\n * `OverlayRef` / `FocusTrap` state and MUST be component-scoped.\n *\n * Scope of responsibility:\n * - Create / dispose the CDK `OverlayRef`.\n * - Attach a `ComponentPortal` and return the instance.\n * - Set up / tear down a `FocusTrap` around the overlay element.\n * - Emit `opened$` after the enter animation completes (closes the\n * synchronous-emit bug previously present in both pickers).\n * - Expose `backdropClick$` / `overlayKeydown$` / `escape$` streams scoped\n * to the current open lifecycle.\n * - Run a leave-animation timer with an `isAttached` guard so close races\n * never touch a detached `OverlayRef` (mirrors the S14 command-palette\n * pattern).\n *\n * Out of scope (stays in the consuming picker):\n * - \"Restore previous value on close\" — semantics differ per picker.\n * - Per-picker portal callbacks (calendar selection, action-bar buttons).\n * - View-mode change-detection nudges (the range-picker calls\n * `changeDetectorRef.detectChanges()` after pushing its initial overlay\n * config; the date-picker does not).\n */\n@Injectable()\nexport class PickerOverlayCoordinator {\n private readonly overlay = inject(Overlay);\n private readonly focusTrapFactory = inject(FocusTrapFactory);\n private readonly destroyRef = inject(DestroyRef);\n private readonly idGenerator = inject(_IdGenerator);\n\n private overlayRef: OverlayRef | null = null;\n private focusTrap: ReturnType<FocusTrapFactory['create']> | null = null;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n private openedTimer: ReturnType<typeof setTimeout> | null = null;\n private currentPanelId: string | null = null;\n private currentClose$: Subject<void> | null = null;\n private openedSubject: Subject<void> | null = null;\n\n private readonly attachedSignal = signal(false);\n private readonly openedSignal = signal(false);\n\n /** Whether the overlay is currently attached (between `open()` and detach). */\n readonly attached: Signal<boolean> = this.attachedSignal.asReadonly();\n\n /** Whether the enter animation has completed (`opened$` has fired). */\n readonly opened: Signal<boolean> = this.openedSignal.asReadonly();\n\n constructor() {\n this.destroyRef.onDestroy(() => this.disposeImmediate());\n }\n\n /**\n * Creates and attaches the overlay. Returns the live overlay metadata\n * synchronously; callers should subscribe to {@link opened$} to observe the\n * moment the enter animation completes. Returns `null` if an overlay is\n * already attached.\n */\n open<TOverlay>(config: PickerOpenConfig<TOverlay>): PickerOpenResult<TOverlay> | null {\n if (this.overlayRef) return null;\n\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(config.origin)\n .withPositions(config.positions)\n .withFlexibleDimensions(false)\n .withPush(false)\n .withViewportMargin(config.viewportMargin ?? 8);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: config.scrollStrategy,\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-transparent-backdrop',\n panelClass: config.panelClass,\n });\n\n const portal = new ComponentPortal<TOverlay>(\n config.portalComponent,\n config.viewContainerRef,\n config.injector,\n );\n const ref = this.overlayRef.attach(portal);\n const instance = ref.instance;\n\n this.currentPanelId = this.idGenerator.getId('tw-picker-overlay-');\n this.currentClose$ = new Subject<void>();\n this.openedSubject = new Subject<void>();\n this.attachedSignal.set(true);\n this.openedSignal.set(false);\n\n this.setupFocusTrap();\n this.scheduleOpenedEmission();\n\n return {\n overlayRef: this.overlayRef,\n componentRef: ref,\n instance,\n panelId: this.currentPanelId,\n };\n }\n\n /**\n * Starts the close sequence — destroys the focus trap immediately so focus\n * can return to the trigger, then detaches the overlay after the leave\n * animation runs ({@link PICKER_LEAVE_DURATION}). Invokes `onAfterClose`\n * once the overlay is fully detached. No-op if no overlay is open or a\n * close is already in flight.\n *\n * Mirrors the S14 command-palette `isAttached`-guarded close pattern:\n * after the timer fires we re-check `attachedSignal` before touching the\n * overlay so a race (programmatic dispose, double-close) cannot touch a\n * destroyed instance.\n */\n close(onAfterClose: () => void = () => {}): void {\n if (!this.overlayRef || this.closeTimer !== null) return;\n this.destroyFocusTrap();\n this.clearOpenedTimer();\n\n this.closeTimer = setTimeout(() => {\n this.closeTimer = null;\n if (!this.attachedSignal()) {\n // Lost race with disposeImmediate / destroyRef.onDestroy.\n return;\n }\n if (this.overlayRef?.hasAttached()) {\n this.overlayRef.detach();\n }\n // Dispose the OverlayRef so the next open() builds a fresh one with the\n // current inputs (offset, scrollStrategy, panelClass). Without this the\n // `if (this.overlayRef) return null;` guard at the top of open() would\n // permanently block re-opens after the first close.\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.currentClose$?.next();\n this.currentClose$?.complete();\n this.currentClose$ = null;\n this.openedSubject?.complete();\n this.openedSubject = null;\n this.attachedSignal.set(false);\n this.openedSignal.set(false);\n this.currentPanelId = null;\n onAfterClose();\n }, PICKER_LEAVE_DURATION);\n }\n\n /**\n * Stream of overlay-level backdrop clicks for the current open lifecycle.\n * Completes when the overlay closes.\n */\n backdropClick$(): Observable<MouseEvent> {\n this.assertOpen('backdropClick$');\n return this.overlayRef!.backdropClick().pipe(takeUntil(this.currentClose$!));\n }\n\n /**\n * Stream of overlay-level keydown events for the current open lifecycle.\n * Completes when the overlay closes.\n */\n overlayKeydown$(): Observable<KeyboardEvent> {\n this.assertOpen('overlayKeydown$');\n return this.overlayRef!.keydownEvents().pipe(takeUntil(this.currentClose$!));\n }\n\n /**\n * Stream filtered to `Escape` keydowns inside the overlay for the current\n * open lifecycle. Equivalent to `overlayKeydown$().pipe(filter(e => e.key === 'Escape'))`\n * but spelled out so consumers don't import RxJS operators just for the\n * common case.\n */\n escape$(): Observable<KeyboardEvent> {\n return this.overlayKeydown$().pipe(filter((e) => e.key === 'Escape'));\n }\n\n /**\n * Emits exactly once after the enter animation completes\n * ({@link PICKER_ENTER_DURATION}ms after `open()`). Used by consumers to\n * fire their `opened` output at the moment the overlay panel is actually\n * visible — closes the synchronous-emit bug the pickers carried before\n * this coordinator existed.\n *\n * Completes when the overlay closes.\n */\n opened$(): Observable<void> {\n this.assertOpen('opened$');\n return this.openedSubject!.asObservable().pipe(takeUntil(this.currentClose$!));\n }\n\n /** Exposes the live `OverlayRef` for advanced consumers (e.g. width sync). */\n ref(): OverlayRef | null {\n return this.overlayRef;\n }\n\n /**\n * Exposes the current panel id (auto-generated via CDK `_IdGenerator`,\n * stable for the open lifecycle, reset to `null` on close). Neither\n * consuming picker uses this today — both keep their own\n * `${hostId}-dialog` id for `aria-controls` wiring — but the helper is\n * exposed for future consumers (e.g. a picker wrapper that wants its\n * panel id auto-managed).\n */\n panelId(): string | null {\n return this.currentPanelId;\n }\n\n /**\n * Immediately disposes the overlay and tears down the focus trap without\n * running the leave animation. Called from {@link DestroyRef.onDestroy};\n * consumers should NOT call this — use {@link close} for the user-visible\n * close path.\n */\n private disposeImmediate(): void {\n this.clearCloseTimer();\n this.clearOpenedTimer();\n this.destroyFocusTrap();\n if (this.currentClose$) {\n this.currentClose$.next();\n this.currentClose$.complete();\n this.currentClose$ = null;\n }\n this.openedSubject?.complete();\n this.openedSubject = null;\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.attachedSignal.set(false);\n this.openedSignal.set(false);\n this.currentPanelId = null;\n }\n\n private setupFocusTrap(): void {\n if (!this.overlayRef) return;\n this.focusTrap = this.focusTrapFactory.create(this.overlayRef.overlayElement);\n }\n\n private destroyFocusTrap(): void {\n this.focusTrap?.destroy();\n this.focusTrap = null;\n }\n\n private scheduleOpenedEmission(): void {\n this.clearOpenedTimer();\n if (!this.overlayRef || !this.overlayRef.hasAttached()) return;\n this.openedTimer = setTimeout(() => {\n this.openedTimer = null;\n if (!this.attachedSignal()) return;\n this.openedSignal.set(true);\n this.openedSubject?.next();\n }, PICKER_ENTER_DURATION);\n }\n\n private clearCloseTimer(): void {\n if (this.closeTimer !== null) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n private clearOpenedTimer(): void {\n if (this.openedTimer !== null) {\n clearTimeout(this.openedTimer);\n this.openedTimer = null;\n }\n }\n\n private assertOpen(method: string): void {\n if (!this.overlayRef || !this.currentClose$ || !this.openedSubject) {\n throw new Error(\n `PickerOverlayCoordinator.${method}() called before open() — no overlay attached.`,\n );\n }\n }\n}\n","/**\n * Pure helpers shared by `DialogContainer` and `SheetContainer` (both live\n * under `projects/ngx-tw/{dialog,sheet}/`) — and consumable by any future\n * `CdkDialogContainer` subclass that needs the same plumbing.\n *\n * No DOM, no Angular DI. The DI-bound state lives in\n * {@link OverlayContainerCoordinator}; this file is the data-only layer.\n */\n\n/**\n * Fallback padding (ms) added on top of an enter/exit animation duration when\n * scheduling the `transitionend` fallback timer. The browser SHOULD fire\n * `transitionend` at the configured duration, but transitions can be\n * swallowed (focus changes during the animation, interrupted transitions,\n * etc.) — the padding gives the browser a small grace period before our\n * fallback runs.\n *\n * Both dialog and sheet containers used the same constant — extracted here so\n * a future tweak applies to both at once.\n */\nexport const OVERLAY_ANIMATION_FALLBACK_PADDING = 50;\n\n/**\n * Coerces a user-supplied animation duration to a safe positive integer, or\n * falls back to a default if the input is `null`, `undefined`, negative, or\n * non-finite (`NaN`, `Infinity`). Dialog and sheet containers both used this\n * same standalone function; centralised here.\n */\nexport function coerceOverlayDuration(value: number | undefined, fallback: number): number {\n if (value == null || value < 0 || !Number.isFinite(value)) return fallback;\n return value;\n}\n\n/**\n * Merges a consumer-supplied `panelClass` (single class, list, or\n * `undefined`) with the container's internal class string. Returns a single\n * space-separated class string suitable for `[class]` host binding.\n *\n * `consumer` always wins ordering (appended after `internal`) so consumer\n * overrides resolve correctly through `tailwind-merge` upstream.\n */\nexport function mergeOverlayPanelClass(\n internal: string,\n consumer: string | readonly string[] | undefined,\n): string {\n if (!consumer) return internal;\n return Array.isArray(consumer) ? [internal, ...consumer].join(' ') : `${internal} ${consumer}`;\n}\n\n/**\n * Append-only id list with idempotent insertion, used for the\n * `aria-describedby` queue both `DialogContainer` and `SheetContainer`\n * maintain (the matching `aria-labelledby` queue lives in CDK's\n * `CdkDialogContainer`).\n *\n * Pure data structure — no DOM, no Angular signals. Consumers wrap an\n * instance in their own change-detection mechanism (the\n * {@link OverlayContainerCoordinator} keeps the live snapshot in a signal so\n * the container's `[attr.aria-describedby]` binding refreshes via OnPush\n * without a manual `markForCheck()`).\n *\n * First-registered-wins semantics for `first()` mirror CDK's\n * `_ariaLabelledByQueue[0]` host binding — describing the dialog by the\n * earliest registered description prevents a late-mounted nested directive\n * from silently re-aiming the description target.\n */\nexport class AriaIdQueue {\n private readonly ids: string[] = [];\n\n /** Inserts an id at the tail. No-op if the id is already present. */\n add(id: string): void {\n if (this.ids.includes(id)) return;\n this.ids.push(id);\n }\n\n /** Removes the given id. No-op if the id is not present. */\n remove(id: string): void {\n const index = this.ids.indexOf(id);\n if (index >= 0) this.ids.splice(index, 1);\n }\n\n /** First registered id (or `null` if empty). Matches CDK's `_ariaLabelledByQueue[0]` semantics. */\n first(): string | null {\n return this.ids[0] ?? null;\n }\n\n /** Returns a fresh snapshot of all registered ids in insertion order. */\n snapshot(): readonly string[] {\n return [...this.ids];\n }\n}\n","import {\n computed,\n DestroyRef,\n EventEmitter,\n inject,\n Injectable,\n signal,\n type Signal,\n} from '@angular/core';\nimport { AriaIdQueue, OVERLAY_ANIMATION_FALLBACK_PADDING } from './overlay-container-helpers';\n\n/** Lifecycle states an overlay container passes through. Shared by dialog and sheet. */\nexport type OverlayContainerState = 'opening' | 'open' | 'closing' | 'closed';\n\n/** Event emitted on every overlay-container animation-state transition. */\nexport interface OverlayContainerAnimationEvent {\n /** State that the container just transitioned into. */\n state: OverlayContainerState;\n /** Duration, in ms, of the transition that triggered the event. */\n totalTime: number;\n}\n\n/**\n * Component-scoped coordinator that owns the enter/exit animation state\n * machine, ARIA-describedby id queue, and panel-class merge for an overlay\n * container that subclasses `@angular/cdk/dialog`'s `CdkDialogContainer`.\n *\n * Consumed by `DialogContainer` and `SheetContainer`; both register the\n * coordinator at the component level (`providers: [OverlayContainerCoordinator]`)\n * so each container instance owns its own animation state and queue.\n *\n * Per the library \"no `providedIn: 'root'` for services\" rule (see\n * `.claude/CLAUDE.md` → \"What NOT To Do\"): the coordinator holds per-overlay\n * state (the current animation timer, the describedby queue, the lifecycle\n * signal) and MUST be component-scoped.\n *\n * Scope of responsibility:\n * - Animation state signal (`state`) and `transitionDuration` computed.\n * - Enter/exit animation timing (`startEnterAnimation`, `startExitAnimation`)\n * with a `transitionend`-fallback timer.\n * - `animationStateChanged` EventEmitter forwarded to the consuming `Ref`.\n * - ARIA-describedby id queue (the matching labelledby queue is already\n * owned by CDK's `CdkDialogContainer._ariaLabelledByQueue`).\n *\n * Out of scope (stays on the container subclass):\n * - The `CdkDialogContainer` contract — focus trap, escape key, backdrop\n * click, overlay attach/detach. The container subclass keeps inheriting\n * `CdkDialogContainer` directly; this coordinator layers on top.\n * - Tailwind class resolution (`tv()` variant slots) — that's per-container.\n * - Host bindings on the container element — that's per-container.\n */\n@Injectable()\nexport class OverlayContainerCoordinator {\n private readonly destroyRef = inject(DestroyRef);\n\n private readonly stateSignal = signal<OverlayContainerState>('opening');\n private readonly ariaDescribedByQueue = signal<readonly string[]>([]);\n private readonly queue = new AriaIdQueue();\n\n private animationTimer: ReturnType<typeof setTimeout> | null = null;\n private enterDuration = 0;\n private exitDuration = 0;\n\n /** Lifecycle state of the container's enter/exit animation. */\n readonly state: Signal<OverlayContainerState> = this.stateSignal.asReadonly();\n\n /** Live snapshot of the describedby id queue. */\n readonly describedByIds: Signal<readonly string[]> = this.ariaDescribedByQueue.asReadonly();\n\n /**\n * Active transition duration for the current state — the enter duration for\n * `opening` / `open`, the exit duration for `closing`, and 0 once `closed`.\n * Drives the container's `[style.transition-duration.ms]` host binding so a\n * one-line `data-[state]` transition rule can run with per-call timing.\n */\n readonly transitionDuration = computed(() => {\n const current = this.stateSignal();\n if (current === 'opening' || current === 'open') return this.enterDuration;\n if (current === 'closing') return this.exitDuration;\n return 0;\n });\n\n /**\n * Emits whenever the animation state transitions. The container's `Ref`\n * (`TwDialogRef` / `SheetRef`) subscribes to drive its own lifecycle\n * (`afterOpened`, `afterClosed`, exit-animation completion).\n */\n readonly animationStateChanged = new EventEmitter<OverlayContainerAnimationEvent>();\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n this.clearAnimationTimer();\n this.animationStateChanged.complete();\n });\n }\n\n /**\n * Records the resolved enter/exit durations for the open lifecycle.\n * Called once from the container constructor with values coerced via\n * `coerceOverlayDuration`. Stored on the coordinator so\n * `transitionDuration()` and the timer-driven state transitions read from\n * a single source.\n */\n setDurations(enter: number, exit: number): void {\n this.enterDuration = enter;\n this.exitDuration = exit;\n }\n\n /**\n * Drives the enter animation: emits `opening` immediately, then defers the\n * state flip to `open` by one frame so the browser applies the initial\n * (hidden / off-screen) styles before transitioning. If `enter` is `0`\n * everything resolves synchronously (no animation).\n */\n startEnterAnimation(): void {\n this.animationStateChanged.emit({ state: 'opening', totalTime: this.enterDuration });\n\n if (this.enterDuration === 0) {\n this.stateSignal.set('open');\n this.animationStateChanged.emit({ state: 'open', totalTime: 0 });\n return;\n }\n\n requestAnimationFrame(() => {\n this.stateSignal.set('open');\n this.runAnimationTimer(this.enterDuration, () => {\n this.animationStateChanged.emit({\n state: 'open',\n totalTime: this.enterDuration,\n });\n });\n });\n }\n\n /**\n * Drives the exit animation: emits `closing` synchronously and schedules\n * the `closed` emission for after the exit duration (+ a small fallback\n * padding) elapses. The consuming `Ref` listens for the `closed` emission\n * to detach the CDK overlay.\n */\n startExitAnimation(): void {\n this.stateSignal.set('closing');\n this.animationStateChanged.emit({ state: 'closing', totalTime: this.exitDuration });\n\n this.runAnimationTimer(this.exitDuration, () => {\n this.stateSignal.set('closed');\n this.animationStateChanged.emit({ state: 'closed', totalTime: this.exitDuration });\n });\n }\n\n /** Registers a description id with the `aria-describedby` queue. */\n addAriaDescribedBy(id: string): void {\n this.queue.add(id);\n this.ariaDescribedByQueue.set(this.queue.snapshot());\n }\n\n /** Removes a previously registered description id. */\n removeAriaDescribedBy(id: string): void {\n this.queue.remove(id);\n this.ariaDescribedByQueue.set(this.queue.snapshot());\n }\n\n /** First-registered-wins resolution for the `aria-describedby` attribute. */\n firstDescribedBy(): string | null {\n return this.queue.first();\n }\n\n private runAnimationTimer(duration: number, callback: () => void): void {\n this.clearAnimationTimer();\n if (duration === 0) {\n callback();\n return;\n }\n this.animationTimer = setTimeout(callback, duration + OVERLAY_ANIMATION_FALLBACK_PADDING);\n }\n\n private clearAnimationTimer(): void {\n if (this.animationTimer !== null) {\n clearTimeout(this.animationTimer);\n this.animationTimer = null;\n }\n }\n}\n","import { tv } from 'tailwind-variants';\nimport type { TwColor } from './types';\n\n/**\n * Visual style shared by `tw-tabs` (`TabsVariant`) and `nav[twTabNav]` (`TabNavVariant`).\n * Kept as a string-literal union so downstream consumers can narrow when needed.\n */\nexport type TabTriggerVariant = 'underline' | 'enclosed' | 'pill';\n\n/**\n * Trigger-only tailwind-variants config shared by tabs and tab-nav.\n *\n * Both components own additional component-local slots (tablist/list/panel/nav,\n * etc.) — only the trigger shape is canonical enough to share here. The\n * resulting class string is merged with each component's local trigger\n * additions (e.g. tab-nav prepends `no-underline` because anchor elements need\n * to override the default underline; tabs adds nothing extra at the base).\n *\n * Active and inactive trigger state is applied separately via\n * {@link getActiveTriggerClasses} / {@link getInactiveTriggerClasses} so the\n * `Record<TwColor, string>` lookups stay statically scannable by the Tailwind\n * v4 content scanner.\n */\nexport const tabTriggerVariants = tv(\n {\n slots: {\n trigger:\n 'inline-flex items-center gap-1.5 font-medium whitespace-nowrap cursor-pointer transition-colors duration-normal motion-reduce:transition-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',\n },\n variants: {\n variant: {\n underline: {\n trigger: 'border-b-2 border-transparent -mb-px text-fg-muted hover:text-fg',\n },\n enclosed: {\n trigger:\n 'border border-transparent bg-surface-muted text-fg-muted hover:text-fg -mb-px',\n },\n pill: {\n trigger: 'rounded-md text-fg-muted hover:text-fg',\n },\n },\n size: {\n xs: { trigger: 'px-2 py-1 text-xs' },\n sm: { trigger: 'px-3 py-1.5 text-sm' },\n md: { trigger: 'px-4 py-2 text-sm' },\n lg: { trigger: 'px-5 py-2.5 text-base' },\n xl: { trigger: 'px-6 py-3 text-base' },\n },\n fitted: {\n true: { trigger: 'flex-1 justify-center' },\n false: {},\n },\n color: {\n primary: {},\n secondary: {},\n accent: {},\n neutral: {},\n info: {},\n success: {},\n warning: {},\n error: {},\n },\n },\n defaultVariants: {\n variant: 'underline',\n color: 'primary',\n size: 'md',\n fitted: false,\n },\n },\n { twMerge: true },\n);\n\n// ── Active-state class lookups ──\n// Slot tokens own light/dark contrast — no `dark:`, no shade picks. Classes\n// stay statically written so the Tailwind v4 scanner sees them. The neutral\n// rows use surface/fg/border tokens which already auto-adapt to dark mode.\n\n/** @internal Active trigger classes for horizontal underline variants, keyed by color. */\nexport const UNDERLINE_ACTIVE_HORIZONTAL: Record<TwColor, string> = {\n primary: 'border-b-2 border-primary-border-strong text-primary-fg',\n secondary: 'border-b-2 border-secondary-border-strong text-secondary-fg',\n accent: 'border-b-2 border-accent-border-strong text-accent-fg',\n neutral: 'border-b-2 border-border-strong text-fg',\n info: 'border-b-2 border-info-border-strong text-info-fg',\n success: 'border-b-2 border-success-border-strong text-success-fg',\n warning: 'border-b-2 border-warning-border-strong text-warning-fg',\n error: 'border-b-2 border-error-border-strong text-error-fg',\n};\n\n/** @internal Active trigger classes for vertical underline variants, keyed by color. */\nexport const UNDERLINE_ACTIVE_VERTICAL: Record<TwColor, string> = {\n primary: 'border-r-2 border-primary-border-strong text-primary-fg',\n secondary: 'border-r-2 border-secondary-border-strong text-secondary-fg',\n accent: 'border-r-2 border-accent-border-strong text-accent-fg',\n neutral: 'border-r-2 border-border-strong text-fg',\n info: 'border-r-2 border-info-border-strong text-info-fg',\n success: 'border-r-2 border-success-border-strong text-success-fg',\n warning: 'border-r-2 border-warning-border-strong text-warning-fg',\n error: 'border-r-2 border-error-border-strong text-error-fg',\n};\n\n/** @internal Active trigger classes for horizontal enclosed variants, keyed by color. */\nexport const ENCLOSED_ACTIVE_HORIZONTAL: Record<TwColor, string> = {\n primary: 'bg-surface border border-border border-b-transparent text-primary-fg',\n secondary: 'bg-surface border border-border border-b-transparent text-secondary-fg',\n accent: 'bg-surface border border-border border-b-transparent text-accent-fg',\n neutral: 'bg-surface border border-border border-b-transparent text-fg',\n info: 'bg-surface border border-border border-b-transparent text-info-fg',\n success: 'bg-surface border border-border border-b-transparent text-success-fg',\n warning: 'bg-surface border border-border border-b-transparent text-warning-fg',\n error: 'bg-surface border border-border border-b-transparent text-error-fg',\n};\n\n/** @internal Active trigger classes for vertical enclosed variants, keyed by color. */\nexport const ENCLOSED_ACTIVE_VERTICAL: Record<TwColor, string> = {\n primary: 'bg-surface border border-border border-r-transparent text-primary-fg',\n secondary: 'bg-surface border border-border border-r-transparent text-secondary-fg',\n accent: 'bg-surface border border-border border-r-transparent text-accent-fg',\n neutral: 'bg-surface border border-border border-r-transparent text-fg',\n info: 'bg-surface border border-border border-r-transparent text-info-fg',\n success: 'bg-surface border border-border border-r-transparent text-success-fg',\n warning: 'bg-surface border border-border border-r-transparent text-warning-fg',\n error: 'bg-surface border border-border border-r-transparent text-error-fg',\n};\n\n/** @internal Active trigger classes for pill variants, keyed by color. */\nexport const PILL_ACTIVE: Record<TwColor, string> = {\n primary: 'bg-surface shadow-sm text-primary-fg',\n secondary: 'bg-surface shadow-sm text-secondary-fg',\n accent: 'bg-surface shadow-sm text-accent-fg',\n neutral: 'bg-surface shadow-sm text-fg',\n info: 'bg-surface shadow-sm text-info-fg',\n success: 'bg-surface shadow-sm text-success-fg',\n warning: 'bg-surface shadow-sm text-warning-fg',\n error: 'bg-surface shadow-sm text-error-fg',\n};\n\n/** @internal Inactive trigger classes keyed by variant. */\nexport const INACTIVE_TRIGGER_CLASSES: Record<TabTriggerVariant, string> = {\n underline: 'border-transparent',\n enclosed: 'border-transparent bg-surface-muted',\n pill: '',\n};\n\n/**\n * Returns the active-state trigger class string for the given variant, color,\n * and orientation. Tab-nav callers pass `'horizontal'` since it is horizontal-only.\n */\nexport function getActiveTriggerClasses(\n variant: TabTriggerVariant,\n color: TwColor,\n orientation: 'horizontal' | 'vertical' = 'horizontal',\n): string {\n switch (variant) {\n case 'underline':\n return orientation === 'vertical'\n ? UNDERLINE_ACTIVE_VERTICAL[color]\n : UNDERLINE_ACTIVE_HORIZONTAL[color];\n case 'enclosed':\n return orientation === 'vertical'\n ? ENCLOSED_ACTIVE_VERTICAL[color]\n : ENCLOSED_ACTIVE_HORIZONTAL[color];\n case 'pill':\n return PILL_ACTIVE[color];\n }\n}\n\n/** Returns the inactive-state trigger class string for the given variant. */\nexport function getInactiveTriggerClasses(variant: TabTriggerVariant): string {\n return INACTIVE_TRIGGER_CLASSES[variant];\n}\n","/**\n * Pure helpers shared by `tw-time-picker` and `tw-calendar`'s `withTime`\n * controls. No Angular / CDK imports — safe to drop into either package\n * without pulling a circular dependency.\n */\n\n/** Supported time-picker formats. */\nexport type TimePickerFormat = '12h' | '24h';\n\n/** Meridiem used by the 12h format. */\nexport type TimePickerMeridiem = 'AM' | 'PM';\n\n/** Zero-pads a non-negative integer to exactly two digits. */\nexport function padTwo(value: number): string {\n return value < 10 ? `0${value}` : `${value}`;\n}\n\n/** Converts a 24h hour (0–23) to its 12h display value (1–12). */\nexport function to12h(hour24: number): number {\n const modded = hour24 % 12;\n return modded === 0 ? 12 : modded;\n}\n\n/** Builds a canonical 0–23 hour from a 12h display hour and meridiem. */\nexport function from12h(hour12: number, meridiem: TimePickerMeridiem): number {\n if (hour12 === 12) return meridiem === 'AM' ? 0 : 12;\n return meridiem === 'AM' ? hour12 : hour12 + 12;\n}\n\n/** Maximum allowed value for a field given the picker format. */\nexport function fieldMax(\n field: 'hour' | 'minute' | 'second',\n format: TimePickerFormat,\n): number {\n if (field === 'hour') return format === '12h' ? 12 : 23;\n return 59;\n}\n\n/** Minimum allowed value for a field given the picker format. */\nexport function fieldMin(\n field: 'hour' | 'minute' | 'second',\n format: TimePickerFormat,\n): number {\n return field === 'hour' && format === '12h' ? 1 : 0;\n}\n\n/**\n * Buffers a typed digit onto the current field text, matching the standard\n * two-digit time-field behaviour:\n * - empty + 'x' → 'x'\n * - 'x' + 'y' → 'xy' (if value stays in range)\n * - 'xy' + 'z' → 'z' (overflow → reset)\n * - any combo that would exceed `max` resets to the new digit alone.\n */\nexport function appendDigit(current: string, digit: string, max: number): string {\n if (!/^\\d$/.test(digit)) return current;\n if (current.length >= 2) return digit;\n const candidate = current + digit;\n const numeric = Number(candidate);\n if (numeric > max) return digit;\n return candidate;\n}\n\n/**\n * Reports whether `current` + `digit` unambiguously fills the field — either\n * because the buffer reaches two chars or because the first digit alone\n * already excludes a valid second digit (e.g., `'6'` for minutes, `'3'` for 24h\n * hour). Used to auto-advance focus to the next field.\n */\nexport function isTerminalDigit(current: string, digit: string, max: number): boolean {\n if (current.length === 1) return true;\n if (!/^\\d$/.test(digit)) return false;\n const maxFirst = Math.floor(max / 10);\n return Number(digit) > maxFirst;\n}\n\n/**\n * Steps a numeric value by `step`, wrapping inside `[min, max]`. Works for\n * arbitrary step sizes; a step of 0 behaves as 1 to protect against mis-configs.\n */\nexport function stepWithWrap(\n value: number,\n step: number,\n direction: 1 | -1,\n min: number,\n max: number,\n): number {\n const safeStep = Math.max(1, Math.abs(step));\n const range = max - min + 1;\n const delta = safeStep * direction;\n return ((((value - min + delta) % range) + range) % range) + min;\n}\n\n/** Clamps a number into `[min, max]` without wrapping. */\nexport function clamp(value: number, min: number, max: number): number {\n if (value < min) return min;\n if (value > max) return max;\n return value;\n}\n\n/** Parses a 1- or 2-digit text field; returns `null` if empty or non-numeric. */\nexport function parseField(text: string): number | null {\n if (!text) return null;\n if (!/^\\d{1,2}$/.test(text)) return null;\n return Number(text);\n}\n\n/** Total seconds since midnight for a (h, m, s) tuple — useful for min/max compare. */\nexport function timeOfDaySeconds(hour: number, minute: number, second: number): number {\n return hour * 3600 + minute * 60 + second;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAyBA;;;;AAIG;AACI,MAAM,wBAAwB,GAAsB;IACzD,YAAY,CAAC,OAAO,EAAE,IAAI,EAAA;QACxB,IAAI,CAAC,OAAO,EAAE;AACZ,YAAA,OAAO,KAAK;QACd;QACA,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,OAAO;AACnD,QAAA,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,KAAK,UAAU,IAAI,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC;IAC/D,CAAC;;AAGH;;;;;AAKG;MACU,sBAAsB,GAAG,IAAI,cAAc,CAC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AAA;AACrC,IAAA,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,IAAI;AACtB,IAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC;AAAE,QAAA,OAAO,IAAI;AACxC,IAAA,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB;AAEA;SACgB,gBAAgB,CAAC,IAAY,EAAE,MAAc,EAAE,MAAc,EAAA;IAC3E,OAAO,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,EAAE,GAAG,MAAM;AAC3C;;AC9GA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cdevhub-ngx-tw-core.mjs","sources":["../../../projects/ngx-tw/core/error-state-matcher.ts","../../../projects/ngx-tw/core/sort-handle.ts","../../../projects/ngx-tw/core/overlay/positions.ts","../../../projects/ngx-tw/core/overlay/scroll-strategy.ts","../../../projects/ngx-tw/core/overlay/escape.ts","../../../projects/ngx-tw/core/overlay/picker-overlay-coordinator.ts","../../../projects/ngx-tw/core/overlay/overlay-container-helpers.ts","../../../projects/ngx-tw/core/overlay/overlay-container-coordinator.ts","../../../projects/ngx-tw/core/tab-trigger-variants.ts","../../../projects/ngx-tw/core/time-utils.ts","../../../projects/ngx-tw/core/cdevhub-ngx-tw-core.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport type { AbstractControl } from '@angular/forms';\n\n/**\n * Minimal contract for a parent form's \"submitted\" state. Both `NgForm` and\n * `FormGroupDirective` satisfy this, so the matcher can work with either.\n */\nexport interface TwFormSubmitted {\n readonly submitted: boolean;\n}\n\n/**\n * Strategy that decides when a form control should be rendered in the error\n * state. Controls read the injected matcher (or accept a per-instance\n * override) and combine the result with their own signals. Override at any\n * injector level via {@link TW_ERROR_STATE_MATCHER}.\n */\nexport interface ErrorStateMatcher {\n /** Returns true when the control should display an error. */\n isErrorState(\n control: AbstractControl | null,\n form: TwFormSubmitted | null,\n ): boolean;\n}\n\n/**\n * Default error-state strategy: errored when the control is `invalid` and\n * either has been interacted with (`dirty` or `touched`) or its parent form\n * has been submitted. Matches Material's default behavior.\n */\nexport const defaultErrorStateMatcher: ErrorStateMatcher = {\n isErrorState(control, form) {\n if (!control) {\n return false;\n }\n const interacted = control.dirty || control.touched;\n return !!control.invalid && (interacted || !!form?.submitted);\n },\n};\n\n/**\n * Injection token carrying the {@link ErrorStateMatcher} used by every ngx-tw\n * form control. Defaults to {@link defaultErrorStateMatcher}; provide a\n * different matcher at root to change global error-display policy, or at any\n * descendant injector to scope the change.\n */\nexport const TW_ERROR_STATE_MATCHER = new InjectionToken<ErrorStateMatcher>(\n 'TW_ERROR_STATE_MATCHER',\n {\n providedIn: 'root',\n factory: () => defaultErrorStateMatcher,\n },\n);\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/**\n * Read-only view of a sortable region's state.\n *\n * Components that render column headers (e.g., `<tw-table>`) consume this handle to\n * project `aria-sort` onto the active column without taking a hard dependency on the\n * sort implementation. The canonical provider is `SortDirective` (`[twSort]`).\n */\nexport interface TwSortHandle {\n /** Signal of the id of the currently active sort header, or `null` when no sort is active. */\n readonly active: Signal<string | null>;\n /** Signal of the active sort direction (`'asc'` / `'desc'`), or `null` when cleared. */\n readonly direction: Signal<'asc' | 'desc' | null>;\n}\n\n/**\n * DI token through which sort containers expose their state to consumers. Provided by\n * `SortDirective` (`[twSort]`). Inject with `{ optional: true }` — components that need\n * aria-sort plumbing should degrade gracefully when no sort directive is present.\n */\nexport const TW_SORT_HANDLE = new InjectionToken<TwSortHandle>('TwSortHandle');\n","import type { ConnectedPosition } from '@angular/cdk/overlay';\n\n/**\n * Connected-overlay position list for \"select-like\" overlays — overlays whose\n * panel attaches directly under (or above) a trigger element and falls back to\n * the opposite vertical side when there is not enough room. Returns four\n * fallback positions: below-start, below-end, above-start, above-end.\n *\n * Used by `SelectComponent`, `ComboboxComponent`, `DatePickerComponent`, and\n * `DateRangePickerComponent` — any overlay-bearing form control that anchors\n * a listbox / menu / calendar panel to its trigger. The shape is identical for\n * all four; the historical \"select-like\" name refers to the original consumer.\n *\n * @param offset Vertical offset in pixels applied between the trigger edge and\n * the panel edge. Below-positions use `+offset`; above-positions use\n * `-offset` so the panel pulls away from the trigger consistently.\n */\nexport function buildSelectLikePositions(offset = 0): ConnectedPosition[] {\n return [\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: offset },\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: offset },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -offset },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -offset },\n ];\n}\n","import type { Overlay, ScrollStrategy } from '@angular/cdk/overlay';\n\n/** Named scroll-strategy variants supported by select-like overlays. */\nexport type SelectScrollStrategyName = 'reposition' | 'close' | 'block';\n\n/**\n * Maps a named scroll-strategy variant to the corresponding CDK\n * `ScrollStrategy` instance. `'reposition'` is the default for select-like\n * overlays; `'close'` dismisses the panel on scroll; `'block'` locks page\n * scrolling while the panel is open.\n *\n * Used by `SelectComponent`, `ComboboxComponent`, `DatePickerComponent`, and\n * `DateRangePickerComponent` — any overlay-bearing form control that exposes\n * the same three-option scroll-strategy input.\n */\nexport function resolveSelectScrollStrategy(\n name: SelectScrollStrategyName,\n overlay: Overlay,\n): ScrollStrategy {\n switch (name) {\n case 'close':\n return overlay.scrollStrategies.close();\n case 'block':\n return overlay.scrollStrategies.block();\n default:\n return overlay.scrollStrategies.reposition();\n }\n}\n","import type { OverlayRef } from '@angular/cdk/overlay';\nimport { filter } from 'rxjs/operators';\n\n/**\n * Subscribes to overlay-level `Escape` keydown events and invokes `onEscape`\n * for each one. Returns an unsubscribe function so callers can scope teardown\n * to the open lifecycle of the overlay (typically tied into a `Subscription`\n * aggregate or a `takeUntilDestroyed` flow).\n *\n * Listens via `OverlayRef.keydownEvents()` so the handler fires for any\n * keystroke originating inside the overlay, regardless of which element holds\n * DOM focus — useful for select-style overlays whose search/listbox children\n * may receive focus apart from the trigger.\n *\n * Callers remain responsible for calling `event.preventDefault()` /\n * `stopPropagation()` inside `onEscape` if they want to short-circuit further\n * key handling.\n */\nexport function consumeOverlayEscape(\n overlayRef: OverlayRef,\n onEscape: (event: KeyboardEvent) => void,\n): () => void {\n const subscription = overlayRef\n .keydownEvents()\n .pipe(filter((event) => event.key === 'Escape'))\n .subscribe((event) => onEscape(event));\n return () => subscription.unsubscribe();\n}\n","import {\n type ComponentRef,\n DestroyRef,\n type ElementRef,\n inject,\n Injectable,\n type Injector,\n signal,\n type Signal,\n type ViewContainerRef,\n} from '@angular/core';\nimport {\n _IdGenerator,\n FocusTrapFactory,\n} from '@angular/cdk/a11y';\nimport {\n type ConnectedPosition,\n Overlay,\n type OverlayRef,\n type ScrollStrategy,\n} from '@angular/cdk/overlay';\nimport { ComponentPortal, type ComponentType } from '@angular/cdk/portal';\nimport { Subject, type Observable } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\n\n/**\n * Enter-animation duration for date-picker / date-range-picker overlays.\n * Matches `theme/_base.css` `.scale-in 140ms` — the keyframe the picker\n * overlays apply via `animate.enter=\"scale-in\"`. The coordinator delays\n * `opened$` emission by this duration so consumers can hook the moment the\n * panel has fully appeared instead of the moment `open()` was called.\n */\nexport const PICKER_ENTER_DURATION = 140;\n\n/**\n * Leave-animation duration for date-picker / date-range-picker overlays.\n * Matches `theme/_base.css` `.scale-out 120ms` — the keyframe the picker\n * overlays apply via `animate.leave=\"scale-out\"`. The coordinator delays\n * overlay detach by this duration so the leave animation can play through.\n */\nexport const PICKER_LEAVE_DURATION = 120;\n\n/** Configuration passed to {@link PickerOverlayCoordinator.open}. */\nexport interface PickerOpenConfig<TOverlay> {\n /** Element used as the connected-overlay origin (typically the picker trigger). */\n readonly origin: ElementRef<HTMLElement>;\n /** Component type to render inside the overlay (e.g. `DatePickerOverlayComponent`). */\n readonly portalComponent: ComponentType<TOverlay>;\n /** View-container that hosts the embedded view; usually the picker's `ViewContainerRef`. */\n readonly viewContainerRef: ViewContainerRef;\n /** Optional injector forwarded to the portal so DI tokens resolve from the picker's tree. */\n readonly injector?: Injector;\n /** Connected-position list — typically the result of `buildSelectLikePositions(offset)`. */\n readonly positions: ConnectedPosition[];\n /** CDK scroll-strategy instance for the overlay. */\n readonly scrollStrategy: ScrollStrategy;\n /** CSS class applied to the CDK overlay-pane element (NOT the panel root). */\n readonly panelClass: string;\n /** Viewport margin forwarded to the CDK position-strategy. Defaults to `8`. */\n readonly viewportMargin?: number;\n}\n\n/** Synchronous return shape of {@link PickerOverlayCoordinator.open}. */\nexport interface PickerOpenResult<TOverlay> {\n /** The CDK `OverlayRef` driving the overlay — exposed for advanced consumers. */\n readonly overlayRef: OverlayRef;\n /** The Angular `ComponentRef` for the attached portal — exposed so consumers may run `detectChanges()` to flush an initial-config push synchronously. */\n readonly componentRef: ComponentRef<TOverlay>;\n /** The instance of the attached portal component. Equivalent to `componentRef.instance`. */\n readonly instance: TOverlay;\n /** Auto-generated id consumers may wire to `aria-controls` / dialog `id`. */\n readonly panelId: string;\n}\n\n/**\n * Coordinator that owns the CDK `OverlayRef`, focus trap, panel-id, and\n * animation timing for an overlay-bearing form control. Consumed by\n * `DatePickerComponent` and `DateRangePickerComponent`; both pickers register\n * the coordinator at the component level (`providers: [PickerOverlayCoordinator]`)\n * so each picker instance owns its own coordinator state.\n *\n * Per the library \"no `providedIn: 'root'` for services\" rule (see\n * `.claude/CLAUDE.md` → \"What NOT To Do\"): the coordinator holds per-overlay\n * `OverlayRef` / `FocusTrap` state and MUST be component-scoped.\n *\n * Scope of responsibility:\n * - Create / dispose the CDK `OverlayRef`.\n * - Attach a `ComponentPortal` and return the instance.\n * - Set up / tear down a `FocusTrap` around the overlay element.\n * - Emit `opened$` after the enter animation completes (closes the\n * synchronous-emit bug previously present in both pickers).\n * - Expose `backdropClick$` / `overlayKeydown$` / `escape$` streams scoped\n * to the current open lifecycle.\n * - Run a leave-animation timer with an `isAttached` guard so close races\n * never touch a detached `OverlayRef` (mirrors the S14 command-palette\n * pattern).\n *\n * Out of scope (stays in the consuming picker):\n * - \"Restore previous value on close\" — semantics differ per picker.\n * - Per-picker portal callbacks (calendar selection, action-bar buttons).\n * - View-mode change-detection nudges (the range-picker calls\n * `changeDetectorRef.detectChanges()` after pushing its initial overlay\n * config; the date-picker does not).\n */\n@Injectable()\nexport class PickerOverlayCoordinator {\n private readonly overlay = inject(Overlay);\n private readonly focusTrapFactory = inject(FocusTrapFactory);\n private readonly destroyRef = inject(DestroyRef);\n private readonly idGenerator = inject(_IdGenerator);\n\n private overlayRef: OverlayRef | null = null;\n private focusTrap: ReturnType<FocusTrapFactory['create']> | null = null;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n private openedTimer: ReturnType<typeof setTimeout> | null = null;\n private currentPanelId: string | null = null;\n private currentClose$: Subject<void> | null = null;\n private openedSubject: Subject<void> | null = null;\n\n private readonly attachedSignal = signal(false);\n private readonly openedSignal = signal(false);\n\n /** Whether the overlay is currently attached (between `open()` and detach). */\n readonly attached: Signal<boolean> = this.attachedSignal.asReadonly();\n\n /** Whether the enter animation has completed (`opened$` has fired). */\n readonly opened: Signal<boolean> = this.openedSignal.asReadonly();\n\n constructor() {\n this.destroyRef.onDestroy(() => this.disposeImmediate());\n }\n\n /**\n * Creates and attaches the overlay. Returns the live overlay metadata\n * synchronously; callers should subscribe to {@link opened$} to observe the\n * moment the enter animation completes. Returns `null` if an overlay is\n * already attached.\n */\n open<TOverlay>(config: PickerOpenConfig<TOverlay>): PickerOpenResult<TOverlay> | null {\n if (this.overlayRef) return null;\n\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(config.origin)\n .withPositions(config.positions)\n .withFlexibleDimensions(false)\n .withPush(false)\n .withViewportMargin(config.viewportMargin ?? 8);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: config.scrollStrategy,\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-transparent-backdrop',\n panelClass: config.panelClass,\n });\n\n const portal = new ComponentPortal<TOverlay>(\n config.portalComponent,\n config.viewContainerRef,\n config.injector,\n );\n const ref = this.overlayRef.attach(portal);\n const instance = ref.instance;\n\n this.currentPanelId = this.idGenerator.getId('tw-picker-overlay-');\n this.currentClose$ = new Subject<void>();\n this.openedSubject = new Subject<void>();\n this.attachedSignal.set(true);\n this.openedSignal.set(false);\n\n this.setupFocusTrap();\n this.scheduleOpenedEmission();\n\n return {\n overlayRef: this.overlayRef,\n componentRef: ref,\n instance,\n panelId: this.currentPanelId,\n };\n }\n\n /**\n * Starts the close sequence — destroys the focus trap immediately so focus\n * can return to the trigger, then detaches the overlay after the leave\n * animation runs ({@link PICKER_LEAVE_DURATION}). Invokes `onAfterClose`\n * once the overlay is fully detached. No-op if no overlay is open or a\n * close is already in flight.\n *\n * Mirrors the S14 command-palette `isAttached`-guarded close pattern:\n * after the timer fires we re-check `attachedSignal` before touching the\n * overlay so a race (programmatic dispose, double-close) cannot touch a\n * destroyed instance.\n */\n close(onAfterClose: () => void = () => {}): void {\n if (!this.overlayRef || this.closeTimer !== null) return;\n this.destroyFocusTrap();\n this.clearOpenedTimer();\n\n this.closeTimer = setTimeout(() => {\n this.closeTimer = null;\n if (!this.attachedSignal()) {\n // Lost race with disposeImmediate / destroyRef.onDestroy.\n return;\n }\n if (this.overlayRef?.hasAttached()) {\n this.overlayRef.detach();\n }\n // Dispose the OverlayRef so the next open() builds a fresh one with the\n // current inputs (offset, scrollStrategy, panelClass). Without this the\n // `if (this.overlayRef) return null;` guard at the top of open() would\n // permanently block re-opens after the first close.\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.currentClose$?.next();\n this.currentClose$?.complete();\n this.currentClose$ = null;\n this.openedSubject?.complete();\n this.openedSubject = null;\n this.attachedSignal.set(false);\n this.openedSignal.set(false);\n this.currentPanelId = null;\n onAfterClose();\n }, PICKER_LEAVE_DURATION);\n }\n\n /**\n * Stream of overlay-level backdrop clicks for the current open lifecycle.\n * Completes when the overlay closes.\n */\n backdropClick$(): Observable<MouseEvent> {\n this.assertOpen('backdropClick$');\n return this.overlayRef!.backdropClick().pipe(takeUntil(this.currentClose$!));\n }\n\n /**\n * Stream of overlay-level keydown events for the current open lifecycle.\n * Completes when the overlay closes.\n */\n overlayKeydown$(): Observable<KeyboardEvent> {\n this.assertOpen('overlayKeydown$');\n return this.overlayRef!.keydownEvents().pipe(takeUntil(this.currentClose$!));\n }\n\n /**\n * Stream filtered to `Escape` keydowns inside the overlay for the current\n * open lifecycle. Equivalent to `overlayKeydown$().pipe(filter(e => e.key === 'Escape'))`\n * but spelled out so consumers don't import RxJS operators just for the\n * common case.\n */\n escape$(): Observable<KeyboardEvent> {\n return this.overlayKeydown$().pipe(filter((e) => e.key === 'Escape'));\n }\n\n /**\n * Emits exactly once after the enter animation completes\n * ({@link PICKER_ENTER_DURATION}ms after `open()`). Used by consumers to\n * fire their `opened` output at the moment the overlay panel is actually\n * visible — closes the synchronous-emit bug the pickers carried before\n * this coordinator existed.\n *\n * Completes when the overlay closes.\n */\n opened$(): Observable<void> {\n this.assertOpen('opened$');\n return this.openedSubject!.asObservable().pipe(takeUntil(this.currentClose$!));\n }\n\n /** Exposes the live `OverlayRef` for advanced consumers (e.g. width sync). */\n ref(): OverlayRef | null {\n return this.overlayRef;\n }\n\n /**\n * Exposes the current panel id (auto-generated via CDK `_IdGenerator`,\n * stable for the open lifecycle, reset to `null` on close). Neither\n * consuming picker uses this today — both keep their own\n * `${hostId}-dialog` id for `aria-controls` wiring — but the helper is\n * exposed for future consumers (e.g. a picker wrapper that wants its\n * panel id auto-managed).\n */\n panelId(): string | null {\n return this.currentPanelId;\n }\n\n /**\n * Immediately disposes the overlay and tears down the focus trap without\n * running the leave animation. Called from {@link DestroyRef.onDestroy};\n * consumers should NOT call this — use {@link close} for the user-visible\n * close path.\n */\n private disposeImmediate(): void {\n this.clearCloseTimer();\n this.clearOpenedTimer();\n this.destroyFocusTrap();\n if (this.currentClose$) {\n this.currentClose$.next();\n this.currentClose$.complete();\n this.currentClose$ = null;\n }\n this.openedSubject?.complete();\n this.openedSubject = null;\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.attachedSignal.set(false);\n this.openedSignal.set(false);\n this.currentPanelId = null;\n }\n\n private setupFocusTrap(): void {\n if (!this.overlayRef) return;\n this.focusTrap = this.focusTrapFactory.create(this.overlayRef.overlayElement);\n }\n\n private destroyFocusTrap(): void {\n this.focusTrap?.destroy();\n this.focusTrap = null;\n }\n\n private scheduleOpenedEmission(): void {\n this.clearOpenedTimer();\n if (!this.overlayRef || !this.overlayRef.hasAttached()) return;\n this.openedTimer = setTimeout(() => {\n this.openedTimer = null;\n if (!this.attachedSignal()) return;\n this.openedSignal.set(true);\n this.openedSubject?.next();\n }, PICKER_ENTER_DURATION);\n }\n\n private clearCloseTimer(): void {\n if (this.closeTimer !== null) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n private clearOpenedTimer(): void {\n if (this.openedTimer !== null) {\n clearTimeout(this.openedTimer);\n this.openedTimer = null;\n }\n }\n\n private assertOpen(method: string): void {\n if (!this.overlayRef || !this.currentClose$ || !this.openedSubject) {\n throw new Error(\n `PickerOverlayCoordinator.${method}() called before open() — no overlay attached.`,\n );\n }\n }\n}\n","/**\n * Pure helpers shared by `DialogContainer` and `SheetContainer` (both live\n * under `projects/ngx-tw/{dialog,sheet}/`) — and consumable by any future\n * `CdkDialogContainer` subclass that needs the same plumbing.\n *\n * No DOM, no Angular DI. The DI-bound state lives in\n * {@link OverlayContainerCoordinator}; this file is the data-only layer.\n */\n\n/**\n * Fallback padding (ms) added on top of an enter/exit animation duration when\n * scheduling the `transitionend` fallback timer. The browser SHOULD fire\n * `transitionend` at the configured duration, but transitions can be\n * swallowed (focus changes during the animation, interrupted transitions,\n * etc.) — the padding gives the browser a small grace period before our\n * fallback runs.\n *\n * Both dialog and sheet containers used the same constant — extracted here so\n * a future tweak applies to both at once.\n */\nexport const OVERLAY_ANIMATION_FALLBACK_PADDING = 50;\n\n/**\n * Coerces a user-supplied animation duration to a safe positive integer, or\n * falls back to a default if the input is `null`, `undefined`, negative, or\n * non-finite (`NaN`, `Infinity`). Dialog and sheet containers both used this\n * same standalone function; centralised here.\n */\nexport function coerceOverlayDuration(value: number | undefined, fallback: number): number {\n if (value == null || value < 0 || !Number.isFinite(value)) return fallback;\n return value;\n}\n\n/**\n * Merges a consumer-supplied `panelClass` (single class, list, or\n * `undefined`) with the container's internal class string. Returns a single\n * space-separated class string suitable for `[class]` host binding.\n *\n * `consumer` always wins ordering (appended after `internal`) so consumer\n * overrides resolve correctly through `tailwind-merge` upstream.\n */\nexport function mergeOverlayPanelClass(\n internal: string,\n consumer: string | readonly string[] | undefined,\n): string {\n if (!consumer) return internal;\n return Array.isArray(consumer) ? [internal, ...consumer].join(' ') : `${internal} ${consumer}`;\n}\n\n/**\n * Append-only id list with idempotent insertion, used for the\n * `aria-describedby` queue both `DialogContainer` and `SheetContainer`\n * maintain (the matching `aria-labelledby` queue lives in CDK's\n * `CdkDialogContainer`).\n *\n * Pure data structure — no DOM, no Angular signals. Consumers wrap an\n * instance in their own change-detection mechanism (the\n * {@link OverlayContainerCoordinator} keeps the live snapshot in a signal so\n * the container's `[attr.aria-describedby]` binding refreshes via OnPush\n * without a manual `markForCheck()`).\n *\n * First-registered-wins semantics for `first()` mirror CDK's\n * `_ariaLabelledByQueue[0]` host binding — describing the dialog by the\n * earliest registered description prevents a late-mounted nested directive\n * from silently re-aiming the description target.\n */\nexport class AriaIdQueue {\n private readonly ids: string[] = [];\n\n /** Inserts an id at the tail. No-op if the id is already present. */\n add(id: string): void {\n if (this.ids.includes(id)) return;\n this.ids.push(id);\n }\n\n /** Removes the given id. No-op if the id is not present. */\n remove(id: string): void {\n const index = this.ids.indexOf(id);\n if (index >= 0) this.ids.splice(index, 1);\n }\n\n /** First registered id (or `null` if empty). Matches CDK's `_ariaLabelledByQueue[0]` semantics. */\n first(): string | null {\n return this.ids[0] ?? null;\n }\n\n /** Returns a fresh snapshot of all registered ids in insertion order. */\n snapshot(): readonly string[] {\n return [...this.ids];\n }\n}\n","import {\n computed,\n DestroyRef,\n EventEmitter,\n inject,\n Injectable,\n signal,\n type Signal,\n} from '@angular/core';\nimport { AriaIdQueue, OVERLAY_ANIMATION_FALLBACK_PADDING } from './overlay-container-helpers';\n\n/** Lifecycle states an overlay container passes through. Shared by dialog and sheet. */\nexport type OverlayContainerState = 'opening' | 'open' | 'closing' | 'closed';\n\n/** Event emitted on every overlay-container animation-state transition. */\nexport interface OverlayContainerAnimationEvent {\n /** State that the container just transitioned into. */\n state: OverlayContainerState;\n /** Duration, in ms, of the transition that triggered the event. */\n totalTime: number;\n}\n\n/**\n * Component-scoped coordinator that owns the enter/exit animation state\n * machine, ARIA-describedby id queue, and panel-class merge for an overlay\n * container that subclasses `@angular/cdk/dialog`'s `CdkDialogContainer`.\n *\n * Consumed by `DialogContainer` and `SheetContainer`; both register the\n * coordinator at the component level (`providers: [OverlayContainerCoordinator]`)\n * so each container instance owns its own animation state and queue.\n *\n * Per the library \"no `providedIn: 'root'` for services\" rule (see\n * `.claude/CLAUDE.md` → \"What NOT To Do\"): the coordinator holds per-overlay\n * state (the current animation timer, the describedby queue, the lifecycle\n * signal) and MUST be component-scoped.\n *\n * Scope of responsibility:\n * - Animation state signal (`state`) and `transitionDuration` computed.\n * - Enter/exit animation timing (`startEnterAnimation`, `startExitAnimation`)\n * with a `transitionend`-fallback timer.\n * - `animationStateChanged` EventEmitter forwarded to the consuming `Ref`.\n * - ARIA-describedby id queue (the matching labelledby queue is already\n * owned by CDK's `CdkDialogContainer._ariaLabelledByQueue`).\n *\n * Out of scope (stays on the container subclass):\n * - The `CdkDialogContainer` contract — focus trap, escape key, backdrop\n * click, overlay attach/detach. The container subclass keeps inheriting\n * `CdkDialogContainer` directly; this coordinator layers on top.\n * - Tailwind class resolution (`tv()` variant slots) — that's per-container.\n * - Host bindings on the container element — that's per-container.\n */\n@Injectable()\nexport class OverlayContainerCoordinator {\n private readonly destroyRef = inject(DestroyRef);\n\n private readonly stateSignal = signal<OverlayContainerState>('opening');\n private readonly ariaDescribedByQueue = signal<readonly string[]>([]);\n private readonly queue = new AriaIdQueue();\n\n private animationTimer: ReturnType<typeof setTimeout> | null = null;\n private enterDuration = 0;\n private exitDuration = 0;\n\n /** Lifecycle state of the container's enter/exit animation. */\n readonly state: Signal<OverlayContainerState> = this.stateSignal.asReadonly();\n\n /** Live snapshot of the describedby id queue. */\n readonly describedByIds: Signal<readonly string[]> = this.ariaDescribedByQueue.asReadonly();\n\n /**\n * Active transition duration for the current state — the enter duration for\n * `opening` / `open`, the exit duration for `closing`, and 0 once `closed`.\n * Drives the container's `[style.transition-duration.ms]` host binding so a\n * one-line `data-[state]` transition rule can run with per-call timing.\n */\n readonly transitionDuration = computed(() => {\n const current = this.stateSignal();\n if (current === 'opening' || current === 'open') return this.enterDuration;\n if (current === 'closing') return this.exitDuration;\n return 0;\n });\n\n /**\n * Emits whenever the animation state transitions. The container's `Ref`\n * (`TwDialogRef` / `SheetRef`) subscribes to drive its own lifecycle\n * (`afterOpened`, `afterClosed`, exit-animation completion).\n */\n readonly animationStateChanged = new EventEmitter<OverlayContainerAnimationEvent>();\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n this.clearAnimationTimer();\n this.animationStateChanged.complete();\n });\n }\n\n /**\n * Records the resolved enter/exit durations for the open lifecycle.\n * Called once from the container constructor with values coerced via\n * `coerceOverlayDuration`. Stored on the coordinator so\n * `transitionDuration()` and the timer-driven state transitions read from\n * a single source.\n */\n setDurations(enter: number, exit: number): void {\n this.enterDuration = enter;\n this.exitDuration = exit;\n }\n\n /**\n * Drives the enter animation: emits `opening` immediately, then defers the\n * state flip to `open` by one frame so the browser applies the initial\n * (hidden / off-screen) styles before transitioning. If `enter` is `0`\n * everything resolves synchronously (no animation).\n */\n startEnterAnimation(): void {\n this.animationStateChanged.emit({ state: 'opening', totalTime: this.enterDuration });\n\n if (this.enterDuration === 0) {\n this.stateSignal.set('open');\n this.animationStateChanged.emit({ state: 'open', totalTime: 0 });\n return;\n }\n\n requestAnimationFrame(() => {\n this.stateSignal.set('open');\n this.runAnimationTimer(this.enterDuration, () => {\n this.animationStateChanged.emit({\n state: 'open',\n totalTime: this.enterDuration,\n });\n });\n });\n }\n\n /**\n * Drives the exit animation: emits `closing` synchronously and schedules\n * the `closed` emission for after the exit duration (+ a small fallback\n * padding) elapses. The consuming `Ref` listens for the `closed` emission\n * to detach the CDK overlay.\n */\n startExitAnimation(): void {\n this.stateSignal.set('closing');\n this.animationStateChanged.emit({ state: 'closing', totalTime: this.exitDuration });\n\n this.runAnimationTimer(this.exitDuration, () => {\n this.stateSignal.set('closed');\n this.animationStateChanged.emit({ state: 'closed', totalTime: this.exitDuration });\n });\n }\n\n /** Registers a description id with the `aria-describedby` queue. */\n addAriaDescribedBy(id: string): void {\n this.queue.add(id);\n this.ariaDescribedByQueue.set(this.queue.snapshot());\n }\n\n /** Removes a previously registered description id. */\n removeAriaDescribedBy(id: string): void {\n this.queue.remove(id);\n this.ariaDescribedByQueue.set(this.queue.snapshot());\n }\n\n /** First-registered-wins resolution for the `aria-describedby` attribute. */\n firstDescribedBy(): string | null {\n return this.queue.first();\n }\n\n private runAnimationTimer(duration: number, callback: () => void): void {\n this.clearAnimationTimer();\n if (duration === 0) {\n callback();\n return;\n }\n this.animationTimer = setTimeout(callback, duration + OVERLAY_ANIMATION_FALLBACK_PADDING);\n }\n\n private clearAnimationTimer(): void {\n if (this.animationTimer !== null) {\n clearTimeout(this.animationTimer);\n this.animationTimer = null;\n }\n }\n}\n","import { tv } from 'tailwind-variants';\nimport type { TwColor } from './types';\n\n/**\n * Visual style shared by `tw-tabs` (`TabsVariant`) and `nav[twTabNav]` (`TabNavVariant`).\n * Kept as a string-literal union so downstream consumers can narrow when needed.\n */\nexport type TabTriggerVariant = 'underline' | 'enclosed' | 'pill';\n\n/**\n * Trigger-only tailwind-variants config shared by tabs and tab-nav.\n *\n * Both components own additional component-local slots (tablist/list/panel/nav,\n * etc.) — only the trigger shape is canonical enough to share here. The\n * resulting class string is merged with each component's local trigger\n * additions (e.g. tab-nav prepends `no-underline` because anchor elements need\n * to override the default underline; tabs adds nothing extra at the base).\n *\n * Active and inactive trigger state is applied separately via\n * {@link getActiveTriggerClasses} / {@link getInactiveTriggerClasses} so the\n * `Record<TwColor, string>` lookups stay statically scannable by the Tailwind\n * v4 content scanner.\n */\nexport const tabTriggerVariants = tv(\n {\n slots: {\n trigger:\n 'inline-flex items-center gap-1.5 font-medium whitespace-nowrap cursor-pointer transition-colors duration-normal motion-reduce:transition-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',\n },\n variants: {\n variant: {\n underline: {\n trigger: 'border-b-2 border-transparent -mb-px text-fg-muted hover:text-fg',\n },\n enclosed: {\n trigger:\n 'border border-transparent bg-surface-muted text-fg-muted hover:text-fg -mb-px',\n },\n pill: {\n trigger: 'rounded-md text-fg-muted hover:text-fg',\n },\n },\n size: {\n xs: { trigger: 'px-2 py-1 text-xs' },\n sm: { trigger: 'px-3 py-1.5 text-sm' },\n md: { trigger: 'px-4 py-2 text-sm' },\n lg: { trigger: 'px-5 py-2.5 text-base' },\n xl: { trigger: 'px-6 py-3 text-base' },\n },\n fitted: {\n true: { trigger: 'flex-1 justify-center' },\n false: {},\n },\n color: {\n primary: {},\n secondary: {},\n accent: {},\n neutral: {},\n info: {},\n success: {},\n warning: {},\n error: {},\n },\n },\n defaultVariants: {\n variant: 'underline',\n color: 'primary',\n size: 'md',\n fitted: false,\n },\n },\n { twMerge: true },\n);\n\n// ── Active-state class lookups ──\n// Slot tokens own light/dark contrast — no `dark:`, no shade picks. Classes\n// stay statically written so the Tailwind v4 scanner sees them. The neutral\n// rows use surface/fg/border tokens which already auto-adapt to dark mode.\n\n/** @internal Active trigger classes for horizontal underline variants, keyed by color. */\nexport const UNDERLINE_ACTIVE_HORIZONTAL: Record<TwColor, string> = {\n primary: 'border-b-2 border-primary-border-strong text-primary-fg',\n secondary: 'border-b-2 border-secondary-border-strong text-secondary-fg',\n accent: 'border-b-2 border-accent-border-strong text-accent-fg',\n neutral: 'border-b-2 border-border-strong text-fg',\n info: 'border-b-2 border-info-border-strong text-info-fg',\n success: 'border-b-2 border-success-border-strong text-success-fg',\n warning: 'border-b-2 border-warning-border-strong text-warning-fg',\n error: 'border-b-2 border-error-border-strong text-error-fg',\n};\n\n/** @internal Active trigger classes for vertical underline variants, keyed by color. */\nexport const UNDERLINE_ACTIVE_VERTICAL: Record<TwColor, string> = {\n primary: 'border-r-2 border-primary-border-strong text-primary-fg',\n secondary: 'border-r-2 border-secondary-border-strong text-secondary-fg',\n accent: 'border-r-2 border-accent-border-strong text-accent-fg',\n neutral: 'border-r-2 border-border-strong text-fg',\n info: 'border-r-2 border-info-border-strong text-info-fg',\n success: 'border-r-2 border-success-border-strong text-success-fg',\n warning: 'border-r-2 border-warning-border-strong text-warning-fg',\n error: 'border-r-2 border-error-border-strong text-error-fg',\n};\n\n/** @internal Active trigger classes for horizontal enclosed variants, keyed by color. */\nexport const ENCLOSED_ACTIVE_HORIZONTAL: Record<TwColor, string> = {\n primary: 'bg-surface border border-border border-b-transparent text-primary-fg',\n secondary: 'bg-surface border border-border border-b-transparent text-secondary-fg',\n accent: 'bg-surface border border-border border-b-transparent text-accent-fg',\n neutral: 'bg-surface border border-border border-b-transparent text-fg',\n info: 'bg-surface border border-border border-b-transparent text-info-fg',\n success: 'bg-surface border border-border border-b-transparent text-success-fg',\n warning: 'bg-surface border border-border border-b-transparent text-warning-fg',\n error: 'bg-surface border border-border border-b-transparent text-error-fg',\n};\n\n/** @internal Active trigger classes for vertical enclosed variants, keyed by color. */\nexport const ENCLOSED_ACTIVE_VERTICAL: Record<TwColor, string> = {\n primary: 'bg-surface border border-border border-r-transparent text-primary-fg',\n secondary: 'bg-surface border border-border border-r-transparent text-secondary-fg',\n accent: 'bg-surface border border-border border-r-transparent text-accent-fg',\n neutral: 'bg-surface border border-border border-r-transparent text-fg',\n info: 'bg-surface border border-border border-r-transparent text-info-fg',\n success: 'bg-surface border border-border border-r-transparent text-success-fg',\n warning: 'bg-surface border border-border border-r-transparent text-warning-fg',\n error: 'bg-surface border border-border border-r-transparent text-error-fg',\n};\n\n/** @internal Active trigger classes for pill variants, keyed by color. */\nexport const PILL_ACTIVE: Record<TwColor, string> = {\n primary: 'bg-surface shadow-sm text-primary-fg',\n secondary: 'bg-surface shadow-sm text-secondary-fg',\n accent: 'bg-surface shadow-sm text-accent-fg',\n neutral: 'bg-surface shadow-sm text-fg',\n info: 'bg-surface shadow-sm text-info-fg',\n success: 'bg-surface shadow-sm text-success-fg',\n warning: 'bg-surface shadow-sm text-warning-fg',\n error: 'bg-surface shadow-sm text-error-fg',\n};\n\n/** @internal Inactive trigger classes keyed by variant. */\nexport const INACTIVE_TRIGGER_CLASSES: Record<TabTriggerVariant, string> = {\n underline: 'border-transparent',\n enclosed: 'border-transparent bg-surface-muted',\n pill: '',\n};\n\n/**\n * Returns the active-state trigger class string for the given variant, color,\n * and orientation. Tab-nav callers pass `'horizontal'` since it is horizontal-only.\n */\nexport function getActiveTriggerClasses(\n variant: TabTriggerVariant,\n color: TwColor,\n orientation: 'horizontal' | 'vertical' = 'horizontal',\n): string {\n switch (variant) {\n case 'underline':\n return orientation === 'vertical'\n ? UNDERLINE_ACTIVE_VERTICAL[color]\n : UNDERLINE_ACTIVE_HORIZONTAL[color];\n case 'enclosed':\n return orientation === 'vertical'\n ? ENCLOSED_ACTIVE_VERTICAL[color]\n : ENCLOSED_ACTIVE_HORIZONTAL[color];\n case 'pill':\n return PILL_ACTIVE[color];\n }\n}\n\n/** Returns the inactive-state trigger class string for the given variant. */\nexport function getInactiveTriggerClasses(variant: TabTriggerVariant): string {\n return INACTIVE_TRIGGER_CLASSES[variant];\n}\n","/**\n * Pure helpers shared by `tw-time-picker` and `tw-calendar`'s `withTime`\n * controls. No Angular / CDK imports — safe to drop into either package\n * without pulling a circular dependency.\n */\n\n/** Supported time-picker formats. */\nexport type TimePickerFormat = '12h' | '24h';\n\n/** Meridiem used by the 12h format. */\nexport type TimePickerMeridiem = 'AM' | 'PM';\n\n/** Zero-pads a non-negative integer to exactly two digits. */\nexport function padTwo(value: number): string {\n return value < 10 ? `0${value}` : `${value}`;\n}\n\n/** Converts a 24h hour (0–23) to its 12h display value (1–12). */\nexport function to12h(hour24: number): number {\n const modded = hour24 % 12;\n return modded === 0 ? 12 : modded;\n}\n\n/** Builds a canonical 0–23 hour from a 12h display hour and meridiem. */\nexport function from12h(hour12: number, meridiem: TimePickerMeridiem): number {\n if (hour12 === 12) return meridiem === 'AM' ? 0 : 12;\n return meridiem === 'AM' ? hour12 : hour12 + 12;\n}\n\n/** Maximum allowed value for a field given the picker format. */\nexport function fieldMax(\n field: 'hour' | 'minute' | 'second',\n format: TimePickerFormat,\n): number {\n if (field === 'hour') return format === '12h' ? 12 : 23;\n return 59;\n}\n\n/** Minimum allowed value for a field given the picker format. */\nexport function fieldMin(\n field: 'hour' | 'minute' | 'second',\n format: TimePickerFormat,\n): number {\n return field === 'hour' && format === '12h' ? 1 : 0;\n}\n\n/**\n * Buffers a typed digit onto the current field text, matching the standard\n * two-digit time-field behaviour:\n * - empty + 'x' → 'x'\n * - 'x' + 'y' → 'xy' (if value stays in range)\n * - 'xy' + 'z' → 'z' (overflow → reset)\n * - any combo that would exceed `max` resets to the new digit alone.\n */\nexport function appendDigit(current: string, digit: string, max: number): string {\n if (!/^\\d$/.test(digit)) return current;\n if (current.length >= 2) return digit;\n const candidate = current + digit;\n const numeric = Number(candidate);\n if (numeric > max) return digit;\n return candidate;\n}\n\n/**\n * Reports whether `current` + `digit` unambiguously fills the field — either\n * because the buffer reaches two chars or because the first digit alone\n * already excludes a valid second digit (e.g., `'6'` for minutes, `'3'` for 24h\n * hour). Used to auto-advance focus to the next field.\n */\nexport function isTerminalDigit(current: string, digit: string, max: number): boolean {\n if (current.length === 1) return true;\n if (!/^\\d$/.test(digit)) return false;\n const maxFirst = Math.floor(max / 10);\n return Number(digit) > maxFirst;\n}\n\n/**\n * Steps a numeric value by `step`, wrapping inside `[min, max]`. Works for\n * arbitrary step sizes; a step of 0 behaves as 1 to protect against mis-configs.\n */\nexport function stepWithWrap(\n value: number,\n step: number,\n direction: 1 | -1,\n min: number,\n max: number,\n): number {\n const safeStep = Math.max(1, Math.abs(step));\n const range = max - min + 1;\n const delta = safeStep * direction;\n return ((((value - min + delta) % range) + range) % range) + min;\n}\n\n/** Clamps a number into `[min, max]` without wrapping. */\nexport function clamp(value: number, min: number, max: number): number {\n if (value < min) return min;\n if (value > max) return max;\n return value;\n}\n\n/** Parses a 1- or 2-digit text field; returns `null` if empty or non-numeric. */\nexport function parseField(text: string): number | null {\n if (!text) return null;\n if (!/^\\d{1,2}$/.test(text)) return null;\n return Number(text);\n}\n\n/** Total seconds since midnight for a (h, m, s) tuple — useful for min/max compare. */\nexport function timeOfDaySeconds(hour: number, minute: number, second: number): number {\n return hour * 3600 + minute * 60 + second;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAyBA;;;;AAIG;AACI,MAAM,wBAAwB,GAAsB;IACzD,YAAY,CAAC,OAAO,EAAE,IAAI,EAAA;QACxB,IAAI,CAAC,OAAO,EAAE;AACZ,YAAA,OAAO,KAAK;QACd;QACA,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,OAAO;AACnD,QAAA,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,KAAK,UAAU,IAAI,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC;IAC/D,CAAC;;AAGH;;;;;AAKG;MACU,sBAAsB,GAAG,IAAI,cAAc,CACtD,wBAAwB,EACxB;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,wBAAwB;AACxC,CAAA;;ACnCH;;;;AAIG;MACU,cAAc,GAAG,IAAI,cAAc,CAAe,cAAc;;ACnB7E;;;;;;;;;;;;;;AAcG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ACrB;AAEA;SACgB,gBAAgB,CAAC,IAAY,EAAE,MAAc,EAAE,MAAc,EAAA;IAC3E,OAAO,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,EAAE,GAAG,MAAM;AAC3C;;AC9GA;;AAEG;;;;"}
|
|
@@ -1351,6 +1351,7 @@ class DatePickerComponent extends FormFieldControl {
|
|
|
1351
1351
|
PickerOverlayCoordinator,
|
|
1352
1352
|
], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["dateInput"], descendants: true, isSignal: true }, { propertyName: "triggerRef", first: true, predicate: ["triggerBtn"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
1353
1353
|
<!-- Optional rich-label trigger. When projected (a child carries [slot=trigger]), the default input/clear/trigger chrome is hidden. Clicks anywhere in the projected content open the overlay. -->
|
|
1354
|
+
<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->
|
|
1354
1355
|
<div
|
|
1355
1356
|
class="contents"
|
|
1356
1357
|
(click)="onCustomTriggerClick($event)"
|
|
@@ -1455,6 +1456,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1455
1456
|
],
|
|
1456
1457
|
template: `
|
|
1457
1458
|
<!-- Optional rich-label trigger. When projected (a child carries [slot=trigger]), the default input/clear/trigger chrome is hidden. Clicks anywhere in the projected content open the overlay. -->
|
|
1459
|
+
<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->
|
|
1458
1460
|
<div
|
|
1459
1461
|
class="contents"
|
|
1460
1462
|
(click)="onCustomTriggerClick($event)"
|