@cdevhub/ngx-tw 0.4.0 → 0.5.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/fesm2022/cdevhub-ngx-tw-dialog-dialog-renderer-DoIhoV3d.mjs +198 -0
- package/fesm2022/cdevhub-ngx-tw-dialog-dialog-renderer-DoIhoV3d.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs +189 -219
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-sheet-sheet-renderer-ByyNluUd.mjs +256 -0
- package/fesm2022/cdevhub-ngx-tw-sheet-sheet-renderer-ByyNluUd.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-sheet.mjs +178 -275
- package/fesm2022/cdevhub-ngx-tw-sheet.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-toast-toast-renderer-DSu4YoTy.mjs +528 -0
- package/fesm2022/cdevhub-ngx-tw-toast-toast-renderer-DSu4YoTy.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-toast.mjs +414 -811
- package/fesm2022/cdevhub-ngx-tw-toast.mjs.map +1 -1
- package/index.json +1 -1
- package/package.json +1 -1
- package/types/cdevhub-ngx-tw-dialog.d.ts +80 -19
- package/types/cdevhub-ngx-tw-sheet.d.ts +78 -19
- package/types/cdevhub-ngx-tw-toast.d.ts +41 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdevhub-ngx-tw-dialog.mjs","sources":["../../../projects/ngx-tw/dialog/dialog-config.ts","../../../projects/ngx-tw/dialog/dialog-container.ts","../../../projects/ngx-tw/dialog/dialog-ref.ts","../../../projects/ngx-tw/dialog/dialog.ts","../../../projects/ngx-tw/dialog/dialog-content.ts","../../../projects/ngx-tw/dialog/cdevhub-ngx-tw-dialog.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport {\n type AutoFocusTarget,\n DialogConfig as CdkDialogConfig,\n type DialogRole,\n type RestoreFocusValue,\n} from '@angular/cdk/dialog';\n\n/** Preset sizes mapped to width constraints for the dialog panel. */\nexport type TwDialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen';\n\n/** ARIA role of the dialog element. Use `'alertdialog'` for destructive confirmation prompts. */\nexport type TwDialogRole = DialogRole;\n\n/** Where to move focus when the dialog opens. */\nexport type TwDialogAutoFocus = AutoFocusTarget | string | boolean;\n\n/** How to restore focus on close. `true` restores to the previously focused element; a selector or element targets a specific node. */\nexport type TwDialogRestoreFocus = RestoreFocusValue;\n\n/** Scroll behavior for content underneath the dialog. */\nexport type TwDialogScrollStrategy = 'block' | 'close' | 'reposition' | 'noop';\n\n/**\n * Configuration for opening a dialog with {@link TwDialog.open}.\n *\n * Mirrors the shape of `@angular/cdk/dialog`'s `DialogConfig` with additional\n * tailwind-focused options (`size`, `enterAnimationDuration`, etc.).\n */\nexport class TwDialogConfig<D = unknown, R = unknown> extends CdkDialogConfig<D, R> {\n /** Preset size for the dialog panel. Ignored when `width`/`maxWidth` are provided. Defaults to `'md'`. */\n size?: TwDialogSize = 'md';\n\n /** Duration of the open animation in ms. Defaults to `150`. Use `0` to disable. */\n enterAnimationDuration?: number = 150;\n\n /**\n * Duration of the close animation in ms. Defaults to `120`. Use `0` to disable.\n * Asymmetric with `enterAnimationDuration` by design: the close transition is\n * slightly faster so the dialog feels dismissive rather than reluctant.\n */\n exitAnimationDuration?: number = 120;\n\n /** Scroll strategy preset applied when `scrollStrategy` isn't set. Defaults to `'block'`. */\n scrollBehavior?: TwDialogScrollStrategy = 'block';\n\n /** Maximum width. Number values are treated as pixels. Defaults to `'calc(100vw - 32px)'`. */\n override maxWidth?: number | string = 'calc(100vw - 32px)';\n\n /**\n * Whether the dialog is modal — sets `aria-modal` on the container.\n * Defaults to `true`: a `role=\"dialog\"` opened over the page is modal by\n * default and the rest of the document is inert while it is open. Set to\n * `false` only for non-modal surfaces (rare; consider `popover` instead).\n */\n override ariaModal?: boolean = true;\n\n /** Whether Escape and backdrop clicks are blocked. Defaults to `false`. */\n override disableClose?: boolean = false;\n\n /** Where to move focus when the dialog opens. Defaults to `'first-tabbable'`. */\n override autoFocus?: TwDialogAutoFocus = 'first-tabbable';\n\n /** Whether to restore focus to the previously focused element after close. Defaults to `true`. */\n override restoreFocus?: TwDialogRestoreFocus = true;\n\n /** Whether the dialog renders a backdrop. Defaults to `true`. */\n override hasBackdrop?: boolean = true;\n\n /** Whether navigation (e.g. router) closes the dialog. Defaults to `true`. */\n override closeOnNavigation?: boolean = true;\n}\n\n/** Injection token carrying the `data` value passed via {@link TwDialogConfig.data}. */\nexport const TW_DIALOG_DATA = new InjectionToken<unknown>('TW_DIALOG_DATA');\n\n/** Injection token for application-wide default dialog options. Set via `provideTwDialog()`. */\nexport const TW_DIALOG_DEFAULT_OPTIONS = new InjectionToken<Partial<TwDialogConfig>>(\n 'TW_DIALOG_DEFAULT_OPTIONS',\n);\n","import {\n ChangeDetectionStrategy,\n Component,\n type EventEmitter,\n inject,\n type Signal,\n ViewEncapsulation,\n computed,\n} from '@angular/core';\nimport { CdkDialogContainer } from '@angular/cdk/dialog';\nimport { CdkPortalOutlet } from '@angular/cdk/portal';\nimport {\n coerceOverlayDuration,\n mergeOverlayPanelClass,\n OverlayContainerCoordinator,\n type OverlayContainerAnimationEvent,\n type OverlayContainerState,\n} from '@cdevhub/ngx-tw/core';\nimport { tv } from 'tailwind-variants';\nimport { type TwDialogConfig } from './dialog-config';\n\n/** Lifecycle states a dialog passes through. */\nexport type DialogState = OverlayContainerState;\n\n/** Event emitted when the dialog's animation state transitions. */\nexport type DialogAnimationEvent = OverlayContainerAnimationEvent;\n\n// Dialog uses a `data-[state]` driven CSS transition rather than the project's\n// `animate.enter`/`animate.leave` keyframes. Justification:\n// 1. The ref owns the open/close lifecycle (state signal, observables) and\n// needs runtime-configurable enter/exit durations per `TwDialog.open()`\n// call — `animate.enter` only accepts a static class name.\n// 2. The container drives the same CSS variables (opacity + scale) for both\n// transitions, so a single `transition-[opacity,transform]` rule with a\n// data-state attribute is simpler than two keyframe declarations.\n// All other library overlays (popover, menu, tooltip) use animate.enter/leave;\n// this divergence is intentional and isolated to the dialog container.\nconst dialogContainerVariants = tv(\n {\n slots: {\n host: 'relative flex flex-col outline-none bg-surface-raised text-fg rounded-lg shadow-md border border-border overflow-hidden transition-[opacity,transform] ease-out motion-reduce:transition-none opacity-0 scale-95 data-[state=open]:opacity-100 data-[state=open]:scale-100 data-[state=closing]:opacity-0 data-[state=closing]:scale-95',\n },\n variants: {\n size: {\n xs: { host: 'w-full max-w-sm max-h-[85vh]' },\n sm: { host: 'w-full max-w-md max-h-[85vh]' },\n md: { host: 'w-full max-w-lg max-h-[85vh]' },\n lg: { host: 'w-full max-w-2xl max-h-[85vh]' },\n xl: { host: 'w-full max-w-4xl max-h-[85vh]' },\n fullscreen: {\n host: 'w-screen h-screen max-w-none max-h-none rounded-none border-0',\n },\n },\n },\n defaultVariants: { size: 'md' },\n },\n { twMerge: true },\n);\n\n/**\n * Dialog container rendered inside the CDK overlay. Wraps the user-provided\n * content in a Tailwind-styled surface and coordinates enter/exit transitions\n * with {@link TwDialogRef}.\n *\n * The animation state machine, `aria-describedby` queue, and panel-class\n * merge are shared with `SheetContainer` via {@link OverlayContainerCoordinator}\n * (component-scoped — see `providers: [OverlayContainerCoordinator]`).\n *\n * @docs-private\n */\n@Component({\n selector: 'tw-dialog-container',\n template: '<ng-template cdkPortalOutlet />',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CdkPortalOutlet],\n providers: [OverlayContainerCoordinator],\n host: {\n tabindex: '-1',\n '[attr.id]': '_config.id || null',\n '[attr.role]': '_config.role',\n '[attr.aria-modal]': '_config.ariaModal',\n '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledByQueue[0]',\n '[attr.aria-label]': '_config.ariaLabel',\n '[attr.aria-describedby]': 'ariaDescribedByAttr()',\n '[attr.data-state]': 'state()',\n '[class]': 'hostClasses()',\n '[style.transition-duration.ms]': 'transitionDuration()',\n },\n})\nexport class DialogContainer extends CdkDialogContainer<TwDialogConfig> {\n private readonly coordinator = inject(OverlayContainerCoordinator);\n\n /** Lifecycle state of the dialog's enter/exit animation. */\n readonly state: Signal<DialogState> = this.coordinator.state;\n\n /** Emits whenever the animation state transitions. */\n readonly animationStateChanged: EventEmitter<DialogAnimationEvent> =\n this.coordinator.animationStateChanged;\n\n /** Resolved enter-animation duration in ms. */\n readonly enterAnimationDuration: number;\n /** Resolved exit-animation duration in ms. */\n readonly exitAnimationDuration: number;\n\n private readonly sizeVariant = computed(() => {\n const size = this._config.size ?? 'md';\n return dialogContainerVariants({ size });\n });\n\n protected readonly hostClasses = computed(() =>\n mergeOverlayPanelClass(this.sizeVariant().host(), this._config.panelClass),\n );\n\n protected readonly ariaDescribedByAttr = computed(\n () =>\n this._config.ariaDescribedBy ||\n this.coordinator.describedByIds()[0] ||\n null,\n );\n\n protected readonly transitionDuration = this.coordinator.transitionDuration;\n\n constructor() {\n super();\n this.enterAnimationDuration = coerceOverlayDuration(this._config.enterAnimationDuration, 150);\n this.exitAnimationDuration = coerceOverlayDuration(this._config.exitAnimationDuration, 120);\n this.coordinator.setDurations(this.enterAnimationDuration, this.exitAnimationDuration);\n }\n\n protected override _contentAttached(): void {\n super._contentAttached();\n this.coordinator.startEnterAnimation();\n }\n\n /** Triggered by the dialog ref to play the exit transition before disposing the overlay. */\n _startExitAnimation(): void {\n this.coordinator.startExitAnimation();\n }\n\n /** Registers a description id for the container's `aria-describedby`. */\n _addAriaDescribedBy(id: string): void {\n this.coordinator.addAriaDescribedBy(id);\n }\n\n /** Removes a previously registered description id. */\n _removeAriaDescribedBy(id: string): void {\n this.coordinator.removeAriaDescribedBy(id);\n }\n}\n","import { type ComponentRef, signal, type Signal } from '@angular/core';\nimport { type DialogRef as CdkDialogRef } from '@angular/cdk/dialog';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { filter, merge, type Observable, ReplaySubject, take } from 'rxjs';\nimport type { FocusOrigin } from '@angular/cdk/a11y';\nimport type { TwDialogConfig } from './dialog-config';\nimport type { DialogContainer, DialogState } from './dialog-container';\n\n/**\n * Reference to a dialog opened via {@link TwDialog.open}. Drives the dialog\n * lifecycle (close, state, observables) and forwards useful overlay streams.\n */\nexport class TwDialogRef<R = unknown, C = unknown> {\n /** Unique ID of the dialog. */\n readonly id: string;\n\n /** Instance of the component rendered inside the dialog, or `null` for template dialogs. */\n componentInstance: C | null = null;\n\n /** `ComponentRef` of the content component, or `null` for template dialogs. */\n readonly componentRef: ComponentRef<C> | null = null;\n\n /** Current lifecycle state. Reactively readable. */\n readonly state: Signal<DialogState>;\n\n /** When `true`, close-via-escape and close-via-backdrop are disabled. */\n disableClose: boolean | undefined;\n\n private readonly stateSignal = signal<DialogState>('opening');\n private readonly afterOpenedSubject = new ReplaySubject<void>(1);\n private readonly beforeClosedSubject = new ReplaySubject<R | undefined>(1);\n private readonly afterClosedSubject = new ReplaySubject<R | undefined>(1);\n\n private pendingResult: R | undefined;\n private closeFocusOrigin: FocusOrigin | undefined;\n\n constructor(\n private readonly cdkRef: CdkDialogRef<R, C>,\n readonly config: TwDialogConfig<unknown, R>,\n readonly containerInstance: DialogContainer,\n ) {\n this.id = cdkRef.id;\n this.disableClose = config.disableClose;\n this.state = this.stateSignal.asReadonly();\n\n cdkRef.addPanelClass('tw-dialog-panel');\n\n const animationChanges = containerInstance.animationStateChanged;\n\n animationChanges\n .pipe(\n filter((event) => event.state === 'open'),\n take(1),\n )\n .subscribe(() => {\n this.stateSignal.set('open');\n this.afterOpenedSubject.next();\n this.afterOpenedSubject.complete();\n });\n\n // The container owns the exit-animation fallback timer (see\n // ANIMATION_FALLBACK_PADDING in dialog-container.ts), so we trust its\n // `closed` emission and run finishClose exactly once from here.\n animationChanges\n .pipe(\n filter((event) => event.state === 'closed'),\n take(1),\n )\n .subscribe(() => this.finishClose());\n\n cdkRef.overlayRef.detachments().subscribe(() => {\n if (this.stateSignal() !== 'closed') {\n this.beforeClosedSubject.next(this.pendingResult);\n this.beforeClosedSubject.complete();\n this.finishClose();\n }\n });\n\n merge(\n cdkRef.backdropClick,\n cdkRef.keydownEvents.pipe(\n filter(\n (event) => event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event),\n ),\n ),\n ).subscribe((event) => {\n if (this.disableClose) return;\n event.preventDefault();\n this.closeWithOrigin(event.type === 'keydown' ? 'keyboard' : 'mouse');\n });\n }\n\n /**\n * Closes the dialog. The exit animation runs before the overlay is disposed.\n * @param result Value forwarded to `afterClosed()` subscribers.\n */\n close(result?: R): void {\n this.closeWithOrigin('program', result);\n }\n\n /** Observable that emits once after the enter animation finishes. */\n afterOpened(): Observable<void> {\n return this.afterOpenedSubject.asObservable();\n }\n\n /** Observable that emits once when the close animation starts. */\n beforeClosed(): Observable<R | undefined> {\n return this.beforeClosedSubject.asObservable();\n }\n\n /** Observable that emits once after the dialog has fully closed and the overlay is disposed. */\n afterClosed(): Observable<R | undefined> {\n return this.afterClosedSubject.asObservable();\n }\n\n /** Backdrop click stream (emits even when `disableClose` is set). */\n backdropClick(): Observable<MouseEvent> {\n return this.cdkRef.backdropClick;\n }\n\n /** Keydown event stream for the overlay. */\n keydownEvents(): Observable<KeyboardEvent> {\n return this.cdkRef.keydownEvents;\n }\n\n /** Updates the dialog's width/height. Pass empty string to reset a dimension. */\n updateSize(width: string | number = '', height: string | number = ''): this {\n this.cdkRef.updateSize(width, height);\n return this;\n }\n\n /** Adds CSS classes to the overlay panel. */\n addPanelClass(classes: string | string[]): this {\n this.cdkRef.addPanelClass(classes);\n return this;\n }\n\n /** Removes CSS classes from the overlay panel. */\n removePanelClass(classes: string | string[]): this {\n this.cdkRef.removePanelClass(classes);\n return this;\n }\n\n private closeWithOrigin(origin: FocusOrigin, result?: R): void {\n if (this.stateSignal() === 'closing' || this.stateSignal() === 'closed') return;\n\n const predicate = this.config.closePredicate;\n if (\n predicate &&\n !predicate(\n result,\n this.config as unknown as Parameters<typeof predicate>[1],\n this.componentInstance,\n )\n ) {\n return;\n }\n\n this.pendingResult = result;\n this.closeFocusOrigin = origin;\n this.stateSignal.set('closing');\n\n this.beforeClosedSubject.next(result);\n this.beforeClosedSubject.complete();\n\n this.cdkRef.overlayRef.detachBackdrop();\n this.containerInstance._startExitAnimation();\n }\n\n private finishClose(): void {\n if (this.stateSignal() === 'closed') return;\n this.stateSignal.set('closed');\n\n this.afterClosedSubject.next(this.pendingResult);\n this.afterClosedSubject.complete();\n\n if (this.cdkRef.containerInstance) {\n this.cdkRef.close(this.pendingResult, { focusOrigin: this.closeFocusOrigin });\n }\n\n this.componentInstance = null;\n }\n}\n","import {\n type ComponentRef,\n inject,\n Injectable,\n Injector,\n type OnDestroy,\n type Provider,\n type StaticProvider,\n type TemplateRef,\n signal,\n type Signal,\n makeEnvironmentProviders,\n type EnvironmentProviders,\n} from '@angular/core';\nimport { Dialog, DialogConfig as CdkDialogConfig } from '@angular/cdk/dialog';\nimport {\n createBlockScrollStrategy,\n createCloseScrollStrategy,\n createNoopScrollStrategy,\n createRepositionScrollStrategy,\n type ScrollStrategy,\n} from '@angular/cdk/overlay';\nimport type { ComponentType } from '@angular/cdk/portal';\nimport { defer, type Observable, startWith, Subject } from 'rxjs';\nimport {\n TW_DIALOG_DATA,\n TW_DIALOG_DEFAULT_OPTIONS,\n TwDialogConfig,\n type TwDialogScrollStrategy,\n} from './dialog-config';\nimport { DialogContainer } from './dialog-container';\nimport { TwDialogRef } from './dialog-ref';\n\n/**\n * Opens Tailwind-styled modal dialogs. Composes `@angular/cdk/dialog` for focus\n * trapping, portals, overlay plumbing, and adds a Tailwind container, richer\n * ref API, and animation lifecycle.\n *\n * Not `providedIn: 'root'` — register it via {@link provideTwDialog}.\n */\n@Injectable()\nexport class TwDialog implements OnDestroy {\n private readonly cdkDialog = inject(Dialog);\n private readonly injector = inject(Injector);\n private readonly defaultOptions = inject(TW_DIALOG_DEFAULT_OPTIONS, { optional: true }) ?? {};\n private readonly parentDialog = inject(TwDialog, { optional: true, skipSelf: true });\n\n private readonly openDialogsAtThisLevel = signal<readonly TwDialogRef<unknown, unknown>[]>([]);\n private readonly afterOpenedSubject = new Subject<TwDialogRef<unknown, unknown>>();\n private readonly afterAllClosedSubject = new Subject<void>();\n\n /** Reactively-readable list of currently-open dialogs across the full dialog tree. */\n readonly openDialogs: Signal<readonly TwDialogRef<unknown, unknown>[]> = this.parentDialog\n ? this.parentDialog.openDialogs\n : this.openDialogsAtThisLevel.asReadonly();\n\n /** Emits every time a dialog is opened. */\n readonly afterOpened: Observable<TwDialogRef<unknown, unknown>> = this.parentDialog\n ? this.parentDialog.afterOpened\n : this.afterOpenedSubject.asObservable();\n\n /**\n * Emits when every open dialog has closed. Emits immediately on subscribe if\n * there are none open.\n */\n readonly afterAllClosed: Observable<void> = defer(() =>\n this.openDialogs().length\n ? this.getAfterAllClosedSource()\n : this.getAfterAllClosedSource().pipe(startWith(undefined as void)),\n );\n\n /**\n * Opens a dialog using the given component or template.\n * @param content Component class or `TemplateRef`.\n * @param config Options merged over the application defaults.\n * @returns Reference controlling the opened dialog.\n */\n open<R = unknown, D = unknown, C = unknown>(\n content: ComponentType<C> | TemplateRef<C>,\n config?: TwDialogConfig<D, R>,\n ): TwDialogRef<R, C> {\n const merged = this.resolveConfig<D, R>(config);\n let twRef!: TwDialogRef<R, C>;\n\n const cdkRef = this.cdkDialog.open<R, D, C>(content, {\n id: merged.id,\n role: merged.role,\n data: merged.data,\n panelClass: merged.panelClass,\n backdropClass: merged.backdropClass ?? 'tw-dialog-backdrop',\n hasBackdrop: merged.hasBackdrop,\n width: merged.width,\n height: merged.height,\n minWidth: merged.minWidth,\n minHeight: merged.minHeight,\n maxWidth: merged.maxWidth,\n maxHeight: merged.maxHeight,\n direction: merged.direction,\n ariaDescribedBy: merged.ariaDescribedBy,\n ariaLabelledBy: merged.ariaLabelledBy,\n ariaLabel: merged.ariaLabel,\n ariaModal: merged.ariaModal,\n autoFocus: merged.autoFocus,\n restoreFocus: merged.restoreFocus,\n scrollStrategy: merged.scrollStrategy ?? this.resolveScrollStrategy(merged.scrollBehavior),\n closeOnNavigation: merged.closeOnNavigation,\n viewContainerRef: merged.viewContainerRef,\n injector: merged.injector,\n // We handle close/Escape/backdrop ourselves so we can run the exit animation.\n disableClose: true,\n closeOnOverlayDetachments: false,\n container: {\n type: DialogContainer,\n providers: () => [\n { provide: TwDialogConfig, useValue: merged },\n { provide: CdkDialogConfig, useValue: merged },\n ],\n },\n providers: (_cdkRef, _cdkConfig, container) => {\n twRef = new TwDialogRef<R, C>(\n _cdkRef,\n merged as unknown as TwDialogConfig<unknown, R>,\n container as DialogContainer,\n );\n const providers: StaticProvider[] = [\n { provide: TwDialogRef, useValue: twRef },\n { provide: TW_DIALOG_DATA, useValue: merged.data ?? null },\n ];\n if (Array.isArray(merged.providers)) providers.push(...merged.providers);\n return providers;\n },\n });\n\n // After CDK attaches the component, copy references onto our ref.\n (twRef as { componentRef: ComponentRef<C> | null }).componentRef = cdkRef.componentRef;\n twRef.componentInstance = cdkRef.componentInstance as C | null;\n\n const scope = this.parentDialog ?? this;\n scope.registerOpen(twRef as unknown as TwDialogRef<unknown, unknown>);\n\n twRef.afterClosed().subscribe(() => {\n scope.unregister(twRef as unknown as TwDialogRef<unknown, unknown>);\n });\n\n return twRef;\n }\n\n /** Closes every open dialog managed by this service (and child services). */\n closeAll(): void {\n const dialogs = [...this.openDialogs()];\n for (let i = dialogs.length - 1; i >= 0; i--) dialogs[i].close();\n }\n\n /** Looks up an open dialog by its id. */\n getDialogById<R = unknown, C = unknown>(id: string): TwDialogRef<R, C> | undefined {\n return this.openDialogs().find((dialog) => dialog.id === id) as TwDialogRef<R, C> | undefined;\n }\n\n ngOnDestroy(): void {\n const dialogs = [...this.openDialogsAtThisLevel()];\n for (let i = dialogs.length - 1; i >= 0; i--) dialogs[i].close();\n this.afterOpenedSubject.complete();\n this.afterAllClosedSubject.complete();\n }\n\n private registerOpen(ref: TwDialogRef<unknown, unknown>): void {\n if (this.parentDialog) {\n this.parentDialog.registerOpen(ref);\n } else {\n this.openDialogsAtThisLevel.update((list) => [...list, ref]);\n this.afterOpenedSubject.next(ref);\n }\n }\n\n private unregister(ref: TwDialogRef<unknown, unknown>): void {\n if (this.parentDialog) {\n this.parentDialog.unregister(ref);\n } else {\n this.openDialogsAtThisLevel.update((list) => list.filter((d) => d !== ref));\n if (this.openDialogsAtThisLevel().length === 0) {\n this.afterAllClosedSubject.next();\n }\n }\n }\n\n private getAfterAllClosedSource(): Subject<void> {\n return this.parentDialog\n ? this.parentDialog.getAfterAllClosedSource()\n : this.afterAllClosedSubject;\n }\n\n private resolveConfig<D, R>(config: TwDialogConfig<D, R> | undefined): TwDialogConfig<D, R> {\n const merged = new TwDialogConfig<D, R>();\n Object.assign(merged, this.defaultOptions, config);\n return merged;\n }\n\n private resolveScrollStrategy(\n strategy: TwDialogScrollStrategy | undefined,\n ): ScrollStrategy {\n switch (strategy) {\n case 'close':\n return createCloseScrollStrategy(this.injector);\n case 'reposition':\n return createRepositionScrollStrategy(this.injector);\n case 'noop':\n return createNoopScrollStrategy();\n case 'block':\n default:\n return createBlockScrollStrategy(this.injector);\n }\n }\n}\n\n/**\n * Registers the {@link TwDialog} service for dependency injection.\n *\n * @param defaultOptions Optional defaults merged into every `open()` call.\n * @example\n * ```ts\n * provideTwDialog({ size: 'lg', hasBackdrop: true })\n * ```\n */\nexport function provideTwDialog(\n defaultOptions?: Partial<TwDialogConfig>,\n): EnvironmentProviders {\n const providers: Provider[] = [TwDialog];\n if (defaultOptions) {\n providers.push({ provide: TW_DIALOG_DEFAULT_OPTIONS, useValue: defaultOptions });\n }\n return makeEnvironmentProviders(providers);\n}\n","import {\n computed,\n Directive,\n inject,\n input,\n type OnDestroy,\n type OnInit,\n} from '@angular/core';\nimport { _IdGenerator } from '@angular/cdk/a11y';\nimport { CdkScrollable } from '@angular/cdk/scrolling';\nimport type { TwColor } from '@cdevhub/ngx-tw/core';\nimport { TwDialogRef } from './dialog-ref';\nimport { DialogContainer } from './dialog-container';\n\n/**\n * Header wrapper for a dialog. Provides consistent padding and spacing for\n * title + subtitle + leading icon, and separates the header from scrollable\n * content below.\n */\n@Directive({\n selector: '[twDialogHeader], tw-dialog-header',\n host: {\n class: 'flex items-start gap-3 px-6 pt-6 pb-4',\n },\n})\nexport class DialogHeaderDirective {}\n\n// Slot tokens own light/dark contrast — no `dark:` overrides, no shade picks.\n// See role slot conventions in `projects/ngx-tw/theme/_semantic.css`.\nconst ICON_COLOR_CLASSES: Record<TwColor, string> = {\n primary: 'bg-primary-soft text-primary-icon',\n secondary: 'bg-secondary-soft text-secondary-icon',\n accent: 'bg-accent-soft text-accent-icon',\n neutral: 'bg-neutral-soft text-neutral-icon',\n info: 'bg-info-soft text-info-icon',\n success: 'bg-success-soft text-success-icon',\n warning: 'bg-warning-soft text-warning-icon',\n error: 'bg-error-soft text-error-icon',\n};\n\n/**\n * Decorative leading icon for a dialog header. Use with a semantic `color` to\n * match destructive / informational / success dialogs.\n */\n@Directive({\n selector: '[twDialogIcon]',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class DialogIconDirective {\n /** Semantic color for the icon container. Defaults to a neutral surface. */\n readonly color = input<TwColor | undefined>(undefined);\n\n protected readonly classes = computed(() => {\n const base = 'flex size-10 shrink-0 items-center justify-center rounded-full';\n const color = this.color();\n return color ? `${base} ${ICON_COLOR_CLASSES[color]}` : `${base} bg-surface-muted text-fg`;\n });\n}\n\n/**\n * Dialog title. Registers its ID with the container's `aria-labelledby` queue\n * so screen readers announce it automatically.\n */\n@Directive({\n selector: '[twDialogTitle], tw-dialog-title',\n host: {\n class: 'text-sm font-semibold text-fg',\n '[id]': 'id()',\n },\n})\nexport class DialogTitleDirective implements OnInit, OnDestroy {\n private readonly generatedId = inject(_IdGenerator).getId('tw-dialog-title-');\n private readonly dialogRef = inject<TwDialogRef<unknown, unknown>>(TwDialogRef, {\n optional: true,\n });\n // Ancestor-DI fallback for the rare case where `TwDialogRef` is not in the\n // directive's injector chain (e.g. heavily nested template portals). The\n // container ALWAYS resolves via element-injector traversal because the\n // directive lives inside `<tw-dialog-container>`'s DOM tree.\n private readonly container = inject(DialogContainer, { optional: true, skipSelf: true });\n\n /** Custom id for the title element. Defaults to a generated unique id. */\n readonly id = input<string>(this.generatedId);\n\n ngOnInit(): void {\n const containerInstance = this.dialogRef?.containerInstance ?? this.container;\n if (containerInstance) containerInstance._addAriaLabelledBy(this.id());\n }\n\n ngOnDestroy(): void {\n const containerInstance = this.dialogRef?.containerInstance ?? this.container;\n if (containerInstance) containerInstance._removeAriaLabelledBy(this.id());\n }\n}\n\n/** Secondary line beneath the dialog title — intended for a short description. */\n@Directive({\n selector: '[twDialogSubtitle], tw-dialog-subtitle',\n host: {\n class: 'text-sm text-fg-muted',\n },\n})\nexport class DialogSubtitleDirective {}\n\n/**\n * Dialog description. Registers its ID with the container's `aria-describedby`\n * queue so screen readers announce the descriptive paragraph after the title.\n * Mirrors {@link DialogTitleDirective} but for `aria-describedby`.\n */\n@Directive({\n selector: '[twDialogDescription], tw-dialog-description',\n host: {\n '[id]': 'id()',\n },\n})\nexport class DialogDescriptionDirective implements OnInit, OnDestroy {\n private readonly generatedId = inject(_IdGenerator).getId('tw-dialog-description-');\n private readonly dialogRef = inject<TwDialogRef<unknown, unknown>>(TwDialogRef, {\n optional: true,\n });\n // Ancestor-DI fallback — see DialogTitleDirective.\n private readonly container = inject(DialogContainer, { optional: true, skipSelf: true });\n\n /** Custom id for the description element. Defaults to a generated unique id. */\n readonly id = input<string>(this.generatedId);\n\n ngOnInit(): void {\n const containerInstance = this.dialogRef?.containerInstance ?? this.container;\n if (containerInstance) containerInstance._addAriaDescribedBy(this.id());\n }\n\n ngOnDestroy(): void {\n const containerInstance = this.dialogRef?.containerInstance ?? this.container;\n if (containerInstance) containerInstance._removeAriaDescribedBy(this.id());\n }\n}\n\n/**\n * Scrollable content region of the dialog. Apply between the header and the\n * actions bar. Inherits CDK's `CdkScrollable` to play nicely with scroll\n * strategies and nested scrollables.\n */\n@Directive({\n selector: '[twDialogContent], tw-dialog-content',\n hostDirectives: [CdkScrollable],\n host: {\n class: 'flex-1 overflow-y-auto px-6 py-4 text-sm text-fg',\n },\n})\nexport class DialogContentDirective {}\n\n/** Horizontal alignment for dialog action buttons. */\nexport type DialogActionsAlign = 'start' | 'center' | 'end';\n\n/**\n * Bottom action bar of a dialog. Use inside the dialog content or template to\n * host Cancel/Confirm buttons. Stays pinned below scrollable content.\n */\n@Directive({\n selector: '[twDialogActions], tw-dialog-actions',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class DialogActionsDirective {\n /** Horizontal alignment of the action buttons. Defaults to `'end'`. */\n readonly align = input<DialogActionsAlign>('end');\n\n protected readonly classes = computed(() => {\n const align = this.align();\n const justify =\n align === 'start' ? 'justify-start' : align === 'center' ? 'justify-center' : 'justify-end';\n return `flex flex-wrap items-center gap-2 px-6 py-4 border-t border-border-muted ${justify}`;\n });\n}\n\n/**\n * Closes the enclosing dialog when the host button is clicked. Provide a\n * `[twDialogClose]` value to pass a result to `afterClosed()` subscribers.\n */\n@Directive({\n selector: '[twDialogClose]',\n host: {\n '(click)': 'onClick()',\n '[attr.type]': 'type()',\n },\n})\nexport class DialogCloseDirective {\n /** Value passed to `afterClosed()` when the button is clicked. */\n readonly twDialogClose = input<unknown>(undefined);\n\n /** Native button `type`. Defaults to `'button'` to avoid accidental form submission. */\n readonly type = input<'button' | 'submit' | 'reset'>('button');\n\n private readonly dialogRef = inject<TwDialogRef<unknown, unknown>>(TwDialogRef, {\n optional: true,\n });\n\n protected onClick(): void {\n this.dialogRef?.close(this.twDialogClose());\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["CdkDialogConfig"],"mappings":";;;;;;;;;;;;;AAuBA;;;;;AAKG;AACG,MAAO,cAAyC,SAAQA,YAAqB,CAAA;;IAEjF,IAAI,GAA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A,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,aAAa,EAAE,QAAQ;AACxB,qBAAA;AACF,iBAAA;;;AC5LD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cdevhub-ngx-tw-dialog.mjs","sources":["../../../projects/ngx-tw/dialog/dialog-config.ts","../../../projects/ngx-tw/dialog/dialog-ref.ts","../../../projects/ngx-tw/dialog/dialog.ts","../../../projects/ngx-tw/dialog/dialog-content.ts","../../../projects/ngx-tw/dialog/cdevhub-ngx-tw-dialog.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport {\n type AutoFocusTarget,\n DialogConfig as CdkDialogConfig,\n type DialogRole,\n type RestoreFocusValue,\n} from '@angular/cdk/dialog';\n\n/** Preset sizes mapped to width constraints for the dialog panel. */\nexport type TwDialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen';\n\n/** ARIA role of the dialog element. Use `'alertdialog'` for destructive confirmation prompts. */\nexport type TwDialogRole = DialogRole;\n\n/** Where to move focus when the dialog opens. */\nexport type TwDialogAutoFocus = AutoFocusTarget | string | boolean;\n\n/** How to restore focus on close. `true` restores to the previously focused element; a selector or element targets a specific node. */\nexport type TwDialogRestoreFocus = RestoreFocusValue;\n\n/** Scroll behavior for content underneath the dialog. */\nexport type TwDialogScrollStrategy = 'block' | 'close' | 'reposition' | 'noop';\n\n/**\n * Configuration for opening a dialog with {@link TwDialog.open}.\n *\n * Mirrors the shape of `@angular/cdk/dialog`'s `DialogConfig` with additional\n * tailwind-focused options (`size`, `enterAnimationDuration`, etc.).\n */\nexport class TwDialogConfig<D = unknown, R = unknown> extends CdkDialogConfig<D, R> {\n /** Preset size for the dialog panel. Ignored when `width`/`maxWidth` are provided. Defaults to `'md'`. */\n size?: TwDialogSize = 'md';\n\n /** Duration of the open animation in ms. Defaults to `150`. Use `0` to disable. */\n enterAnimationDuration?: number = 150;\n\n /**\n * Duration of the close animation in ms. Defaults to `120`. Use `0` to disable.\n * Asymmetric with `enterAnimationDuration` by design: the close transition is\n * slightly faster so the dialog feels dismissive rather than reluctant.\n */\n exitAnimationDuration?: number = 120;\n\n /** Scroll strategy preset applied when `scrollStrategy` isn't set. Defaults to `'block'`. */\n scrollBehavior?: TwDialogScrollStrategy = 'block';\n\n /** Maximum width. Number values are treated as pixels. Defaults to `'calc(100vw - 32px)'`. */\n override maxWidth?: number | string = 'calc(100vw - 32px)';\n\n /**\n * Whether the dialog is modal — sets `aria-modal` on the container.\n * Defaults to `true`: a `role=\"dialog\"` opened over the page is modal by\n * default and the rest of the document is inert while it is open. Set to\n * `false` only for non-modal surfaces (rare; consider `popover` instead).\n */\n override ariaModal?: boolean = true;\n\n /** Whether Escape and backdrop clicks are blocked. Defaults to `false`. */\n override disableClose?: boolean = false;\n\n /** Where to move focus when the dialog opens. Defaults to `'first-tabbable'`. */\n override autoFocus?: TwDialogAutoFocus = 'first-tabbable';\n\n /** Whether to restore focus to the previously focused element after close. Defaults to `true`. */\n override restoreFocus?: TwDialogRestoreFocus = true;\n\n /** Whether the dialog renders a backdrop. Defaults to `true`. */\n override hasBackdrop?: boolean = true;\n\n /** Whether navigation (e.g. router) closes the dialog. Defaults to `true`. */\n override closeOnNavigation?: boolean = true;\n}\n\n/** Injection token carrying the `data` value passed via {@link TwDialogConfig.data}. */\nexport const TW_DIALOG_DATA = new InjectionToken<unknown>('TW_DIALOG_DATA');\n\n/** Injection token for application-wide default dialog options. Set via `provideTwDialog()`. */\nexport const TW_DIALOG_DEFAULT_OPTIONS = new InjectionToken<Partial<TwDialogConfig>>(\n 'TW_DIALOG_DEFAULT_OPTIONS',\n);\n","import { type ComponentRef, signal, type Signal } from '@angular/core';\nimport { type DialogRef as CdkDialogRef } from '@angular/cdk/dialog';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { filter, merge, type Observable, ReplaySubject, Subject, take } from 'rxjs';\nimport type { FocusOrigin } from '@angular/cdk/a11y';\nimport type { TwDialogConfig } from './dialog-config';\nimport type { DialogContainer, DialogState } from './dialog-container';\n\n/**\n * Reference to a dialog opened via {@link TwDialog.open}. Drives the dialog\n * lifecycle (close, state, observables) and forwards useful overlay streams.\n *\n * The ref is returned **synchronously** from `open()`, but the dialog's render\n * layer (`@angular/cdk/dialog` + the Tailwind container) is loaded through a\n * dynamic `import()`. The ref therefore starts *detached*: `id`, `state`,\n * `close()`, the lifecycle observables, and panel/size mutations all work\n * immediately (mutations are buffered and replayed on attach), but the rendered\n * component instance does not exist yet — read it via {@link whenComponentReady}\n * instead of a synchronous `componentInstance` field.\n */\nexport class TwDialogRef<R = unknown, C = unknown> {\n /** Unique ID of the dialog. Generated eagerly by the service, so it is valid the instant `open()` returns. */\n readonly id: string;\n\n /** Current lifecycle state. Reactively readable. */\n readonly state: Signal<DialogState>;\n\n /** When `true`, close-via-escape and close-via-backdrop are disabled. */\n disableClose: boolean | undefined;\n\n private readonly stateSignal = signal<DialogState>('opening');\n private readonly afterOpenedSubject = new ReplaySubject<void>(1);\n private readonly beforeClosedSubject = new ReplaySubject<R | undefined>(1);\n private readonly afterClosedSubject = new ReplaySubject<R | undefined>(1);\n // Facade-owned pass-throughs for the raw overlay streams, so a consumer that\n // subscribes before the render chunk attaches still receives events once it\n // does — the pre-deferral behaviour when `open()` wrapped a live `cdkRef`.\n private readonly backdropClickSubject = new Subject<MouseEvent>();\n private readonly keydownEventsSubject = new Subject<KeyboardEvent>();\n\n private cdkRef: CdkDialogRef<R, C> | null = null;\n private container: DialogContainer | null = null;\n\n private componentInstanceValue: C | null = null;\n private componentRefValue: ComponentRef<C> | null = null;\n private resolveComponentReady!: (value: C | null) => void;\n private readonly componentReadyPromise = new Promise<C | null>((resolve) => {\n this.resolveComponentReady = resolve;\n });\n\n // Buffered mutations issued before the render chunk attached the CDK backend.\n private readonly pendingPanelAdds: string[] = [];\n private readonly pendingPanelRemoves: string[] = [];\n private pendingSize: [string | number, string | number] | null = null;\n\n private pendingResult: R | undefined;\n private closeFocusOrigin: FocusOrigin | undefined;\n\n constructor(id: string, readonly config: TwDialogConfig<unknown, R>) {\n this.id = id;\n this.disableClose = config.disableClose;\n this.state = this.stateSignal.asReadonly();\n }\n\n /** The Tailwind container instance, or `null` until the dialog has attached. */\n get containerInstance(): DialogContainer | null {\n return this.container;\n }\n\n /**\n * @internal Wire this facade to its CDK backend. Called from the dialog\n * renderer **inside** `cdkDialog.open()`'s `providers` callback — the same\n * point the constructor ran before deferral — so subscriptions to\n * `animationStateChanged` are in place before the container emits `'open'`.\n */\n _attach(cdkRef: CdkDialogRef<R, C>, container: DialogContainer): void {\n this.cdkRef = cdkRef;\n this.container = container;\n\n // Forward the raw overlay streams into the facade pass-throughs.\n cdkRef.backdropClick.subscribe(this.backdropClickSubject);\n cdkRef.keydownEvents.subscribe(this.keydownEventsSubject);\n\n cdkRef.addPanelClass('tw-dialog-panel');\n for (const cls of this.pendingPanelAdds) cdkRef.addPanelClass(cls);\n for (const cls of this.pendingPanelRemoves) cdkRef.removePanelClass(cls);\n if (this.pendingSize) cdkRef.updateSize(this.pendingSize[0], this.pendingSize[1]);\n this.pendingPanelAdds.length = 0;\n this.pendingPanelRemoves.length = 0;\n this.pendingSize = null;\n\n const animationChanges = container.animationStateChanged;\n\n animationChanges\n .pipe(\n filter((event) => event.state === 'open'),\n take(1),\n )\n .subscribe(() => {\n this.stateSignal.set('open');\n this.afterOpenedSubject.next();\n this.afterOpenedSubject.complete();\n });\n\n // The container owns the exit-animation fallback timer (see\n // ANIMATION_FALLBACK_PADDING in dialog-container.ts), so we trust its\n // `closed` emission and run finishClose exactly once from here.\n animationChanges\n .pipe(\n filter((event) => event.state === 'closed'),\n take(1),\n )\n .subscribe(() => this.finishClose());\n\n cdkRef.overlayRef.detachments().subscribe(() => {\n if (this.stateSignal() !== 'closed') {\n this.beforeClosedSubject.next(this.pendingResult);\n this.beforeClosedSubject.complete();\n this.finishClose();\n }\n });\n\n merge(\n cdkRef.backdropClick,\n cdkRef.keydownEvents.pipe(\n filter(\n (event) => event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event),\n ),\n ),\n ).subscribe((event) => {\n if (this.disableClose) return;\n event.preventDefault();\n this.closeWithOrigin(event.type === 'keydown' ? 'keyboard' : 'mouse');\n });\n }\n\n /** @internal Record the rendered component after `cdkDialog.open()` returns. */\n _setComponent(instance: C | null, ref: ComponentRef<C> | null): void {\n this.componentInstanceValue = instance;\n this.componentRefValue = ref;\n this.resolveComponentReady(instance);\n }\n\n /**\n * Resolves with the rendered content-component instance once the dialog's\n * render chunk has loaded and attached. Resolves `null` for template dialogs,\n * and for a dialog closed before it ever opened.\n *\n * Replaces the former synchronous `componentInstance` field, which cannot be\n * populated before the deferred render chunk lands.\n *\n * @example\n * ```ts\n * const ref = dialog.open(EditorDialog);\n * const editor = await ref.whenComponentReady();\n * editor?.focusFirstField();\n * ```\n */\n whenComponentReady(): Promise<C | null> {\n return this.componentReadyPromise;\n }\n\n /** The rendered component instance, or `null` if not yet attached / a template dialog. Prefer {@link whenComponentReady}. */\n get componentInstance(): C | null {\n return this.componentInstanceValue;\n }\n\n /** The rendered `ComponentRef`, or `null` if not yet attached / a template dialog. */\n get componentRef(): ComponentRef<C> | null {\n return this.componentRefValue;\n }\n\n /**\n * Closes the dialog. The exit animation runs before the overlay is disposed.\n * @param result Value forwarded to `afterClosed()` subscribers.\n */\n close(result?: R): void {\n this.closeWithOrigin('program', result);\n }\n\n /** Observable that emits once after the enter animation finishes. */\n afterOpened(): Observable<void> {\n return this.afterOpenedSubject.asObservable();\n }\n\n /** Observable that emits once when the close animation starts. */\n beforeClosed(): Observable<R | undefined> {\n return this.beforeClosedSubject.asObservable();\n }\n\n /** Observable that emits once after the dialog has fully closed and the overlay is disposed. */\n afterClosed(): Observable<R | undefined> {\n return this.afterClosedSubject.asObservable();\n }\n\n /** Backdrop click stream (emits even when `disableClose` is set). Buffered — a subscription made before the dialog attaches receives events once it does. */\n backdropClick(): Observable<MouseEvent> {\n return this.backdropClickSubject.asObservable();\n }\n\n /** Keydown event stream for the overlay. Buffered — a subscription made before the dialog attaches receives events once it does. */\n keydownEvents(): Observable<KeyboardEvent> {\n return this.keydownEventsSubject.asObservable();\n }\n\n /** Updates the dialog's width/height. Pass empty string to reset a dimension. Buffered until attach. */\n updateSize(width: string | number = '', height: string | number = ''): this {\n if (this.cdkRef) {\n this.cdkRef.updateSize(width, height);\n } else {\n this.pendingSize = [width, height];\n }\n return this;\n }\n\n /** Adds CSS classes to the overlay panel. Buffered until attach. */\n addPanelClass(classes: string | string[]): this {\n if (this.cdkRef) {\n this.cdkRef.addPanelClass(classes);\n } else {\n this.pendingPanelAdds.push(...(Array.isArray(classes) ? classes : [classes]));\n }\n return this;\n }\n\n /** Removes CSS classes from the overlay panel. Buffered until attach. */\n removePanelClass(classes: string | string[]): this {\n if (this.cdkRef) {\n this.cdkRef.removePanelClass(classes);\n } else {\n this.pendingPanelRemoves.push(...(Array.isArray(classes) ? classes : [classes]));\n }\n return this;\n }\n\n private closeWithOrigin(origin: FocusOrigin, result?: R): void {\n if (this.stateSignal() === 'closing' || this.stateSignal() === 'closed') return;\n\n const predicate = this.config.closePredicate;\n if (\n predicate &&\n !predicate(\n result,\n this.config as unknown as Parameters<typeof predicate>[1],\n this.componentInstanceValue,\n )\n ) {\n return;\n }\n\n this.pendingResult = result;\n this.closeFocusOrigin = origin;\n this.stateSignal.set('closing');\n\n this.beforeClosedSubject.next(result);\n this.beforeClosedSubject.complete();\n\n if (!this.cdkRef) {\n // Closed before the render chunk attached: the overlay was never created,\n // so there is nothing to animate or dispose. Synthesize the closed state\n // and let the service skip opening entirely (it checks state()).\n this.finishClose();\n return;\n }\n\n this.cdkRef.overlayRef.detachBackdrop();\n this.container!._startExitAnimation();\n }\n\n private finishClose(): void {\n if (this.stateSignal() === 'closed') return;\n this.stateSignal.set('closed');\n\n this.afterClosedSubject.next(this.pendingResult);\n this.afterClosedSubject.complete();\n\n // Idempotent — a no-op if _setComponent already resolved with an instance.\n this.resolveComponentReady(null);\n this.backdropClickSubject.complete();\n this.keydownEventsSubject.complete();\n\n if (this.cdkRef?.containerInstance) {\n this.cdkRef.close(this.pendingResult, { focusOrigin: this.closeFocusOrigin });\n }\n\n this.componentInstanceValue = null;\n }\n}\n","import {\n inject,\n Injectable,\n Injector,\n type OnDestroy,\n type Provider,\n type TemplateRef,\n signal,\n type Signal,\n makeEnvironmentProviders,\n type EnvironmentProviders,\n} from '@angular/core';\nimport type { ComponentType } from '@angular/cdk/portal';\nimport { defer, type Observable, startWith, Subject } from 'rxjs';\nimport {\n TW_DIALOG_DEFAULT_OPTIONS,\n TwDialogConfig,\n} from './dialog-config';\nimport { TwDialogRef } from './dialog-ref';\n// Type-only: importing the renderer as a value would drag `@angular/cdk/dialog`\n// and the overlay scroll strategies back into the eager chunk. See\n// `dialog-renderer.ts`.\nimport type { openRenderedDialog } from './dialog-renderer';\n\nlet nextDialogId = 0;\n\nfunction generateDialogId(): string {\n return `tw-dialog-${++nextDialogId}`;\n}\n\n/**\n * Opens Tailwind-styled modal dialogs. Composes `@angular/cdk/dialog` for focus\n * trapping, portals, overlay plumbing, and adds a Tailwind container, richer\n * ref API, and animation lifecycle.\n *\n * The rendering layer (`@angular/cdk/dialog` + the Tailwind container) is loaded\n * through a dynamic `import()` on the first `open()` call, so merely registering\n * this service costs nothing in the initial bundle. `open()` still returns its\n * {@link TwDialogRef} synchronously — the dialog is rendered once the chunk\n * lands. Read the rendered component via {@link TwDialogRef.whenComponentReady}.\n *\n * Not `providedIn: 'root'` — register it via {@link provideTwDialog}.\n */\n@Injectable()\nexport class TwDialog implements OnDestroy {\n private readonly injector = inject(Injector);\n private readonly defaultOptions = inject(TW_DIALOG_DEFAULT_OPTIONS, { optional: true }) ?? {};\n private readonly parentDialog = inject(TwDialog, { optional: true, skipSelf: true });\n\n /** Cached renderer chunk import — kicked off on the first `open()`. */\n private rendererPromise: Promise<typeof openRenderedDialog | null> | null = null;\n private destroyed = false;\n\n private readonly openDialogsAtThisLevel = signal<readonly TwDialogRef<unknown, unknown>[]>([]);\n private readonly afterOpenedSubject = new Subject<TwDialogRef<unknown, unknown>>();\n private readonly afterAllClosedSubject = new Subject<void>();\n\n /** Reactively-readable list of currently-open dialogs across the full dialog tree. */\n readonly openDialogs: Signal<readonly TwDialogRef<unknown, unknown>[]> = this.parentDialog\n ? this.parentDialog.openDialogs\n : this.openDialogsAtThisLevel.asReadonly();\n\n /** Emits every time a dialog is opened. */\n readonly afterOpened: Observable<TwDialogRef<unknown, unknown>> = this.parentDialog\n ? this.parentDialog.afterOpened\n : this.afterOpenedSubject.asObservable();\n\n /**\n * Emits when every open dialog has closed. Emits immediately on subscribe if\n * there are none open.\n */\n readonly afterAllClosed: Observable<void> = defer(() =>\n this.openDialogs().length\n ? this.getAfterAllClosedSource()\n : this.getAfterAllClosedSource().pipe(startWith(undefined as void)),\n );\n\n /**\n * Opens a dialog using the given component or template.\n * @param content Component class or `TemplateRef`.\n * @param config Options merged over the application defaults.\n * @returns Reference controlling the opened dialog, returned synchronously.\n */\n open<R = unknown, D = unknown, C = unknown>(\n content: ComponentType<C> | TemplateRef<C>,\n config?: TwDialogConfig<D, R>,\n ): TwDialogRef<R, C> {\n const merged = this.resolveConfig<D, R>(config);\n const id = merged.id ?? generateDialogId();\n merged.id = id;\n\n // Enforce id uniqueness eagerly. CDK throws this synchronously from\n // `open()`; since our CDK open is now deferred, replicate the check here so\n // the error still surfaces at the call site rather than in a later tick.\n if (this.getDialogById(id)) {\n throw new Error(`Dialog with id \"${id}\" exists already. The dialog id must be unique.`);\n }\n\n const twRef = new TwDialogRef<R, C>(id, merged as unknown as TwDialogConfig<unknown, R>);\n\n const scope = this.parentDialog ?? this;\n scope.registerOpen(twRef as unknown as TwDialogRef<unknown, unknown>);\n twRef.afterClosed().subscribe(() => {\n scope.unregister(twRef as unknown as TwDialogRef<unknown, unknown>);\n });\n\n void this.renderWhenReady(content, merged, twRef);\n\n return twRef;\n }\n\n /** Closes every open dialog managed by this service (and child services). */\n closeAll(): void {\n const dialogs = [...this.openDialogs()];\n for (let i = dialogs.length - 1; i >= 0; i--) dialogs[i].close();\n }\n\n /** Looks up an open dialog by its id. */\n getDialogById<R = unknown, C = unknown>(id: string): TwDialogRef<R, C> | undefined {\n return this.openDialogs().find((dialog) => dialog.id === id) as TwDialogRef<R, C> | undefined;\n }\n\n ngOnDestroy(): void {\n this.destroyed = true;\n const dialogs = [...this.openDialogsAtThisLevel()];\n for (let i = dialogs.length - 1; i >= 0; i--) dialogs[i].close();\n this.afterOpenedSubject.complete();\n this.afterAllClosedSubject.complete();\n }\n\n /**\n * @internal Resolves once the renderer chunk has loaded. Exposed for tests,\n * which must await the dynamic import before asserting on rendered DOM.\n */\n async _whenRendered(): Promise<void> {\n await this.loadRenderer();\n await Promise.resolve();\n }\n\n /**\n * Render a dialog once the renderer chunk has loaded. The ref was already\n * returned to the caller, so it may have been closed (or the service\n * destroyed) while the import was in flight — both skip the actual open.\n */\n private async renderWhenReady<R, D, C>(\n content: ComponentType<C> | TemplateRef<C>,\n merged: TwDialogConfig<D, R>,\n twRef: TwDialogRef<R, C>,\n ): Promise<void> {\n const openRendered = await this.loadRenderer();\n if (!openRendered || this.destroyed) return;\n // Closed before the chunk landed — the facade already synthesized its\n // closed state; never create the overlay.\n if (twRef.state() === 'closed') return;\n openRendered(this.injector, content, merged, twRef);\n }\n\n private loadRenderer(): Promise<typeof openRenderedDialog | null> {\n if (!this.rendererPromise) {\n this.rendererPromise = import('./dialog-renderer').then(({ openRenderedDialog }) =>\n this.destroyed ? null : openRenderedDialog,\n );\n }\n return this.rendererPromise;\n }\n\n private registerOpen(ref: TwDialogRef<unknown, unknown>): void {\n if (this.parentDialog) {\n this.parentDialog.registerOpen(ref);\n } else {\n this.openDialogsAtThisLevel.update((list) => [...list, ref]);\n this.afterOpenedSubject.next(ref);\n }\n }\n\n private unregister(ref: TwDialogRef<unknown, unknown>): void {\n if (this.parentDialog) {\n this.parentDialog.unregister(ref);\n } else {\n this.openDialogsAtThisLevel.update((list) => list.filter((d) => d !== ref));\n if (this.openDialogsAtThisLevel().length === 0) {\n this.afterAllClosedSubject.next();\n }\n }\n }\n\n private getAfterAllClosedSource(): Subject<void> {\n return this.parentDialog\n ? this.parentDialog.getAfterAllClosedSource()\n : this.afterAllClosedSubject;\n }\n\n private resolveConfig<D, R>(config: TwDialogConfig<D, R> | undefined): TwDialogConfig<D, R> {\n const merged = new TwDialogConfig<D, R>();\n Object.assign(merged, this.defaultOptions, config);\n return merged;\n }\n}\n\n/**\n * Registers the {@link TwDialog} service for dependency injection.\n *\n * @param defaultOptions Optional defaults merged into every `open()` call.\n * @example\n * ```ts\n * provideTwDialog({ size: 'lg', hasBackdrop: true })\n * ```\n */\nexport function provideTwDialog(\n defaultOptions?: Partial<TwDialogConfig>,\n): EnvironmentProviders {\n const providers: Provider[] = [TwDialog];\n if (defaultOptions) {\n providers.push({ provide: TW_DIALOG_DEFAULT_OPTIONS, useValue: defaultOptions });\n }\n return makeEnvironmentProviders(providers);\n}\n","import {\n computed,\n Directive,\n inject,\n input,\n type OnDestroy,\n type OnInit,\n} from '@angular/core';\nimport { _IdGenerator } from '@angular/cdk/a11y';\nimport { CdkScrollable } from '@angular/cdk/scrolling';\nimport type { TwColor } from '@cdevhub/ngx-tw/core';\nimport { TwDialogRef } from './dialog-ref';\n\n/**\n * Header wrapper for a dialog. Provides consistent padding and spacing for\n * title + subtitle + leading icon, and separates the header from scrollable\n * content below.\n */\n@Directive({\n selector: '[twDialogHeader], tw-dialog-header',\n host: {\n class: 'flex items-start gap-3 px-6 pt-6 pb-4',\n },\n})\nexport class DialogHeaderDirective {}\n\n// Slot tokens own light/dark contrast — no `dark:` overrides, no shade picks.\n// See role slot conventions in `projects/ngx-tw/theme/_semantic.css`.\nconst ICON_COLOR_CLASSES: Record<TwColor, string> = {\n primary: 'bg-primary-soft text-primary-icon',\n secondary: 'bg-secondary-soft text-secondary-icon',\n accent: 'bg-accent-soft text-accent-icon',\n neutral: 'bg-neutral-soft text-neutral-icon',\n info: 'bg-info-soft text-info-icon',\n success: 'bg-success-soft text-success-icon',\n warning: 'bg-warning-soft text-warning-icon',\n error: 'bg-error-soft text-error-icon',\n};\n\n/**\n * Decorative leading icon for a dialog header. Use with a semantic `color` to\n * match destructive / informational / success dialogs.\n */\n@Directive({\n selector: '[twDialogIcon]',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class DialogIconDirective {\n /** Semantic color for the icon container. Defaults to a neutral surface. */\n readonly color = input<TwColor | undefined>(undefined);\n\n protected readonly classes = computed(() => {\n const base = 'flex size-10 shrink-0 items-center justify-center rounded-full';\n const color = this.color();\n return color ? `${base} ${ICON_COLOR_CLASSES[color]}` : `${base} bg-surface-muted text-fg`;\n });\n}\n\n/**\n * Dialog title. Registers its ID with the container's `aria-labelledby` queue\n * so screen readers announce it automatically.\n */\n@Directive({\n selector: '[twDialogTitle], tw-dialog-title',\n host: {\n class: 'text-sm font-semibold text-fg',\n '[id]': 'id()',\n },\n})\nexport class DialogTitleDirective implements OnInit, OnDestroy {\n private readonly generatedId = inject(_IdGenerator).getId('tw-dialog-title-');\n private readonly dialogRef = inject<TwDialogRef<unknown, unknown>>(TwDialogRef, {\n optional: true,\n });\n\n /** Custom id for the title element. Defaults to a generated unique id. */\n readonly id = input<string>(this.generatedId);\n\n ngOnInit(): void {\n const containerInstance = this.dialogRef?.containerInstance;\n if (containerInstance) containerInstance._addAriaLabelledBy(this.id());\n }\n\n ngOnDestroy(): void {\n const containerInstance = this.dialogRef?.containerInstance;\n if (containerInstance) containerInstance._removeAriaLabelledBy(this.id());\n }\n}\n\n/** Secondary line beneath the dialog title — intended for a short description. */\n@Directive({\n selector: '[twDialogSubtitle], tw-dialog-subtitle',\n host: {\n class: 'text-sm text-fg-muted',\n },\n})\nexport class DialogSubtitleDirective {}\n\n/**\n * Dialog description. Registers its ID with the container's `aria-describedby`\n * queue so screen readers announce the descriptive paragraph after the title.\n * Mirrors {@link DialogTitleDirective} but for `aria-describedby`.\n */\n@Directive({\n selector: '[twDialogDescription], tw-dialog-description',\n host: {\n '[id]': 'id()',\n },\n})\nexport class DialogDescriptionDirective implements OnInit, OnDestroy {\n private readonly generatedId = inject(_IdGenerator).getId('tw-dialog-description-');\n private readonly dialogRef = inject<TwDialogRef<unknown, unknown>>(TwDialogRef, {\n optional: true,\n });\n /** Custom id for the description element. Defaults to a generated unique id. */\n readonly id = input<string>(this.generatedId);\n\n ngOnInit(): void {\n const containerInstance = this.dialogRef?.containerInstance;\n if (containerInstance) containerInstance._addAriaDescribedBy(this.id());\n }\n\n ngOnDestroy(): void {\n const containerInstance = this.dialogRef?.containerInstance;\n if (containerInstance) containerInstance._removeAriaDescribedBy(this.id());\n }\n}\n\n/**\n * Scrollable content region of the dialog. Apply between the header and the\n * actions bar. Inherits CDK's `CdkScrollable` to play nicely with scroll\n * strategies and nested scrollables.\n */\n@Directive({\n selector: '[twDialogContent], tw-dialog-content',\n hostDirectives: [CdkScrollable],\n host: {\n class: 'flex-1 overflow-y-auto px-6 py-4 text-sm text-fg',\n },\n})\nexport class DialogContentDirective {}\n\n/** Horizontal alignment for dialog action buttons. */\nexport type DialogActionsAlign = 'start' | 'center' | 'end';\n\n/**\n * Bottom action bar of a dialog. Use inside the dialog content or template to\n * host Cancel/Confirm buttons. Stays pinned below scrollable content.\n */\n@Directive({\n selector: '[twDialogActions], tw-dialog-actions',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class DialogActionsDirective {\n /** Horizontal alignment of the action buttons. Defaults to `'end'`. */\n readonly align = input<DialogActionsAlign>('end');\n\n protected readonly classes = computed(() => {\n const align = this.align();\n const justify =\n align === 'start' ? 'justify-start' : align === 'center' ? 'justify-center' : 'justify-end';\n return `flex flex-wrap items-center gap-2 px-6 py-4 border-t border-border-muted ${justify}`;\n });\n}\n\n/**\n * Closes the enclosing dialog when the host button is clicked. Provide a\n * `[twDialogClose]` value to pass a result to `afterClosed()` subscribers.\n */\n@Directive({\n selector: '[twDialogClose]',\n host: {\n '(click)': 'onClick()',\n '[attr.type]': 'type()',\n },\n})\nexport class DialogCloseDirective {\n /** Value passed to `afterClosed()` when the button is clicked. */\n readonly twDialogClose = input<unknown>(undefined);\n\n /** Native button `type`. Defaults to `'button'` to avoid accidental form submission. */\n readonly type = input<'button' | 'submit' | 'reset'>('button');\n\n private readonly dialogRef = inject<TwDialogRef<unknown, unknown>>(TwDialogRef, {\n optional: true,\n });\n\n protected onClick(): void {\n this.dialogRef?.close(this.twDialogClose());\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["CdkDialogConfig"],"mappings":";;;;;;;;;AAuBA;;;;;AAKG;AACG,MAAO,cAAyC,SAAQA,YAAqB,CAAA;;IAEjF,IAAI,GAAkB,IAAI;;IAG1B,sBAAsB,GAAY,GAAG;AAErC;;;;AAIG;IACH,qBAAqB,GAAY,GAAG;;IAGpC,cAAc,GAA4B,OAAO;;IAGxC,QAAQ,GAAqB,oBAAoB;AAE1D;;;;;AAKG;IACM,SAAS,GAAa,IAAI;;IAG1B,YAAY,GAAa,KAAK;;IAG9B,SAAS,GAAuB,gBAAgB;;IAGhD,YAAY,GAA0B,IAAI;;IAG1C,WAAW,GAAa,IAAI;;IAG5B,iBAAiB,GAAa,IAAI;AAC5C;AAED;MACa,cAAc,GAAG,IAAI,cAAc,CAAU,gBAAgB;AAE1E;MACa,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B;;ACtE7B;;;;;;;;;;;AAWG;MACU,WAAW,CAAA;AAsCW,IAAA,MAAA;;AApCxB,IAAA,EAAE;;AAGF,IAAA,KAAK;;AAGd,IAAA,YAAY;IAEK,WAAW,GAAG,MAAM,CAAc,SAAS;oFAAC;AAC5C,IAAA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AA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,aAAA,EAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,UAAA,EAAA,eAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,WAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,aAAa,EAAE,QAAQ;AACxB,qBAAA;AACF,iBAAA;;;ACnLD;;AAEG;;;;"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { CdkDialogContainer, Dialog, DialogConfig } from '@angular/cdk/dialog';
|
|
2
|
+
import { createBlockScrollStrategy, createNoopScrollStrategy, createRepositionScrollStrategy, createCloseScrollStrategy, createGlobalPositionStrategy } from '@angular/cdk/overlay';
|
|
3
|
+
import { SheetRef, SHEET_DATA, SheetConfig } from './cdevhub-ngx-tw-sheet.mjs';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { inject, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
6
|
+
import { CdkPortalOutlet } from '@angular/cdk/portal';
|
|
7
|
+
import { OverlayContainerCoordinator, mergeOverlayPanelClass, coerceOverlayDuration } from '@cdevhub/ngx-tw/core';
|
|
8
|
+
import { tv } from 'tailwind-variants';
|
|
9
|
+
|
|
10
|
+
// Sheet uses a `data-[state]` + `data-[side]` driven CSS transition rather than
|
|
11
|
+
// the project's `animate.enter`/`animate.leave` keyframes. Same rationale as
|
|
12
|
+
// the dialog container (see `dialog-container.ts`):
|
|
13
|
+
// 1. The ref owns the open/close lifecycle (state signal, observables) and
|
|
14
|
+
// needs runtime-configurable enter/exit durations per `Sheet.open()` call
|
|
15
|
+
// — `animate.enter` only accepts a static class name.
|
|
16
|
+
// 2. The transform direction depends on `side`, and encoding four pairs of
|
|
17
|
+
// keyframe classes (slide-in/out × 4 sides) is noisier than four
|
|
18
|
+
// `data-[side=…]` selectors on a single transition rule.
|
|
19
|
+
// All other library overlays (popover, menu, tooltip) use animate.enter/leave;
|
|
20
|
+
// this divergence is intentional and isolated to the sheet container.
|
|
21
|
+
const sheetContainerVariants = tv({
|
|
22
|
+
slots: {
|
|
23
|
+
host: 'fixed flex flex-col outline-none bg-surface-raised text-fg shadow-md overflow-hidden transition-[transform,opacity] ease-out motion-reduce:transition-none opacity-0 data-[state=open]:opacity-100',
|
|
24
|
+
},
|
|
25
|
+
variants: {
|
|
26
|
+
side: {
|
|
27
|
+
right: {
|
|
28
|
+
host: 'h-screen right-0 top-0 border-l border-border data-[state=opening]:translate-x-full data-[state=closing]:translate-x-full data-[state=open]:translate-x-0',
|
|
29
|
+
},
|
|
30
|
+
left: {
|
|
31
|
+
host: 'h-screen left-0 top-0 border-r border-border data-[state=opening]:-translate-x-full data-[state=closing]:-translate-x-full data-[state=open]:translate-x-0',
|
|
32
|
+
},
|
|
33
|
+
top: {
|
|
34
|
+
host: 'w-screen left-0 top-0 border-b border-border data-[state=opening]:-translate-y-full data-[state=closing]:-translate-y-full data-[state=open]:translate-y-0',
|
|
35
|
+
},
|
|
36
|
+
bottom: {
|
|
37
|
+
host: 'w-screen left-0 bottom-0 border-t border-border data-[state=opening]:translate-y-full data-[state=closing]:translate-y-full data-[state=open]:translate-y-0',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
size: {
|
|
41
|
+
xs: { host: '' },
|
|
42
|
+
sm: { host: '' },
|
|
43
|
+
md: { host: '' },
|
|
44
|
+
lg: { host: '' },
|
|
45
|
+
xl: { host: '' },
|
|
46
|
+
full: { host: '' },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
// Sheets are axis-aware: `size` controls width on horizontal sides and
|
|
50
|
+
// height on vertical sides. Encoded as compound variants so a single
|
|
51
|
+
// {side, size} pair resolves to one set of utility classes.
|
|
52
|
+
compoundVariants: [
|
|
53
|
+
// ── Right-anchored ─────────────────────────────────────────────
|
|
54
|
+
{ side: 'right', size: 'xs', class: { host: 'w-full max-w-xs' } },
|
|
55
|
+
{ side: 'right', size: 'sm', class: { host: 'w-full max-w-sm' } },
|
|
56
|
+
{ side: 'right', size: 'md', class: { host: 'w-full max-w-md' } },
|
|
57
|
+
{ side: 'right', size: 'lg', class: { host: 'w-full max-w-xl' } },
|
|
58
|
+
{ side: 'right', size: 'xl', class: { host: 'w-full max-w-2xl' } },
|
|
59
|
+
{ side: 'right', size: 'full', class: { host: 'w-screen max-w-none' } },
|
|
60
|
+
// ── Left-anchored ──────────────────────────────────────────────
|
|
61
|
+
{ side: 'left', size: 'xs', class: { host: 'w-full max-w-xs' } },
|
|
62
|
+
{ side: 'left', size: 'sm', class: { host: 'w-full max-w-sm' } },
|
|
63
|
+
{ side: 'left', size: 'md', class: { host: 'w-full max-w-md' } },
|
|
64
|
+
{ side: 'left', size: 'lg', class: { host: 'w-full max-w-xl' } },
|
|
65
|
+
{ side: 'left', size: 'xl', class: { host: 'w-full max-w-2xl' } },
|
|
66
|
+
{ side: 'left', size: 'full', class: { host: 'w-screen max-w-none' } },
|
|
67
|
+
// ── Top-anchored ───────────────────────────────────────────────
|
|
68
|
+
{ side: 'top', size: 'xs', class: { host: 'h-[20vh]' } },
|
|
69
|
+
{ side: 'top', size: 'sm', class: { host: 'h-[33vh]' } },
|
|
70
|
+
{ side: 'top', size: 'md', class: { host: 'h-[50vh]' } },
|
|
71
|
+
{ side: 'top', size: 'lg', class: { host: 'h-[66vh]' } },
|
|
72
|
+
{ side: 'top', size: 'xl', class: { host: 'h-[80vh]' } },
|
|
73
|
+
{ side: 'top', size: 'full', class: { host: 'h-screen' } },
|
|
74
|
+
// ── Bottom-anchored ────────────────────────────────────────────
|
|
75
|
+
{ side: 'bottom', size: 'xs', class: { host: 'h-[20vh]' } },
|
|
76
|
+
{ side: 'bottom', size: 'sm', class: { host: 'h-[33vh]' } },
|
|
77
|
+
{ side: 'bottom', size: 'md', class: { host: 'h-[50vh]' } },
|
|
78
|
+
{ side: 'bottom', size: 'lg', class: { host: 'h-[66vh]' } },
|
|
79
|
+
{ side: 'bottom', size: 'xl', class: { host: 'h-[80vh]' } },
|
|
80
|
+
{ side: 'bottom', size: 'full', class: { host: 'h-screen' } },
|
|
81
|
+
],
|
|
82
|
+
defaultVariants: { side: 'right', size: 'md' },
|
|
83
|
+
}, { twMerge: true });
|
|
84
|
+
/**
|
|
85
|
+
* Sheet container rendered inside the CDK overlay. Wraps the user-provided
|
|
86
|
+
* content in a Tailwind-styled, edge-anchored surface and coordinates slide
|
|
87
|
+
* enter/exit transitions with {@link SheetRef}.
|
|
88
|
+
*
|
|
89
|
+
* The animation state machine, `aria-describedby` queue, and panel-class
|
|
90
|
+
* merge are shared with `DialogContainer` via {@link OverlayContainerCoordinator}
|
|
91
|
+
* (component-scoped — see `providers: [OverlayContainerCoordinator]`).
|
|
92
|
+
*
|
|
93
|
+
* @docs-private
|
|
94
|
+
*/
|
|
95
|
+
class SheetContainer extends CdkDialogContainer {
|
|
96
|
+
coordinator = inject(OverlayContainerCoordinator);
|
|
97
|
+
/** Lifecycle state of the sheet's enter/exit animation. */
|
|
98
|
+
state = this.coordinator.state;
|
|
99
|
+
/** Emits whenever the animation state transitions. */
|
|
100
|
+
animationStateChanged = this.coordinator.animationStateChanged;
|
|
101
|
+
/** Resolved enter-animation duration in ms. */
|
|
102
|
+
enterAnimationDuration;
|
|
103
|
+
/** Resolved exit-animation duration in ms. */
|
|
104
|
+
exitAnimationDuration;
|
|
105
|
+
sideAttr = computed(() => this._config.side ?? 'right', /* @ts-ignore */
|
|
106
|
+
...(ngDevMode ? [{ debugName: "sideAttr" }] : /* istanbul ignore next */ []));
|
|
107
|
+
variants = computed(() => {
|
|
108
|
+
const side = this._config.side ?? 'right';
|
|
109
|
+
const size = this._config.size ?? 'md';
|
|
110
|
+
return sheetContainerVariants({ side, size });
|
|
111
|
+
}, /* @ts-ignore */
|
|
112
|
+
...(ngDevMode ? [{ debugName: "variants" }] : /* istanbul ignore next */ []));
|
|
113
|
+
hostClasses = computed(() => mergeOverlayPanelClass(this.variants().host(), this._config.panelClass), /* @ts-ignore */
|
|
114
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
115
|
+
ariaDescribedByAttr = computed(() => this._config.ariaDescribedBy ||
|
|
116
|
+
this.coordinator.describedByIds()[0] ||
|
|
117
|
+
null, /* @ts-ignore */
|
|
118
|
+
...(ngDevMode ? [{ debugName: "ariaDescribedByAttr" }] : /* istanbul ignore next */ []));
|
|
119
|
+
transitionDuration = this.coordinator.transitionDuration;
|
|
120
|
+
constructor() {
|
|
121
|
+
super();
|
|
122
|
+
this.enterAnimationDuration = coerceOverlayDuration(this._config.enterAnimationDuration, 200);
|
|
123
|
+
this.exitAnimationDuration = coerceOverlayDuration(this._config.exitAnimationDuration, 160);
|
|
124
|
+
this.coordinator.setDurations(this.enterAnimationDuration, this.exitAnimationDuration);
|
|
125
|
+
}
|
|
126
|
+
_contentAttached() {
|
|
127
|
+
super._contentAttached();
|
|
128
|
+
this.coordinator.startEnterAnimation();
|
|
129
|
+
}
|
|
130
|
+
/** Triggered by the sheet ref to play the exit transition before disposing the overlay. */
|
|
131
|
+
_startExitAnimation() {
|
|
132
|
+
this.coordinator.startExitAnimation();
|
|
133
|
+
}
|
|
134
|
+
/** Registers a description id for the container's `aria-describedby`. */
|
|
135
|
+
_addAriaDescribedBy(id) {
|
|
136
|
+
this.coordinator.addAriaDescribedBy(id);
|
|
137
|
+
}
|
|
138
|
+
/** Removes a previously registered description id. */
|
|
139
|
+
_removeAriaDescribedBy(id) {
|
|
140
|
+
this.coordinator.removeAriaDescribedBy(id);
|
|
141
|
+
}
|
|
142
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SheetContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
143
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.7", type: SheetContainer, isStandalone: true, selector: "tw-sheet-container", host: { attributes: { "tabindex": "-1" }, properties: { "attr.id": "_config.id || null", "attr.role": "_config.role", "attr.aria-modal": "_config.ariaModal", "attr.aria-labelledby": "_config.ariaLabel ? null : _ariaLabelledByQueue[0]", "attr.aria-label": "_config.ariaLabel", "attr.aria-describedby": "ariaDescribedByAttr()", "attr.data-state": "state()", "attr.data-side": "sideAttr()", "class": "hostClasses()", "style.transition-duration.ms": "transitionDuration()" } }, providers: [OverlayContainerCoordinator], usesInheritance: true, ngImport: i0, template: '<ng-template cdkPortalOutlet />', isInline: true, dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
144
|
+
}
|
|
145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SheetContainer, decorators: [{
|
|
146
|
+
type: Component,
|
|
147
|
+
args: [{
|
|
148
|
+
selector: 'tw-sheet-container',
|
|
149
|
+
template: '<ng-template cdkPortalOutlet />',
|
|
150
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
151
|
+
encapsulation: ViewEncapsulation.None,
|
|
152
|
+
imports: [CdkPortalOutlet],
|
|
153
|
+
providers: [OverlayContainerCoordinator],
|
|
154
|
+
host: {
|
|
155
|
+
tabindex: '-1',
|
|
156
|
+
'[attr.id]': '_config.id || null',
|
|
157
|
+
'[attr.role]': '_config.role',
|
|
158
|
+
'[attr.aria-modal]': '_config.ariaModal',
|
|
159
|
+
'[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledByQueue[0]',
|
|
160
|
+
'[attr.aria-label]': '_config.ariaLabel',
|
|
161
|
+
'[attr.aria-describedby]': 'ariaDescribedByAttr()',
|
|
162
|
+
'[attr.data-state]': 'state()',
|
|
163
|
+
'[attr.data-side]': 'sideAttr()',
|
|
164
|
+
'[class]': 'hostClasses()',
|
|
165
|
+
'[style.transition-duration.ms]': 'transitionDuration()',
|
|
166
|
+
},
|
|
167
|
+
}]
|
|
168
|
+
}], ctorParameters: () => [] });
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Rendering half of the sheet feature: the only module that pulls in
|
|
172
|
+
* `@angular/cdk/dialog`, the overlay position/scroll strategies, and the
|
|
173
|
+
* Tailwind `SheetContainer`. Reached exclusively through a dynamic `import()`
|
|
174
|
+
* in {@link Sheet}, which keeps that graph out of a consumer's initial bundle.
|
|
175
|
+
* Nothing here may be imported as a value from `sheet.ts`.
|
|
176
|
+
*
|
|
177
|
+
* @docs-private
|
|
178
|
+
*/
|
|
179
|
+
function openRenderedSheet(injector, content, merged, sheetRef) {
|
|
180
|
+
// `Dialog` is `providedIn: 'root'`, so resolving it here — rather than
|
|
181
|
+
// injecting it into the service — keeps the CDK symbol in this lazy chunk.
|
|
182
|
+
const cdkDialog = injector.get(Dialog);
|
|
183
|
+
const cdkRef = cdkDialog.open(content, {
|
|
184
|
+
id: merged.id,
|
|
185
|
+
role: merged.role,
|
|
186
|
+
data: merged.data,
|
|
187
|
+
panelClass: merged.panelClass,
|
|
188
|
+
backdropClass: merged.backdropClass || 'tw-sheet-backdrop',
|
|
189
|
+
hasBackdrop: merged.hasBackdrop,
|
|
190
|
+
// Sheet sizing happens on the container element (axis-aware width/height
|
|
191
|
+
// utilities). The overlay pane itself is the full-edge bounding box.
|
|
192
|
+
direction: merged.direction,
|
|
193
|
+
ariaDescribedBy: merged.ariaDescribedBy,
|
|
194
|
+
ariaLabelledBy: merged.ariaLabelledBy,
|
|
195
|
+
ariaLabel: merged.ariaLabel,
|
|
196
|
+
ariaModal: merged.ariaModal,
|
|
197
|
+
autoFocus: merged.autoFocus,
|
|
198
|
+
restoreFocus: merged.restoreFocus,
|
|
199
|
+
scrollStrategy: merged.scrollStrategy ?? resolveScrollStrategy(injector, merged.scrollBehavior),
|
|
200
|
+
positionStrategy: merged.positionStrategy ?? resolvePositionStrategy(injector, merged.side ?? 'right'),
|
|
201
|
+
closeOnNavigation: merged.closeOnNavigation,
|
|
202
|
+
viewContainerRef: merged.viewContainerRef,
|
|
203
|
+
injector: merged.injector,
|
|
204
|
+
// We handle close/Escape/backdrop ourselves so we can run the exit slide animation.
|
|
205
|
+
disableClose: true,
|
|
206
|
+
closeOnOverlayDetachments: false,
|
|
207
|
+
container: {
|
|
208
|
+
type: SheetContainer,
|
|
209
|
+
providers: () => [
|
|
210
|
+
{ provide: SheetConfig, useValue: merged },
|
|
211
|
+
{ provide: DialogConfig, useValue: merged },
|
|
212
|
+
],
|
|
213
|
+
},
|
|
214
|
+
providers: (cdkRef, _cdkConfig, container) => {
|
|
215
|
+
sheetRef._attach(cdkRef, container);
|
|
216
|
+
const providers = [
|
|
217
|
+
{ provide: SheetRef, useValue: sheetRef },
|
|
218
|
+
{ provide: SHEET_DATA, useValue: merged.data ?? null },
|
|
219
|
+
];
|
|
220
|
+
if (Array.isArray(merged.providers))
|
|
221
|
+
providers.push(...merged.providers);
|
|
222
|
+
return providers;
|
|
223
|
+
},
|
|
224
|
+
});
|
|
225
|
+
sheetRef._setComponent(cdkRef.componentInstance, cdkRef.componentRef);
|
|
226
|
+
}
|
|
227
|
+
function resolveScrollStrategy(injector, strategy) {
|
|
228
|
+
switch (strategy) {
|
|
229
|
+
case 'close':
|
|
230
|
+
return createCloseScrollStrategy(injector);
|
|
231
|
+
case 'reposition':
|
|
232
|
+
return createRepositionScrollStrategy(injector);
|
|
233
|
+
case 'noop':
|
|
234
|
+
return createNoopScrollStrategy();
|
|
235
|
+
case 'block':
|
|
236
|
+
default:
|
|
237
|
+
return createBlockScrollStrategy(injector);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
function resolvePositionStrategy(injector, side) {
|
|
241
|
+
const strategy = createGlobalPositionStrategy(injector);
|
|
242
|
+
switch (side) {
|
|
243
|
+
case 'left':
|
|
244
|
+
return strategy.top('0').left('0').bottom('0');
|
|
245
|
+
case 'top':
|
|
246
|
+
return strategy.top('0').left('0').right('0');
|
|
247
|
+
case 'bottom':
|
|
248
|
+
return strategy.bottom('0').left('0').right('0');
|
|
249
|
+
case 'right':
|
|
250
|
+
default:
|
|
251
|
+
return strategy.top('0').right('0').bottom('0');
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export { openRenderedSheet };
|
|
256
|
+
//# sourceMappingURL=cdevhub-ngx-tw-sheet-sheet-renderer-ByyNluUd.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cdevhub-ngx-tw-sheet-sheet-renderer-ByyNluUd.mjs","sources":["../../../projects/ngx-tw/sheet/sheet-container.ts","../../../projects/ngx-tw/sheet/sheet-renderer.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n type EventEmitter,\n inject,\n type Signal,\n ViewEncapsulation,\n computed,\n} from '@angular/core';\nimport { CdkDialogContainer } from '@angular/cdk/dialog';\nimport { CdkPortalOutlet } from '@angular/cdk/portal';\nimport {\n coerceOverlayDuration,\n mergeOverlayPanelClass,\n OverlayContainerCoordinator,\n type OverlayContainerAnimationEvent,\n type OverlayContainerState,\n} from '@cdevhub/ngx-tw/core';\nimport { tv } from 'tailwind-variants';\nimport { type SheetConfig } from './sheet-config';\n\n/** Lifecycle states a sheet passes through. */\nexport type SheetState = OverlayContainerState;\n\n/** Event emitted when the sheet's animation state transitions. */\nexport type SheetAnimationEvent = OverlayContainerAnimationEvent;\n\n// Sheet uses a `data-[state]` + `data-[side]` driven CSS transition rather than\n// the project's `animate.enter`/`animate.leave` keyframes. Same rationale as\n// the dialog container (see `dialog-container.ts`):\n// 1. The ref owns the open/close lifecycle (state signal, observables) and\n// needs runtime-configurable enter/exit durations per `Sheet.open()` call\n// — `animate.enter` only accepts a static class name.\n// 2. The transform direction depends on `side`, and encoding four pairs of\n// keyframe classes (slide-in/out × 4 sides) is noisier than four\n// `data-[side=…]` selectors on a single transition rule.\n// All other library overlays (popover, menu, tooltip) use animate.enter/leave;\n// this divergence is intentional and isolated to the sheet container.\nconst sheetContainerVariants = tv(\n {\n slots: {\n host: 'fixed flex flex-col outline-none bg-surface-raised text-fg shadow-md overflow-hidden transition-[transform,opacity] ease-out motion-reduce:transition-none opacity-0 data-[state=open]:opacity-100',\n },\n variants: {\n side: {\n right: {\n host: 'h-screen right-0 top-0 border-l border-border data-[state=opening]:translate-x-full data-[state=closing]:translate-x-full data-[state=open]:translate-x-0',\n },\n left: {\n host: 'h-screen left-0 top-0 border-r border-border data-[state=opening]:-translate-x-full data-[state=closing]:-translate-x-full data-[state=open]:translate-x-0',\n },\n top: {\n host: 'w-screen left-0 top-0 border-b border-border data-[state=opening]:-translate-y-full data-[state=closing]:-translate-y-full data-[state=open]:translate-y-0',\n },\n bottom: {\n host: 'w-screen left-0 bottom-0 border-t border-border data-[state=opening]:translate-y-full data-[state=closing]:translate-y-full data-[state=open]:translate-y-0',\n },\n },\n size: {\n xs: { host: '' },\n sm: { host: '' },\n md: { host: '' },\n lg: { host: '' },\n xl: { host: '' },\n full: { host: '' },\n },\n },\n // Sheets are axis-aware: `size` controls width on horizontal sides and\n // height on vertical sides. Encoded as compound variants so a single\n // {side, size} pair resolves to one set of utility classes.\n compoundVariants: [\n // ── Right-anchored ─────────────────────────────────────────────\n { side: 'right', size: 'xs', class: { host: 'w-full max-w-xs' } },\n { side: 'right', size: 'sm', class: { host: 'w-full max-w-sm' } },\n { side: 'right', size: 'md', class: { host: 'w-full max-w-md' } },\n { side: 'right', size: 'lg', class: { host: 'w-full max-w-xl' } },\n { side: 'right', size: 'xl', class: { host: 'w-full max-w-2xl' } },\n { side: 'right', size: 'full', class: { host: 'w-screen max-w-none' } },\n // ── Left-anchored ──────────────────────────────────────────────\n { side: 'left', size: 'xs', class: { host: 'w-full max-w-xs' } },\n { side: 'left', size: 'sm', class: { host: 'w-full max-w-sm' } },\n { side: 'left', size: 'md', class: { host: 'w-full max-w-md' } },\n { side: 'left', size: 'lg', class: { host: 'w-full max-w-xl' } },\n { side: 'left', size: 'xl', class: { host: 'w-full max-w-2xl' } },\n { side: 'left', size: 'full', class: { host: 'w-screen max-w-none' } },\n // ── Top-anchored ───────────────────────────────────────────────\n { side: 'top', size: 'xs', class: { host: 'h-[20vh]' } },\n { side: 'top', size: 'sm', class: { host: 'h-[33vh]' } },\n { side: 'top', size: 'md', class: { host: 'h-[50vh]' } },\n { side: 'top', size: 'lg', class: { host: 'h-[66vh]' } },\n { side: 'top', size: 'xl', class: { host: 'h-[80vh]' } },\n { side: 'top', size: 'full', class: { host: 'h-screen' } },\n // ── Bottom-anchored ────────────────────────────────────────────\n { side: 'bottom', size: 'xs', class: { host: 'h-[20vh]' } },\n { side: 'bottom', size: 'sm', class: { host: 'h-[33vh]' } },\n { side: 'bottom', size: 'md', class: { host: 'h-[50vh]' } },\n { side: 'bottom', size: 'lg', class: { host: 'h-[66vh]' } },\n { side: 'bottom', size: 'xl', class: { host: 'h-[80vh]' } },\n { side: 'bottom', size: 'full', class: { host: 'h-screen' } },\n ],\n defaultVariants: { side: 'right', size: 'md' },\n },\n { twMerge: true },\n);\n\n/**\n * Sheet container rendered inside the CDK overlay. Wraps the user-provided\n * content in a Tailwind-styled, edge-anchored surface and coordinates slide\n * enter/exit transitions with {@link SheetRef}.\n *\n * The animation state machine, `aria-describedby` queue, and panel-class\n * merge are shared with `DialogContainer` via {@link OverlayContainerCoordinator}\n * (component-scoped — see `providers: [OverlayContainerCoordinator]`).\n *\n * @docs-private\n */\n@Component({\n selector: 'tw-sheet-container',\n template: '<ng-template cdkPortalOutlet />',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CdkPortalOutlet],\n providers: [OverlayContainerCoordinator],\n host: {\n tabindex: '-1',\n '[attr.id]': '_config.id || null',\n '[attr.role]': '_config.role',\n '[attr.aria-modal]': '_config.ariaModal',\n '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledByQueue[0]',\n '[attr.aria-label]': '_config.ariaLabel',\n '[attr.aria-describedby]': 'ariaDescribedByAttr()',\n '[attr.data-state]': 'state()',\n '[attr.data-side]': 'sideAttr()',\n '[class]': 'hostClasses()',\n '[style.transition-duration.ms]': 'transitionDuration()',\n },\n})\nexport class SheetContainer extends CdkDialogContainer<SheetConfig> {\n private readonly coordinator = inject(OverlayContainerCoordinator);\n\n /** Lifecycle state of the sheet's enter/exit animation. */\n readonly state: Signal<SheetState> = this.coordinator.state;\n\n /** Emits whenever the animation state transitions. */\n readonly animationStateChanged: EventEmitter<SheetAnimationEvent> =\n this.coordinator.animationStateChanged;\n\n /** Resolved enter-animation duration in ms. */\n readonly enterAnimationDuration: number;\n /** Resolved exit-animation duration in ms. */\n readonly exitAnimationDuration: number;\n\n protected readonly sideAttr = computed(() => this._config.side ?? 'right');\n\n private readonly variants = computed(() => {\n const side = this._config.side ?? 'right';\n const size = this._config.size ?? 'md';\n return sheetContainerVariants({ side, size });\n });\n\n protected readonly hostClasses = computed(() =>\n mergeOverlayPanelClass(this.variants().host(), this._config.panelClass),\n );\n\n protected readonly ariaDescribedByAttr = computed(\n () =>\n this._config.ariaDescribedBy ||\n this.coordinator.describedByIds()[0] ||\n null,\n );\n\n protected readonly transitionDuration = this.coordinator.transitionDuration;\n\n constructor() {\n super();\n this.enterAnimationDuration = coerceOverlayDuration(this._config.enterAnimationDuration, 200);\n this.exitAnimationDuration = coerceOverlayDuration(this._config.exitAnimationDuration, 160);\n this.coordinator.setDurations(this.enterAnimationDuration, this.exitAnimationDuration);\n }\n\n protected override _contentAttached(): void {\n super._contentAttached();\n this.coordinator.startEnterAnimation();\n }\n\n /** Triggered by the sheet ref to play the exit transition before disposing the overlay. */\n _startExitAnimation(): void {\n this.coordinator.startExitAnimation();\n }\n\n /** Registers a description id for the container's `aria-describedby`. */\n _addAriaDescribedBy(id: string): void {\n this.coordinator.addAriaDescribedBy(id);\n }\n\n /** Removes a previously registered description id. */\n _removeAriaDescribedBy(id: string): void {\n this.coordinator.removeAriaDescribedBy(id);\n }\n}\n","import {\n type ComponentRef,\n type Injector,\n type StaticProvider,\n type TemplateRef,\n} from '@angular/core';\nimport { Dialog, DialogConfig as CdkDialogConfig } from '@angular/cdk/dialog';\nimport {\n createBlockScrollStrategy,\n createCloseScrollStrategy,\n createGlobalPositionStrategy,\n createNoopScrollStrategy,\n createRepositionScrollStrategy,\n type GlobalPositionStrategy,\n type ScrollStrategy,\n} from '@angular/cdk/overlay';\nimport type { ComponentType } from '@angular/cdk/portal';\nimport {\n SHEET_DATA,\n SheetConfig,\n type SheetScrollStrategy,\n type SheetSide,\n} from './sheet-config';\nimport { SheetContainer } from './sheet-container';\nimport { SheetRef } from './sheet-ref';\n\n/**\n * Rendering half of the sheet feature: the only module that pulls in\n * `@angular/cdk/dialog`, the overlay position/scroll strategies, and the\n * Tailwind `SheetContainer`. Reached exclusively through a dynamic `import()`\n * in {@link Sheet}, which keeps that graph out of a consumer's initial bundle.\n * Nothing here may be imported as a value from `sheet.ts`.\n *\n * @docs-private\n */\nexport function openRenderedSheet<R, D, C>(\n injector: Injector,\n content: ComponentType<C> | TemplateRef<C>,\n merged: SheetConfig<D, R>,\n sheetRef: SheetRef<R, C>,\n): void {\n // `Dialog` is `providedIn: 'root'`, so resolving it here — rather than\n // injecting it into the service — keeps the CDK symbol in this lazy chunk.\n const cdkDialog = injector.get(Dialog);\n\n const cdkRef = cdkDialog.open<R, D, C>(content, {\n id: merged.id,\n role: merged.role,\n data: merged.data,\n panelClass: merged.panelClass,\n backdropClass: merged.backdropClass || 'tw-sheet-backdrop',\n hasBackdrop: merged.hasBackdrop,\n // Sheet sizing happens on the container element (axis-aware width/height\n // utilities). The overlay pane itself is the full-edge bounding box.\n direction: merged.direction,\n ariaDescribedBy: merged.ariaDescribedBy,\n ariaLabelledBy: merged.ariaLabelledBy,\n ariaLabel: merged.ariaLabel,\n ariaModal: merged.ariaModal,\n autoFocus: merged.autoFocus,\n restoreFocus: merged.restoreFocus,\n scrollStrategy:\n merged.scrollStrategy ?? resolveScrollStrategy(injector, merged.scrollBehavior),\n positionStrategy:\n merged.positionStrategy ?? resolvePositionStrategy(injector, merged.side ?? 'right'),\n closeOnNavigation: merged.closeOnNavigation,\n viewContainerRef: merged.viewContainerRef,\n injector: merged.injector,\n // We handle close/Escape/backdrop ourselves so we can run the exit slide animation.\n disableClose: true,\n closeOnOverlayDetachments: false,\n container: {\n type: SheetContainer,\n providers: () => [\n { provide: SheetConfig, useValue: merged },\n { provide: CdkDialogConfig, useValue: merged },\n ],\n },\n providers: (cdkRef, _cdkConfig, container) => {\n sheetRef._attach(cdkRef, container as SheetContainer);\n const providers: StaticProvider[] = [\n { provide: SheetRef, useValue: sheetRef },\n { provide: SHEET_DATA, useValue: merged.data ?? null },\n ];\n if (Array.isArray(merged.providers)) providers.push(...merged.providers);\n return providers;\n },\n });\n\n sheetRef._setComponent(\n cdkRef.componentInstance as C | null,\n cdkRef.componentRef as ComponentRef<C> | null,\n );\n}\n\nfunction resolveScrollStrategy(\n injector: Injector,\n strategy: SheetScrollStrategy | undefined,\n): ScrollStrategy {\n switch (strategy) {\n case 'close':\n return createCloseScrollStrategy(injector);\n case 'reposition':\n return createRepositionScrollStrategy(injector);\n case 'noop':\n return createNoopScrollStrategy();\n case 'block':\n default:\n return createBlockScrollStrategy(injector);\n }\n}\n\nfunction resolvePositionStrategy(injector: Injector, side: SheetSide): GlobalPositionStrategy {\n const strategy = createGlobalPositionStrategy(injector);\n switch (side) {\n case 'left':\n return strategy.top('0').left('0').bottom('0');\n case 'top':\n return strategy.top('0').left('0').right('0');\n case 'bottom':\n return strategy.bottom('0').left('0').right('0');\n case 'right':\n default:\n return strategy.top('0').right('0').bottom('0');\n }\n}\n"],"names":["CdkDialogConfig"],"mappings":";;;;;;;;;AA2BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,sBAAsB,GAAG,EAAE,CAC/B;AACE,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,oMAAoM;AAC3M,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,2JAA2J;AAClK,aAAA;AACD,YAAA,IAAI,EAAE;AACJ,gBAAA,IAAI,EAAE,4JAA4J;AACnK,aAAA;AACD,YAAA,GAAG,EAAE;AACH,gBAAA,IAAI,EAAE,4JAA4J;AACnK,aAAA;AACD,YAAA,MAAM,EAAE;AACN,gBAAA,IAAI,EAAE,6JAA6J;AACpK,aAAA;AACF,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;AAChB,YAAA,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;AAChB,YAAA,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;AAChB,YAAA,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;AAChB,YAAA,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;AAChB,YAAA,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;AACnB,SAAA;AACF,KAAA;;;;AAID,IAAA,gBAAgB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