@slotted/angular 0.1.0-beta.7 → 0.1.0-beta.8

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.
@@ -1 +1 @@
1
- {"version":3,"file":"slotted-angular-dialog.mjs","sources":["../../dialog/src/dialog-defaults.ts","../../dialog/src/dialog.ts","../../dialog/src/dialog-parts.ts","../../dialog/src/slotted-angular-dialog.ts"],"sourcesContent":["import { inject, Injectable, InjectionToken } from '@angular/core';\n\n/**\n * The panel's measure. Five named steps rather than the pixel string Material,\n * Carbon and Ant all take: a theme can retune a step and cannot retune\n * `width: '600px'`, and a family that accepted one would carry a second scale.\n */\nexport type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';\n\n/** Where the panel sits in the layer. `top` is for content that grows. */\nexport type DialogPlacement = 'center' | 'top';\n\n/**\n * What scrolls. `content` bounds the panel to the layer and scrolls its body,\n * which is what keeps the footer on screen; `viewport` scrolls the whole panel,\n * for content that is a document rather than a task.\n */\nexport type DialogScroll = 'content' | 'viewport';\n\n/**\n * Whether the family paints the panel at all. `plain` turns off the surface,\n * the border, the radius, the shadow, the rows and the padding, and keeps\n * everything that is not paint: the portal, the scrim, presence, the focus\n * containment and restoration, the dismissal policy and the z-index stack.\n *\n * It is what a consumer reaches for to put the layer around a box of their own\n * — a `slCard`, a media viewer, an image at its own aspect ratio. The cost is\n * that a plain panel does not keep its footer on screen for a long body,\n * because the three rows go with the paint.\n */\nexport type DialogSurface = 'panel' | 'plain';\n\n/**\n * When the layer exists. `active` builds it on opening and drops it once the\n * exit is over, `lazy` builds it on the first open and keeps it, `eager` builds\n * it up front and hides it.\n *\n * The default is the opposite of `collapsible`'s, and for the same reason: a\n * disclosure's panel transitions its own height and has to be in the DOM, while\n * a layer transitions opacity and `@slotted/core/presence` already keeps it\n * mounted for its own exit.\n */\nexport type DialogMount = 'active' | 'lazy' | 'eager';\n\n/**\n * When the panel spends the whole layer. `narrow` is a container query at a\n * literal breakpoint, which is what `docs/component-features.md` §2.7 means by\n * a responsive mode that can be tested deterministically.\n */\nexport type DialogFullScreen = 'never' | 'narrow' | 'always';\n\n/** Whether a dismissal source closes the layer. */\nexport type DialogDismissPolicy = 'close' | 'none';\n\n/** The five semantic tones. An alert dialog draws its mark from this. */\nexport type DialogTone = 'accent' | 'secondary' | 'success' | 'warning' | 'danger';\n\n/** Where focus goes when the layer opens. */\nexport type DialogInitialFocus = 'first' | 'container' | 'cancel' | HTMLElement | false;\n\n/** Where focus goes when the layer closes. Defaults to the trigger. */\nexport type DialogFinalFocus = HTMLElement | false;\n\n/** Why the layer opened or closed. */\nexport type DialogOpenReason =\n | 'pointer'\n | 'keyboard'\n | 'dismiss'\n | 'escape'\n | 'outsidePress'\n | 'back'\n | 'submit'\n | 'programmatic';\n\n/**\n * The request the family emits before the layer moves, with the result the\n * close carried. `result` is what the platform calls `returnValue` and what\n * Angular Material returns from `afterClosed()`; it rides on the request rather\n * than declaring a second state model, because nothing about it is controlled.\n */\nexport interface DialogChangeRequest {\n readonly value: boolean;\n readonly previous: boolean;\n readonly reason: DialogOpenReason;\n readonly result?: string | undefined;\n readonly source?: unknown;\n readonly cancelled: boolean;\n cancel(): void;\n}\n\n/** Why the panel took the layer, or gave it back. */\nexport type DialogFullscreenReason = 'pointer' | 'keyboard' | 'programmatic';\n\nexport interface DialogFullscreenRequest {\n readonly value: boolean;\n readonly previous: boolean;\n readonly reason: DialogFullscreenReason;\n readonly source?: unknown;\n readonly cancelled: boolean;\n cancel(): void;\n}\n\nexport interface DialogDefaults {\n /** The platform's way back — a phone's gesture, a browser's button — closes a modal layer. */\n back: DialogDismissPolicy;\n escape: DialogDismissPolicy;\n fullScreen: DialogFullScreen;\n modal: boolean;\n mount: DialogMount;\n outsidePress: DialogDismissPolicy;\n placement: DialogPlacement;\n scroll: DialogScroll;\n size: DialogSize;\n surface: DialogSurface;\n}\n\nconst FALLBACK: DialogDefaults = {\n back: 'close',\n escape: 'close',\n fullScreen: 'narrow',\n modal: true,\n mount: 'active',\n outsidePress: 'close',\n placement: 'center',\n scroll: 'content',\n size: 'md',\n surface: 'panel',\n};\n\nexport const DIALOG_DEFAULTS = new InjectionToken<DialogDefaults>('slotted dialog defaults', {\n providedIn: 'root',\n factory: () => FALLBACK,\n});\n\n/**\n * An application decides once how its dialogs behave and look, rather than\n * repeating the same eight inputs on every one in a product. Angular Material\n * is the only surveyed implementation with an equivalent —\n * `MAT_DIALOG_DEFAULT_OPTIONS` — and React gets one here too rather than being\n * levelled down to the smaller shape.\n */\nexport function provideDialogDefaults(defaults: Partial<DialogDefaults>) {\n return {\n provide: DIALOG_DEFAULTS,\n useFactory: (): DialogDefaults => ({ ...FALLBACK, ...defaults }),\n };\n}\n\n/** What a dialog renders as here, before it states anything of its own. */\nexport function injectDialogDefaults(): DialogDefaults {\n return inject(DIALOG_DEFAULTS);\n}\n\n/**\n * Application-scoped rather than module-scoped, for the reason `field` records:\n * a module-level counter produces colliding sequences when two applications\n * render in one server process, and the server and the client sequences must\n * match for hydration.\n */\n@Injectable({ providedIn: 'root' })\nexport class SlDialogIdFactory {\n private count = 0;\n\n next() {\n this.count += 1;\n return `slotted-dialog-${this.count}`;\n }\n}\n","import { injectMessages } from '@slotted/angular/i18n';\nimport { createDismissableLayer } from '@slotted/core/dismissable-layer';\nimport type { DismissableLayerHandle } from '@slotted/core/dismissable-layer';\nimport { createFocusScope } from '@slotted/core/focus';\nimport { dialogMessages, type DialogMessages, type PartialMessages } from '@slotted/core/i18n';\nimport type { FocusScopeHandle } from '@slotted/core/focus';\nimport { createPortalRoot } from '@slotted/core/portal';\nimport type { PortalRootHandle } from '@slotted/core/portal';\nimport { createPresence } from '@slotted/core/presence';\nimport type { PresenceHandle, PresenceStatus } from '@slotted/core/presence';\nimport { createControllable } from '@slotted/core/state';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n forwardRef,\n HostAttributeToken,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { injectDialogDefaults, SlDialogIdFactory } from './dialog-defaults';\nimport type {\n DialogChangeRequest,\n DialogDismissPolicy,\n DialogFinalFocus,\n DialogFullScreen,\n DialogFullscreenReason,\n DialogFullscreenRequest,\n DialogInitialFocus,\n DialogMount,\n DialogOpenReason,\n DialogPlacement,\n DialogScroll,\n DialogSize,\n DialogSurface,\n DialogTone,\n} from './dialog-defaults';\n\n/**\n * A window over the page, and the scrim that says the page is out of reach.\n *\n * The layer is composed from `packages/core` and rewritten nowhere: `portal`\n * decides where it lives and keeps the theme of the region that opened it,\n * `dismissable-layer` owns Escape, outside press, `inert`, the scroll lock and\n * the single z-index stack, `presence` keeps it mounted long enough to leave,\n * and `focus` contains the keyboard and gives it back to the trigger.\n *\n * **The host is not the layer.** `<sl-dialog>` renders `display: contents` and\n * stays exactly where the consumer wrote it; the layer is the `div` in the\n * template, and it is that `div` which is moved into the portal. Two things\n * follow, and both are better than the alternative: `mount=\"active\"` can remove\n * the layer outright, as React's does, and the host is the portal's *origin* —\n * so the layer inherits the scheme, density, theme and direction of the region\n * the consumer wrote it in, whether a trigger exists or not. React has to use\n * the trigger for that, and the design document records the asymmetry.\n */\n@Directive()\nexport abstract class SlDialogBase {\n protected abstract readonly member: 'dialog' | 'alertDialog';\n\n /** Whether the layer is open. Two-way, so a template may bind it directly. */\n readonly open = model<boolean>(false);\n\n readonly size = input<DialogSize | undefined>(undefined);\n readonly placement = input<DialogPlacement | undefined>(undefined);\n readonly scroll = input<DialogScroll | undefined>(undefined);\n readonly surface = input<DialogSurface | undefined>(undefined);\n readonly mount = input<DialogMount | undefined>(undefined);\n readonly fullScreen = input<DialogFullScreen | undefined>(undefined);\n /**\n * Whether the header renders the control that hands the layer to the panel.\n * Off, because a dialog holds one task and most tasks are the size the\n * consumer chose. `fullScreen` is the other question — the responsive rule\n * set in advance — and this is the reader's own.\n */\n readonly fullscreenToggle = input(false, { transform: booleanAttribute });\n /** Whether the reader has taken the layer. Two-way, as `open` is. */\n readonly fullscreen = model<boolean>(false);\n readonly escape = input<DialogDismissPolicy | undefined>(undefined);\n /**\n * The platform's way back — a phone's gesture, a browser's button — closes\n * the layer instead of leaving the page, while the layer is modal.\n */\n readonly back = input<DialogDismissPolicy | undefined>(undefined);\n /** Whether the layer's content is still on its way. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** A parent for this layer alone, instead of the shared portal root. */\n readonly container = input<Element | null | undefined>(undefined);\n readonly initialFocus = input<DialogInitialFocus | undefined>(undefined);\n readonly finalFocus = input<DialogFinalFocus | undefined>(undefined);\n /**\n * Words laid over the catalog of the language in force, key by key: the\n * corner controls' names (`close`, `fullScreen`).\n */\n readonly messages = input<PartialMessages<DialogMessages> | undefined>(undefined);\n\n /** One output for one transition, carrying the reason, the result and the event. */\n readonly openChangeRequest = output<DialogChangeRequest>();\n /**\n * What `afterClosed()` is in Angular Material, as an output. It fires once the\n * layer has actually closed, with the result the close carried.\n */\n readonly closed = output<string | undefined>();\n /** One output for one transition of the state the toggle sets. */\n readonly fullscreenChangeRequest = output<DialogFullscreenRequest>();\n\n protected readonly defaults = injectDialogDefaults();\n /** The family's words in the language in force, with this layer's `messages` laid over them. */\n readonly t = injectMessages(dialogMessages, this.messages);\n protected readonly host: HTMLElement = inject(ElementRef).nativeElement;\n private readonly destroyRef = inject(DestroyRef);\n private readonly baseId = inject(SlDialogIdFactory).next();\n\n /** The element the consumer wrote us beside, recorded before anything moves. */\n private readonly origin = this.host.parentElement;\n\n /**\n * A consumer's own `aria-label` on `<sl-dialog>`, read before the host\n * bindings are written and moved to the panel, which is the element the role\n * is on. Without this a label written on the host would name a box with\n * `display: contents` and no role at all.\n */\n private readonly writtenLabel = inject(new HostAttributeToken('aria-label'), {\n optional: true,\n });\n\n protected readonly layerRef = viewChild<ElementRef<HTMLElement>>('layer');\n protected readonly panelRef = viewChild<ElementRef<HTMLElement>>('panel');\n\n /** The parts that have said they exist, so only what was rendered is wired. */\n readonly hasTitle = signal(false);\n readonly hasDescription = signal(false);\n readonly cancelNode = signal<HTMLElement | null>(null);\n readonly triggerNode = signal<HTMLElement | null>(null);\n\n readonly titleId = `${this.baseId}-title`;\n readonly descriptionId = `${this.baseId}-description`;\n readonly contentId = `${this.baseId}-content`;\n readonly triggerId = `${this.baseId}-trigger`;\n\n /**\n * The status rather than a boolean. `entering` is one frame long and it is\n * the whole reason it exists: a layer that appears already open gives its CSS\n * transition no closed style to start from.\n */\n private readonly status = signal<PresenceStatus>('unmounted');\n /**\n * The status is a signal and the template reads it, and that is not enough on\n * its own. `presence` answers `sync` from inside the effect that watches\n * `open`, which runs as part of this view's own change detection and after its\n * bindings have been written: the write marked no consumer, no further pass\n * followed, and the layer stayed in the document with `inert` and the closed\n * attribute of a dialog that reported itself open. It was measured on a layer\n * opened from a bound state rather than from a trigger — the family's own\n * stories all open from a trigger, which is why it stood for nine rounds.\n */\n private readonly changes = inject(ChangeDetectorRef);\n private readonly presence: PresenceHandle = createPresence({\n present: false,\n onStatusChange: (next) => {\n this.status.set(next);\n this.changes.markForCheck();\n },\n });\n\n /** Whether this layer has ever been open, which is what `lazy` reads. */\n private readonly seen = signal(false);\n private readonly result = signal<string | undefined>(undefined);\n\n readonly isAlert = computed(() => this.member === 'alertDialog');\n readonly resolvedModal = computed(() => (this.isAlert() ? true : this.modalInput()));\n readonly resolvedOutsidePress = computed<DialogDismissPolicy>(() =>\n this.isAlert() ? 'none' : this.outsidePressInput(),\n );\n readonly resolvedMount = computed(() => this.mount() ?? this.defaults.mount);\n readonly resolvedSize = computed(\n () => this.size() ?? (this.isAlert() ? 'sm' : this.defaults.size),\n );\n readonly resolvedPlacement = computed(() => this.placement() ?? this.defaults.placement);\n readonly resolvedScroll = computed(() => this.scroll() ?? this.defaults.scroll);\n readonly resolvedSurface = computed(() => this.surface() ?? this.defaults.surface);\n readonly resolvedFullScreen = computed(\n () => this.fullScreen() ?? (this.isAlert() ? 'never' : this.defaults.fullScreen),\n );\n readonly resolvedEscape = computed(() => this.escape() ?? this.defaults.escape);\n readonly resolvedBack = computed(() => this.back() ?? this.defaults.back);\n /**\n * A confirmation has no corner controls at all, for the reason it has no\n * close button, so neither the state nor the control that sets it is its.\n */\n readonly resolvedFullscreen = computed(() => !this.isAlert() && this.fullscreen());\n readonly resolvedFullscreenToggle = computed(() => !this.isAlert() && this.fullscreenToggle());\n readonly resolvedInitialFocus = computed<DialogInitialFocus>(\n () => this.initialFocus() ?? (this.isAlert() ? 'cancel' : 'first'),\n );\n readonly resolvedTone = computed<DialogTone | null>(() =>\n this.isAlert() ? this.toneInput() : null,\n );\n\n /** Overridden by the member that has them; the base has neither. */\n protected modalInput(): boolean {\n return this.defaults.modal;\n }\n protected outsidePressInput(): DialogDismissPolicy {\n return this.defaults.outsidePress;\n }\n protected toneInput(): DialogTone {\n return 'danger';\n }\n\n readonly mounted = computed(() => {\n const mount = this.resolvedMount();\n if (mount === 'eager') return true;\n if (mount === 'lazy') return this.seen();\n return this.status() !== 'unmounted';\n });\n\n /** What the stylesheet keys on, which is a frame behind what was asked. */\n readonly visible = computed(() => this.status() === 'open');\n /**\n * Whether the layer takes focus and the pointer. `entering` counts: the\n * focus scope enters in that frame, and a layer still `inert` then refuses\n * the initial focus and leaves it on `body`.\n */\n readonly interactive = computed(() => {\n const status = this.status();\n return status === 'entering' || status === 'open';\n });\n\n readonly labelledBy = computed(() =>\n this.hasTitle() && this.writtenLabel === null ? this.titleId : null,\n );\n readonly describedBy = computed(() => (this.hasDescription() ? this.descriptionId : null));\n readonly label = computed(() => this.writtenLabel);\n readonly role = computed(() => (this.isAlert() ? 'alertdialog' : 'dialog'));\n\n private portal: PortalRootHandle | null = null;\n private layer: DismissableLayerHandle | null = null;\n private scope: FocusScopeHandle | null = null;\n /** Whether the layer, the focus scope and the `closed` owed are standing. */\n private engaged = false;\n\n /**\n * The layer this one was written inside, and the layers written inside this\n * one. A confirmation whose action also closes the dialog under it closes\n * both in one change, and Angular runs the dialog's effect first: taken down\n * from the bottom, the dialog found focus in the confirmation and restored\n * nothing, and the confirmation then handed focus to a control in a layer\n * already leaving — `body`, once that layer was gone. The layers come down\n * from the top instead, as React's effects take them down.\n */\n private readonly parent = inject(SlDialogBase, { optional: true, skipSelf: true });\n private readonly nested = new Set<SlDialogBase>();\n\n constructor() {\n this.parent?.nested.add(this);\n effect(() => {\n if (this.open()) this.seen.set(true);\n this.presence.sync(this.open());\n });\n\n /** Where the layer lives, for as long as it is in the document. */\n effect(() => {\n const node = this.layerRef()?.nativeElement ?? null;\n this.presence.setNode(node);\n\n if (node === null) {\n this.releasePortal();\n return;\n }\n if (this.portal !== null) return;\n\n const named = this.container();\n this.portal = createPortalRoot({\n origin: this.origin,\n ...(named === undefined ? {} : { container: named }),\n });\n this.portal.container?.append(node);\n });\n\n /**\n * Everything the layer does while it is open, taken down when it closes\n * rather than when the node leaves — `presence` keeps the node mounted\n * through the exit, and a layer still holding the scroll lock and the\n * background's `inert` for those milliseconds is a page nobody can touch.\n */\n effect((onCleanup) => {\n const node = this.layerRef()?.nativeElement;\n const panel = this.panelRef()?.nativeElement;\n if (!this.open() || node === undefined || panel === undefined) return;\n\n const escape = this.resolvedEscape() === 'close';\n const outsidePress = this.resolvedOutsidePress() === 'close';\n const modal = this.resolvedModal();\n /* A history entry is a modal layer's: a layer the page stays reachable\n under has no claim on the way back. */\n const back = modal && this.resolvedBack() === 'close';\n const trigger = this.triggerNode();\n\n /* The frame is the layer and the panel is what a press is inside of: the\n scrim and the viewport around the panel are the way out. The click, not\n the pointerdown, so a selection dragged out of the panel is not a press\n on the scrim. */\n this.layer = createDismissableLayer(node, {\n back,\n branches: trigger === null ? [] : [trigger],\n content: panel,\n escape,\n modal,\n onDismiss: (request) => {\n if (request.reason === 'outsidePress' && !outsidePress) return request.cancel();\n this.request(false, request.reason as DialogOpenReason, undefined, request.source);\n },\n outsidePress,\n outsidePressEvent: 'click',\n });\n\n const wanted = this.resolvedInitialFocus();\n const returnTo = this.finalFocus();\n this.scope = createFocusScope(panel, {\n contain: modal,\n initial:\n wanted === 'cancel'\n ? () => this.cancelNode()\n : wanted instanceof HTMLElement\n ? () => wanted\n : wanted,\n ...(returnTo === undefined\n ? {}\n : { restore: returnTo === false ? (false as const) : () => returnTo }),\n });\n this.scope.enter();\n this.engaged = true;\n\n onCleanup(() => this.takeDown());\n });\n\n this.destroyRef.onDestroy(() => {\n this.parent?.nested.delete(this);\n this.layer?.destroy();\n this.scope?.destroy();\n this.presence.destroy();\n this.releasePortal();\n });\n }\n\n /**\n * Takes down what the layer does while it is open, once per opening. The\n * nested layers that closed in the same change go first.\n *\n * The layer before the scope: it lifts the `inert` it wrote on the\n * background, and a browser refuses focus inside an inert subtree, so a\n * scope taken down first hands focus back to a trigger that cannot take it.\n */\n private takeDown() {\n if (!this.engaged) return;\n this.engaged = false;\n for (const layer of this.nested) if (!layer.open()) layer.takeDown();\n this.layer?.destroy();\n this.layer = null;\n this.scope?.destroy();\n this.scope = null;\n this.closed.emit(this.result());\n this.result.set(undefined);\n }\n\n /**\n * The layer element is given back to the host before the portal goes, so\n * Angular removes a node that is where its own view expects it to be.\n */\n private releasePortal() {\n if (this.portal === null) return;\n const node = this.layerRef()?.nativeElement;\n if (node !== undefined) this.host.append(node);\n this.portal.release();\n this.portal = null;\n }\n\n /** Asks to move, carrying the reason, the result and the originating event. */\n request(next: boolean, reason: DialogOpenReason, result: string | undefined, source: unknown) {\n if (next === this.open()) return;\n\n let cancelled = false;\n const state = createControllable<boolean>({\n initial: this.open(),\n onRequest: (raw) => {\n cancelled = raw.cancelled;\n this.openChangeRequest.emit({\n cancel: () => raw.cancel(),\n get cancelled() {\n return raw.cancelled;\n },\n previous: raw.previous,\n reason,\n result,\n source: raw.source,\n value: raw.value,\n });\n },\n });\n\n if (!state.request(next, reason, source) || cancelled) return;\n if (!next) this.result.set(result);\n this.open.set(next);\n }\n\n /** Asks to take the layer or give it back, carrying the reason and the event. */\n requestFullscreen(next: boolean, reason: DialogFullscreenReason, source: unknown) {\n if (next === this.resolvedFullscreen()) return;\n\n let cancelled = false;\n const state = createControllable<boolean>({\n initial: this.fullscreen(),\n onRequest: (raw) => {\n cancelled = raw.cancelled;\n this.fullscreenChangeRequest.emit({\n cancel: () => raw.cancel(),\n get cancelled() {\n return raw.cancelled;\n },\n previous: raw.previous,\n reason,\n source: raw.source,\n value: raw.value,\n });\n },\n });\n\n if (!state.request(next, reason, source) || cancelled) return;\n this.fullscreen.set(next);\n }\n\n /** Opens the layer from code, carrying `programmatic`. */\n openDialog() {\n this.request(true, 'programmatic', undefined, undefined);\n }\n\n /** Closes it from code, carrying `programmatic` and the result given. */\n close(result?: string) {\n this.request(false, 'programmatic', result, undefined);\n }\n\n /** Moves focus into the layer, as opening does. */\n focus() {\n this.panelRef()?.nativeElement.focus();\n }\n}\n\n/**\n * One template for the two members. `tag` already names its own the same way,\n * which is what says the compiler folds it: `entry-points.source.test.mjs`\n * refuses an identifier for `styleUrl` because that one needs a file resolved\n * at build time, and a template string needs nothing resolved at all.\n */\nconst LAYER_TEMPLATE = `\n @if (mounted()) {\n <div\n #layer\n data-ui=\"dialog\"\n data-part=\"root\"\n [attr.data-size]=\"resolvedSize()\"\n [attr.data-placement]=\"resolvedPlacement()\"\n [attr.data-scroll]=\"resolvedScroll()\"\n [attr.data-surface]=\"resolvedSurface()\"\n [attr.data-mount]=\"resolvedMount()\"\n [attr.data-full-screen]=\"resolvedFullScreen()\"\n [attr.data-fullscreen]=\"resolvedFullscreen() ? '' : null\"\n [attr.data-outside-press]=\"resolvedOutsidePress()\"\n [attr.data-tone]=\"resolvedTone()\"\n [attr.data-modal]=\"resolvedModal() ? '' : null\"\n [attr.data-open]=\"visible() ? '' : null\"\n [attr.data-loading]=\"loading() ? '' : null\"\n [attr.inert]=\"interactive() ? null : ''\"\n >\n <div data-part=\"backdrop\"></div>\n <div data-part=\"viewport\">\n <div\n #panel\n data-part=\"content\"\n [id]=\"contentId\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"resolvedModal() ? 'true' : null\"\n [attr.aria-label]=\"label()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"describedBy()\"\n >\n <ng-content />\n </div>\n </div>\n </div>\n }`;\n\n@Component({\n selector: 'sl-dialog',\n standalone: true,\n exportAs: 'slDialog',\n template: LAYER_TEMPLATE,\n styleUrl: '../../../styles/src/dialog/dialog.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n /* The host is the origin the layer inherits its theme from, and nothing else. */\n host: { '[style.display]': \"'contents'\" },\n providers: [{ provide: SlDialogBase, useExisting: forwardRef(() => SlDialog) }],\n})\nexport class SlDialog extends SlDialogBase {\n protected readonly member = 'dialog' as const;\n\n /**\n * Whether the background is inert, the scroll is locked and focus is\n * contained. A non-modal layer writes no `aria-modal`, which the APG requires\n * of anything that does not actually make the background unreachable.\n */\n readonly modal = input(true, { transform: booleanAttribute });\n readonly outsidePress = input<DialogDismissPolicy | undefined>(undefined);\n\n protected override modalInput() {\n return this.modal();\n }\n\n protected override outsidePressInput() {\n return this.outsidePress() ?? this.defaults.outsidePress;\n }\n}\n\n/**\n * A dialog that interrupts to confirm something irreversible.\n *\n * Two rules are fixed rather than left to an input: outside press never closes\n * it, and it is always modal. Ark and React Aria make the role a prop, so a\n * consumer who sets `role=\"alertdialog\"` and forgets the dismissal policy ships\n * a destructive confirmation a stray click dismisses.\n *\n * Focus lands on `slAlertDialogCancel` rather than on the first tabbable\n * element, which is the APG's own advice for a step that is not easily\n * reversible.\n */\n@Component({\n selector: 'sl-alert-dialog',\n standalone: true,\n exportAs: 'slAlertDialog',\n template: LAYER_TEMPLATE,\n styleUrl: '../../../styles/src/dialog/dialog.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { '[style.display]': \"'contents'\" },\n providers: [{ provide: SlDialogBase, useExisting: forwardRef(() => SlAlertDialog) }],\n})\nexport class SlAlertDialog extends SlDialogBase {\n protected readonly member = 'alertDialog' as const;\n\n readonly tone = input<DialogTone>('danger');\n\n constructor() {\n super();\n\n /**\n * The alert dialog pattern *requires* `aria-describedby`. A confirmation\n * announced as a title and two buttons, with the sentence saying what is\n * about to be destroyed left out, is the failure the requirement exists\n * for — so it fails loudly rather than shipping.\n *\n * The DOM rather than the signal: projected content is created before this\n * effect flushes, so the element is there and the signal it sets may not\n * have been read yet.\n */\n effect(() => {\n const panel = this.panelRef()?.nativeElement;\n if (!this.open() || panel === undefined) return;\n if (panel.querySelector('[data-part=\"description\"]') !== null) return;\n throw new Error(\n 'sl-alert-dialog requires an element with slDialogDescription: the alertdialog pattern makes aria-describedby mandatory.',\n );\n });\n }\n\n protected override toneInput() {\n return this.tone();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n ElementRef,\n HostAttributeToken,\n inject,\n input,\n OnDestroy,\n OnInit,\n} from '@angular/core';\nimport { SlGlyph, SlIcon } from '@slotted/angular/icon';\nimport type { GlyphName } from '@slotted/angular/icon';\n\nimport { SlDialogBase } from './dialog';\nimport type { DialogOpenReason, DialogTone } from './dialog-defaults';\n\n/**\n * A click synthesised by the keyboard reports no detail; a real one reports the\n * click count. It is how `Enter`, `Space` and a pointer are told apart without\n * a key listener existing for something the platform already handles.\n */\nfunction activationReason(event: MouseEvent): DialogOpenReason {\n return event.detail === 0 ? 'keyboard' : 'pointer';\n}\n\n/**\n * The part a control names. On an element another family draws — `slButton` —\n * that family's root stays its part: two directives write one attribute, and\n * the family the element is drawn by keeps it, as React's `render` does by\n * spreading the button's props last.\n */\nfunction ownPart(native: HTMLElement, part: string): string | null {\n return native.hasAttribute('data-ui') ? native.getAttribute('data-part') : part;\n}\n\n/**\n * The control that opens a layer.\n *\n * It is the consumer's own element, which is what this ecosystem composes with:\n * `<button slButton slDialogTrigger [dialog]=\"d\">` is the library's own button\n * and this adds the wiring to it. React reaches the same place with `render`,\n * because there the component owns the tag.\n *\n * The trigger is also the layer's *branch*: a press on it is inside the layer\n * as far as `dismissable-layer` is concerned, or opening would immediately be\n * read as an outside press and close what it just opened.\n */\n@Directive({\n selector: '[slDialogTrigger]',\n standalone: true,\n exportAs: 'slDialogTrigger',\n host: {\n '[attr.data-part]': 'part',\n type: 'button',\n '[attr.aria-haspopup]': \"'dialog'\",\n '[attr.aria-expanded]': 'dialog().open()',\n '[attr.aria-controls]': 'controls()',\n '[attr.data-open]': \"dialog().open() ? '' : null\",\n '[id]': 'dialog().triggerId',\n '(click)': 'press($event)',\n },\n})\nexport class SlDialogTrigger implements OnInit, OnDestroy {\n /** The layer this control opens, reached with a template reference variable. */\n readonly dialog = input.required<SlDialogBase>({ alias: 'slDialogTrigger' });\n\n private readonly native: HTMLElement = inject(ElementRef).nativeElement;\n\n /** `trigger`, unless the element is another family's root. */\n protected readonly part = ownPart(this.native, 'trigger');\n\n protected readonly controls = computed(() =>\n this.dialog().mounted() ? this.dialog().contentId : null,\n );\n\n ngOnInit() {\n this.dialog().triggerNode.set(this.native);\n }\n\n ngOnDestroy() {\n if (this.dialog().triggerNode() === this.native) this.dialog().triggerNode.set(null);\n }\n\n protected press(event: MouseEvent) {\n /* The consumer's own handler ran first, and `preventDefault()` refuses the\n open — composed with, never replaced. */\n if (event.defaultPrevented) return;\n this.dialog().request(true, activationReason(event), undefined, event);\n }\n}\n\n/**\n * The header, and the one part of it the family renders rather than the\n * consumer: the full-screen toggle, when the layer was asked for one.\n *\n * It is written in the DOM after whatever the consumer projected. The title\n * and the description come first for a reader moving through the header, and\n * the two corner controls are adjacent peers whose order carries no meaning —\n * a toggle written first would be announced ahead of the name of the dialog it\n * belongs to. The stylesheet puts it in the column before the close, which is\n * where a window's controls put it.\n *\n * It is a component on the consumer's own `<header>`, so the toggle is a child\n * of that element written after the projected content, which is the DOM React\n * reaches by rendering the part; the two have to land together.\n *\n * `aria-pressed` says which way the toggle is set, so the name stays one word\n * in every state: a label that changed with the state would be read as a\n * second control. The mark is the opposite of the state, because a mark on a\n * control says what pressing it does.\n */\n@Component({\n selector: '[slDialogHeader]',\n standalone: true,\n exportAs: 'slDialogHeader',\n imports: [SlGlyph, SlIcon],\n template: `<ng-content />\n @if (dialog.resolvedFullscreenToggle()) {\n <button\n type=\"button\"\n data-part=\"fullscreen\"\n [attr.aria-label]=\"dialog.t('fullScreen')\"\n [attr.aria-pressed]=\"dialog.resolvedFullscreen()\"\n (click)=\"toggle($event)\"\n >\n <span slIcon\n ><svg slGlyph [name]=\"dialog.resolvedFullscreen() ? 'minimize' : 'maximize'\"></svg\n ></span>\n </button>\n }`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { 'data-part': 'header' },\n})\nexport class SlDialogHeader {\n protected readonly dialog = inject(SlDialogBase);\n\n protected toggle(event: MouseEvent) {\n if (event.defaultPrevented) return;\n this.dialog.requestFullscreen(\n !this.dialog.resolvedFullscreen(),\n activationReason(event) === 'keyboard' ? 'keyboard' : 'pointer',\n event,\n );\n }\n}\n\n/** The visible name, which `aria-labelledby` points at. */\n@Directive({\n selector: '[slDialogTitle]',\n standalone: true,\n exportAs: 'slDialogTitle',\n host: { 'data-part': 'title', '[id]': 'dialog.titleId' },\n})\nexport class SlDialogTitle implements OnInit, OnDestroy {\n protected readonly dialog = inject(SlDialogBase);\n\n ngOnInit() {\n this.dialog.hasTitle.set(true);\n }\n\n ngOnDestroy() {\n this.dialog.hasTitle.set(false);\n }\n}\n\n/**\n * The sentence that says what the dialog is about. The alert dialog pattern\n * makes it mandatory; the modal dialog pattern makes it optional and advises\n * against it for structured content.\n */\n@Directive({\n selector: '[slDialogDescription]',\n standalone: true,\n exportAs: 'slDialogDescription',\n host: { 'data-part': 'description', '[id]': 'dialog.descriptionId' },\n})\nexport class SlDialogDescription implements OnInit, OnDestroy {\n protected readonly dialog = inject(SlDialogBase);\n\n ngOnInit() {\n this.dialog.hasDescription.set(true);\n }\n\n ngOnDestroy() {\n this.dialog.hasDescription.set(false);\n }\n}\n\n/**\n * The one row that scrolls, and the row `aria-busy` belongs to while the\n * content is still on its way — the header, the close button and Escape all\n * stay operable, because a loading dialog a reader cannot leave is the worse\n * failure of the two.\n */\n@Directive({\n selector: '[slDialogBody]',\n standalone: true,\n exportAs: 'slDialogBody',\n host: { 'data-part': 'body', '[attr.aria-busy]': \"dialog.loading() ? 'true' : null\" },\n})\nexport class SlDialogBody {\n protected readonly dialog = inject(SlDialogBase);\n}\n\n@Directive({\n selector: '[slDialogFooter]',\n standalone: true,\n exportAs: 'slDialogFooter',\n host: { 'data-part': 'footer' },\n})\nexport class SlDialogFooter {}\n\n/**\n * The ✕ in the corner. It carries `dismiss`, which is the word the closed\n * vocabulary in `docs/state-and-events.md` already has for what a close button\n * means; `docs/component-features.md` §8 calls the source `closeButton`, and a\n * twelfth reason would be a change to a contract outside this family.\n */\n@Component({\n selector: '[slDialogClose]',\n standalone: true,\n exportAs: 'slDialogClose',\n imports: [SlGlyph, SlIcon],\n /* The cross is drawn unless the consumer wrote content of their own. */\n template: `<ng-content\n ><span slIcon><svg slGlyph name=\"x\"></svg></span\n ></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-part': 'close',\n type: 'button',\n '[attr.aria-label]': 'label()',\n '(click)': 'press($event)',\n },\n})\nexport class SlDialogClose {\n /** The result the close carries out, which is the platform's `returnValue`. */\n readonly value = input<string | undefined>(undefined);\n\n private readonly dialog = inject(SlDialogBase);\n /** A consumer's own `aria-label`, which wins over the catalog. */\n private readonly ownLabel = inject(new HostAttributeToken('aria-label'), { optional: true });\n\n protected readonly label = computed(() => this.ownLabel ?? this.dialog.t('close'));\n\n constructor() {\n if (this.dialog.isAlert()) {\n throw new Error(\n 'sl-alert-dialog has no close part: a confirmation is answered with slAlertDialogCancel or slAlertDialogAction, not dismissed by an ✕.',\n );\n }\n }\n\n protected press(event: MouseEvent) {\n if (event.defaultPrevented) return;\n this.dialog.request(false, 'dismiss', this.value(), event);\n }\n}\n\n/**\n * The glyph each tone draws, and a triangle where no tone was resolved. Warning\n * and danger differ in silhouette as well as colour, because under forced\n * colours the silhouette is all that is left.\n */\nconst TONE_GLYPH: Record<DialogTone, GlyphName> = {\n accent: 'circle-info',\n secondary: 'circle-info',\n success: 'circle-check',\n warning: 'triangle-alert',\n danger: 'circle-alert',\n};\n\n/**\n * The tone's own mark, which is geometry rather than a character. A mark the\n * consumer writes as content replaces the tone's.\n */\n@Component({\n selector: '[slAlertDialogIcon]',\n standalone: true,\n exportAs: 'slAlertDialogIcon',\n imports: [SlGlyph, SlIcon],\n template: `<ng-content\n ><span slIcon><svg slGlyph [name]=\"glyph()\"></svg></span\n ></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { 'data-part': 'icon', 'aria-hidden': 'true' },\n})\nexport class SlAlertDialogIcon {\n private readonly dialog = inject(SlDialogBase);\n\n protected readonly glyph = computed<GlyphName>(() => {\n const tone = this.dialog.resolvedTone();\n return tone === null ? 'triangle-alert' : TONE_GLYPH[tone];\n });\n}\n\n/**\n * The least destructive action, and where focus lands when the layer opens.\n * That is the APG's own advice for a step that is not easily reversible, and it\n * is a default of the member rather than something a consumer remembers.\n */\n@Directive({\n selector: '[slAlertDialogCancel]',\n standalone: true,\n exportAs: 'slAlertDialogCancel',\n host: { '[attr.data-part]': 'part', type: 'button', '(click)': 'press($event)' },\n})\nexport class SlAlertDialogCancel implements OnInit, OnDestroy {\n readonly value = input<string>('cancel');\n\n private readonly dialog = inject(SlDialogBase);\n private readonly native: HTMLElement = inject(ElementRef).nativeElement;\n\n /** `cancel`, unless the element is another family's root. */\n protected readonly part = ownPart(this.native, 'cancel');\n\n ngOnInit() {\n this.dialog.cancelNode.set(this.native);\n }\n\n ngOnDestroy() {\n if (this.dialog.cancelNode() === this.native) this.dialog.cancelNode.set(null);\n }\n\n protected press(event: MouseEvent) {\n if (event.defaultPrevented) return;\n this.dialog.request(false, 'dismiss', this.value(), event);\n }\n}\n\n/**\n * The action being confirmed. It carries `submit`, because confirming is what\n * the reader came to do, and `dismiss` is what the other two controls mean.\n */\n@Directive({\n selector: '[slAlertDialogAction]',\n standalone: true,\n exportAs: 'slAlertDialogAction',\n host: { '[attr.data-part]': 'part', type: 'button', '(click)': 'press($event)' },\n})\nexport class SlAlertDialogAction {\n readonly value = input<string>('confirm');\n\n private readonly dialog = inject(SlDialogBase);\n\n /** `action`, unless the element is another family's root. */\n protected readonly part = ownPart(inject(ElementRef).nativeElement as HTMLElement, 'action');\n\n protected press(event: MouseEvent) {\n if (event.defaultPrevented) return;\n this.dialog.request(false, 'submit', this.value(), event);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAoHA,MAAM,QAAQ,GAAmB;AAC/B,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,MAAM,EAAE,OAAO;AACf,IAAA,UAAU,EAAE,QAAQ;AACpB,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,YAAY,EAAE,OAAO;AACrB,IAAA,SAAS,EAAE,QAAQ;AACnB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,OAAO,EAAE,OAAO;CACjB;MAEY,eAAe,GAAG,IAAI,cAAc,CAAiB,yBAAyB,EAAE;AAC3F,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,QAAQ;AACxB,CAAA;AAED;;;;;;AAMG;AACG,SAAU,qBAAqB,CAAC,QAAiC,EAAA;IACrE,OAAO;AACL,QAAA,OAAO,EAAE,eAAe;AACxB,QAAA,UAAU,EAAE,OAAuB,EAAE,GAAG,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAC;KACjE;AACH;AAEA;SACgB,oBAAoB,GAAA;AAClC,IAAA,OAAO,MAAM,CAAC,eAAe,CAAC;AAChC;AAEA;;;;;AAKG;MAEU,iBAAiB,CAAA;IACpB,KAAK,GAAG,CAAC;IA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AAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,IAAI,EAAE,EAAE,kBAAkB,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE;AACjF,iBAAA;;;ACrVD;;AAEG;;"}
1
+ {"version":3,"file":"slotted-angular-dialog.mjs","sources":["../../dialog/src/dialog-defaults.ts","../../dialog/src/dialog.ts","../../dialog/src/dialog-parts.ts","../../dialog/src/slotted-angular-dialog.ts"],"sourcesContent":["import { inject, Injectable, InjectionToken } from '@angular/core';\n\n/**\n * The panel's measure. Five named steps rather than the pixel string Material,\n * Carbon and Ant all take: a theme can retune a step and cannot retune\n * `width: '600px'`, and a family that accepted one would carry a second scale.\n */\nexport type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';\n\n/** Where the panel sits in the layer. `top` is for content that grows. */\nexport type DialogPlacement = 'center' | 'top';\n\n/**\n * What scrolls. `content` bounds the panel to the layer and scrolls its body,\n * which is what keeps the footer on screen; `viewport` scrolls the whole panel,\n * for content that is a document rather than a task.\n */\nexport type DialogScroll = 'content' | 'viewport';\n\n/**\n * Whether the family paints the panel at all. `plain` turns off the surface,\n * the border, the radius, the shadow, the rows and the padding, and keeps\n * everything that is not paint: the portal, the scrim, presence, the focus\n * containment and restoration, the dismissal policy and the z-index stack.\n *\n * It is what a consumer reaches for to put the layer around a box of their own\n * — a `slCard`, a media viewer, an image at its own aspect ratio. The cost is\n * that a plain panel does not keep its footer on screen for a long body,\n * because the three rows go with the paint.\n */\nexport type DialogSurface = 'panel' | 'plain';\n\n/**\n * When the layer exists. `active` builds it on opening and drops it once the\n * exit is over, `lazy` builds it on the first open and keeps it, `eager` builds\n * it up front and hides it.\n *\n * The default is the opposite of `collapsible`'s, and for the same reason: a\n * disclosure's panel transitions its own height and has to be in the DOM, while\n * a layer transitions opacity and `@slotted/core/presence` already keeps it\n * mounted for its own exit.\n */\nexport type DialogMount = 'active' | 'lazy' | 'eager';\n\n/**\n * When the panel spends the whole layer. `narrow` is a container query at a\n * literal breakpoint, which is what `docs/component-features.md` §2.7 means by\n * a responsive mode that can be tested deterministically.\n */\nexport type DialogFullScreen = 'never' | 'narrow' | 'always';\n\n/** Whether a dismissal source closes the layer. */\nexport type DialogDismissPolicy = 'close' | 'none';\n\n/** The five semantic tones. An alert dialog draws its mark from this. */\nexport type DialogTone = 'accent' | 'secondary' | 'success' | 'warning' | 'danger';\n\n/** Where focus goes when the layer opens. */\nexport type DialogInitialFocus = 'first' | 'container' | 'cancel' | HTMLElement | false;\n\n/** Where focus goes when the layer closes. Defaults to the trigger. */\nexport type DialogFinalFocus = HTMLElement | false;\n\n/** Why the layer opened or closed. */\nexport type DialogOpenReason =\n | 'pointer'\n | 'keyboard'\n | 'dismiss'\n | 'escape'\n | 'outsidePress'\n | 'back'\n | 'submit'\n | 'programmatic';\n\n/**\n * The request the family emits before the layer moves, with the result the\n * close carried. `result` is what the platform calls `returnValue` and what\n * Angular Material returns from `afterClosed()`; it rides on the request rather\n * than declaring a second state model, because nothing about it is controlled.\n */\nexport interface DialogChangeRequest {\n readonly value: boolean;\n readonly previous: boolean;\n readonly reason: DialogOpenReason;\n readonly result?: string | undefined;\n readonly source?: unknown;\n readonly cancelled: boolean;\n cancel(): void;\n}\n\n/** Why the panel took the layer, or gave it back. */\nexport type DialogFullscreenReason = 'pointer' | 'keyboard' | 'programmatic';\n\nexport interface DialogFullscreenRequest {\n readonly value: boolean;\n readonly previous: boolean;\n readonly reason: DialogFullscreenReason;\n readonly source?: unknown;\n readonly cancelled: boolean;\n cancel(): void;\n}\n\nexport interface DialogDefaults {\n /** The platform's way back — a phone's gesture, a browser's button — closes a modal layer. */\n back: DialogDismissPolicy;\n escape: DialogDismissPolicy;\n fullScreen: DialogFullScreen;\n modal: boolean;\n mount: DialogMount;\n outsidePress: DialogDismissPolicy;\n placement: DialogPlacement;\n scroll: DialogScroll;\n size: DialogSize;\n surface: DialogSurface;\n}\n\nconst FALLBACK: DialogDefaults = {\n back: 'close',\n escape: 'close',\n fullScreen: 'narrow',\n modal: true,\n mount: 'active',\n outsidePress: 'close',\n placement: 'center',\n scroll: 'content',\n size: 'md',\n surface: 'panel',\n};\n\nexport const DIALOG_DEFAULTS = new InjectionToken<DialogDefaults>('slotted dialog defaults', {\n providedIn: 'root',\n factory: () => FALLBACK,\n});\n\n/**\n * An application decides once how its dialogs behave and look, rather than\n * repeating the same eight inputs on every one in a product. Angular Material\n * is the only surveyed implementation with an equivalent —\n * `MAT_DIALOG_DEFAULT_OPTIONS` — and React gets one here too rather than being\n * levelled down to the smaller shape.\n */\nexport function provideDialogDefaults(defaults: Partial<DialogDefaults>) {\n return {\n provide: DIALOG_DEFAULTS,\n useFactory: (): DialogDefaults => ({ ...FALLBACK, ...defaults }),\n };\n}\n\n/** What a dialog renders as here, before it states anything of its own. */\nexport function injectDialogDefaults(): DialogDefaults {\n return inject(DIALOG_DEFAULTS);\n}\n\n/**\n * Application-scoped rather than module-scoped, for the reason `field` records:\n * a module-level counter produces colliding sequences when two applications\n * render in one server process, and the server and the client sequences must\n * match for hydration.\n */\n@Injectable({ providedIn: 'root' })\nexport class SlDialogIdFactory {\n private count = 0;\n\n next() {\n this.count += 1;\n return `slotted-dialog-${this.count}`;\n }\n}\n","import { injectMessages } from '@slotted/angular/i18n';\nimport { createDismissableLayer } from '@slotted/core/dismissable-layer';\nimport type { DismissableLayerHandle } from '@slotted/core/dismissable-layer';\nimport { createFocusScope } from '@slotted/core/focus';\nimport { dialogMessages, type DialogMessages, type PartialMessages } from '@slotted/core/i18n';\nimport type { FocusScopeHandle } from '@slotted/core/focus';\nimport { observeKeyboardInset } from '@slotted/core/measure';\nimport { createPortalRoot } from '@slotted/core/portal';\nimport type { PortalRootHandle } from '@slotted/core/portal';\nimport { createPresence } from '@slotted/core/presence';\nimport type { PresenceHandle, PresenceStatus } from '@slotted/core/presence';\nimport { createControllable } from '@slotted/core/state';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n forwardRef,\n HostAttributeToken,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { injectDialogDefaults, SlDialogIdFactory } from './dialog-defaults';\nimport type {\n DialogChangeRequest,\n DialogDismissPolicy,\n DialogFinalFocus,\n DialogFullScreen,\n DialogFullscreenReason,\n DialogFullscreenRequest,\n DialogInitialFocus,\n DialogMount,\n DialogOpenReason,\n DialogPlacement,\n DialogScroll,\n DialogSize,\n DialogSurface,\n DialogTone,\n} from './dialog-defaults';\n\n/**\n * A window over the page, and the scrim that says the page is out of reach.\n *\n * The layer is composed from `packages/core` and rewritten nowhere: `portal`\n * decides where it lives and keeps the theme of the region that opened it,\n * `dismissable-layer` owns Escape, outside press, `inert`, the scroll lock and\n * the single z-index stack, `presence` keeps it mounted long enough to leave,\n * and `focus` contains the keyboard and gives it back to the trigger.\n *\n * **The host is not the layer.** `<sl-dialog>` renders `display: contents` and\n * stays exactly where the consumer wrote it; the layer is the `div` in the\n * template, and it is that `div` which is moved into the portal. Two things\n * follow, and both are better than the alternative: `mount=\"active\"` can remove\n * the layer outright, as React's does, and the host is the portal's *origin* —\n * so the layer inherits the scheme, density, theme and direction of the region\n * the consumer wrote it in, whether a trigger exists or not. React has to use\n * the trigger for that, and the design document records the asymmetry.\n */\n@Directive()\nexport abstract class SlDialogBase {\n protected abstract readonly member: 'dialog' | 'alertDialog';\n\n /** Whether the layer is open. Two-way, so a template may bind it directly. */\n readonly open = model<boolean>(false);\n\n readonly size = input<DialogSize | undefined>(undefined);\n readonly placement = input<DialogPlacement | undefined>(undefined);\n readonly scroll = input<DialogScroll | undefined>(undefined);\n readonly surface = input<DialogSurface | undefined>(undefined);\n readonly mount = input<DialogMount | undefined>(undefined);\n readonly fullScreen = input<DialogFullScreen | undefined>(undefined);\n /**\n * Whether the header renders the control that hands the layer to the panel.\n * Off, because a dialog holds one task and most tasks are the size the\n * consumer chose. `fullScreen` is the other question — the responsive rule\n * set in advance — and this is the reader's own.\n */\n readonly fullscreenToggle = input(false, { transform: booleanAttribute });\n /** Whether the reader has taken the layer. Two-way, as `open` is. */\n readonly fullscreen = model<boolean>(false);\n readonly escape = input<DialogDismissPolicy | undefined>(undefined);\n /**\n * The platform's way back — a phone's gesture, a browser's button — closes\n * the layer instead of leaving the page, while the layer is modal.\n */\n readonly back = input<DialogDismissPolicy | undefined>(undefined);\n /** Whether the layer's content is still on its way. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** A parent for this layer alone, instead of the shared portal root. */\n readonly container = input<Element | null | undefined>(undefined);\n readonly initialFocus = input<DialogInitialFocus | undefined>(undefined);\n readonly finalFocus = input<DialogFinalFocus | undefined>(undefined);\n /**\n * Words laid over the catalog of the language in force, key by key: the\n * corner controls' names (`close`, `fullScreen`).\n */\n readonly messages = input<PartialMessages<DialogMessages> | undefined>(undefined);\n\n /** One output for one transition, carrying the reason, the result and the event. */\n readonly openChangeRequest = output<DialogChangeRequest>();\n /**\n * What `afterClosed()` is in Angular Material, as an output. It fires once the\n * layer has actually closed, with the result the close carried.\n */\n readonly closed = output<string | undefined>();\n /** One output for one transition of the state the toggle sets. */\n readonly fullscreenChangeRequest = output<DialogFullscreenRequest>();\n\n protected readonly defaults = injectDialogDefaults();\n /** The family's words in the language in force, with this layer's `messages` laid over them. */\n readonly t = injectMessages(dialogMessages, this.messages);\n protected readonly host: HTMLElement = inject(ElementRef).nativeElement;\n private readonly destroyRef = inject(DestroyRef);\n private readonly baseId = inject(SlDialogIdFactory).next();\n\n /** The element the consumer wrote us beside, recorded before anything moves. */\n private readonly origin = this.host.parentElement;\n\n /**\n * A consumer's own `aria-label` on `<sl-dialog>`, read before the host\n * bindings are written and moved to the panel, which is the element the role\n * is on. Without this a label written on the host would name a box with\n * `display: contents` and no role at all.\n */\n private readonly writtenLabel = inject(new HostAttributeToken('aria-label'), {\n optional: true,\n });\n\n protected readonly layerRef = viewChild<ElementRef<HTMLElement>>('layer');\n protected readonly panelRef = viewChild<ElementRef<HTMLElement>>('panel');\n\n /** The parts that have said they exist, so only what was rendered is wired. */\n readonly hasTitle = signal(false);\n readonly hasDescription = signal(false);\n readonly cancelNode = signal<HTMLElement | null>(null);\n readonly triggerNode = signal<HTMLElement | null>(null);\n\n readonly titleId = `${this.baseId}-title`;\n readonly descriptionId = `${this.baseId}-description`;\n readonly contentId = `${this.baseId}-content`;\n readonly triggerId = `${this.baseId}-trigger`;\n\n /**\n * The status rather than a boolean. `entering` is one frame long and it is\n * the whole reason it exists: a layer that appears already open gives its CSS\n * transition no closed style to start from.\n */\n private readonly status = signal<PresenceStatus>('unmounted');\n /**\n * The status is a signal and the template reads it, and that is not enough on\n * its own. `presence` answers `sync` from inside the effect that watches\n * `open`, which runs as part of this view's own change detection and after its\n * bindings have been written: the write marked no consumer, no further pass\n * followed, and the layer stayed in the document with `inert` and the closed\n * attribute of a dialog that reported itself open. It was measured on a layer\n * opened from a bound state rather than from a trigger — the family's own\n * stories all open from a trigger, which is why it stood for nine rounds.\n */\n private readonly changes = inject(ChangeDetectorRef);\n private readonly presence: PresenceHandle = createPresence({\n present: false,\n onStatusChange: (next) => {\n this.status.set(next);\n this.changes.markForCheck();\n },\n });\n\n /** Whether this layer has ever been open, which is what `lazy` reads. */\n private readonly seen = signal(false);\n private readonly result = signal<string | undefined>(undefined);\n\n readonly isAlert = computed(() => this.member === 'alertDialog');\n readonly resolvedModal = computed(() => (this.isAlert() ? true : this.modalInput()));\n readonly resolvedOutsidePress = computed<DialogDismissPolicy>(() =>\n this.isAlert() ? 'none' : this.outsidePressInput(),\n );\n readonly resolvedMount = computed(() => this.mount() ?? this.defaults.mount);\n readonly resolvedSize = computed(\n () => this.size() ?? (this.isAlert() ? 'sm' : this.defaults.size),\n );\n readonly resolvedPlacement = computed(() => this.placement() ?? this.defaults.placement);\n readonly resolvedScroll = computed(() => this.scroll() ?? this.defaults.scroll);\n readonly resolvedSurface = computed(() => this.surface() ?? this.defaults.surface);\n readonly resolvedFullScreen = computed(\n () => this.fullScreen() ?? (this.isAlert() ? 'never' : this.defaults.fullScreen),\n );\n readonly resolvedEscape = computed(() => this.escape() ?? this.defaults.escape);\n readonly resolvedBack = computed(() => this.back() ?? this.defaults.back);\n /**\n * A confirmation has no corner controls at all, for the reason it has no\n * close button, so neither the state nor the control that sets it is its.\n */\n readonly resolvedFullscreen = computed(() => !this.isAlert() && this.fullscreen());\n readonly resolvedFullscreenToggle = computed(() => !this.isAlert() && this.fullscreenToggle());\n readonly resolvedInitialFocus = computed<DialogInitialFocus>(\n () => this.initialFocus() ?? (this.isAlert() ? 'cancel' : 'first'),\n );\n readonly resolvedTone = computed<DialogTone | null>(() =>\n this.isAlert() ? this.toneInput() : null,\n );\n\n /** Overridden by the member that has them; the base has neither. */\n protected modalInput(): boolean {\n return this.defaults.modal;\n }\n protected outsidePressInput(): DialogDismissPolicy {\n return this.defaults.outsidePress;\n }\n protected toneInput(): DialogTone {\n return 'danger';\n }\n\n readonly mounted = computed(() => {\n const mount = this.resolvedMount();\n if (mount === 'eager') return true;\n if (mount === 'lazy') return this.seen();\n return this.status() !== 'unmounted';\n });\n\n /** What the stylesheet keys on, which is a frame behind what was asked. */\n readonly visible = computed(() => this.status() === 'open');\n /**\n * Whether the layer takes focus and the pointer. `entering` counts: the\n * focus scope enters in that frame, and a layer still `inert` then refuses\n * the initial focus and leaves it on `body`.\n */\n readonly interactive = computed(() => {\n const status = this.status();\n return status === 'entering' || status === 'open';\n });\n\n readonly labelledBy = computed(() =>\n this.hasTitle() && this.writtenLabel === null ? this.titleId : null,\n );\n readonly describedBy = computed(() => (this.hasDescription() ? this.descriptionId : null));\n readonly label = computed(() => this.writtenLabel);\n readonly role = computed(() => (this.isAlert() ? 'alertdialog' : 'dialog'));\n\n private portal: PortalRootHandle | null = null;\n private layer: DismissableLayerHandle | null = null;\n private scope: FocusScopeHandle | null = null;\n /** Whether the layer, the focus scope and the `closed` owed are standing. */\n private engaged = false;\n\n /**\n * The layer this one was written inside, and the layers written inside this\n * one. A confirmation whose action also closes the dialog under it closes\n * both in one change, and Angular runs the dialog's effect first: taken down\n * from the bottom, the dialog found focus in the confirmation and restored\n * nothing, and the confirmation then handed focus to a control in a layer\n * already leaving — `body`, once that layer was gone. The layers come down\n * from the top instead, as React's effects take them down.\n */\n private readonly parent = inject(SlDialogBase, { optional: true, skipSelf: true });\n private readonly nested = new Set<SlDialogBase>();\n\n constructor() {\n this.parent?.nested.add(this);\n effect(() => {\n if (this.open()) this.seen.set(true);\n this.presence.sync(this.open());\n });\n\n /** Where the layer lives, for as long as it is in the document. */\n effect(() => {\n const node = this.layerRef()?.nativeElement ?? null;\n this.presence.setNode(node);\n\n if (node === null) {\n this.releasePortal();\n return;\n }\n if (this.portal !== null) return;\n\n const named = this.container();\n this.portal = createPortalRoot({\n origin: this.origin,\n ...(named === undefined ? {} : { container: named }),\n });\n this.portal.container?.append(node);\n });\n\n /**\n * Everything the layer does while it is open, taken down when it closes\n * rather than when the node leaves — `presence` keeps the node mounted\n * through the exit, and a layer still holding the scroll lock and the\n * background's `inert` for those milliseconds is a page nobody can touch.\n */\n effect((onCleanup) => {\n const node = this.layerRef()?.nativeElement;\n const panel = this.panelRef()?.nativeElement;\n if (!this.open() || node === undefined || panel === undefined) return;\n\n const escape = this.resolvedEscape() === 'close';\n const outsidePress = this.resolvedOutsidePress() === 'close';\n const modal = this.resolvedModal();\n /* A history entry is a modal layer's: a layer the page stays reachable\n under has no claim on the way back. */\n const back = modal && this.resolvedBack() === 'close';\n const trigger = this.triggerNode();\n\n /* The frame is the layer and the panel is what a press is inside of: the\n scrim and the viewport around the panel are the way out. The click, not\n the pointerdown, so a selection dragged out of the panel is not a press\n on the scrim. */\n this.layer = createDismissableLayer(node, {\n back,\n branches: trigger === null ? [] : [trigger],\n content: panel,\n escape,\n modal,\n onDismiss: (request) => {\n if (request.reason === 'outsidePress' && !outsidePress) return request.cancel();\n this.request(false, request.reason as DialogOpenReason, undefined, request.source);\n },\n outsidePress,\n outsidePressEvent: 'click',\n });\n\n const wanted = this.resolvedInitialFocus();\n const returnTo = this.finalFocus();\n this.scope = createFocusScope(panel, {\n contain: modal,\n initial:\n wanted === 'cancel'\n ? () => this.cancelNode()\n : wanted instanceof HTMLElement\n ? () => wanted\n : wanted,\n ...(returnTo === undefined\n ? {}\n : { restore: returnTo === false ? (false as const) : () => returnTo }),\n });\n this.scope.enter();\n this.engaged = true;\n\n onCleanup(() => this.takeDown());\n });\n\n /**\n * The virtual keyboard, while the panel can cover the layer: the layer\n * carries what the keys cover, and the stylesheet ends a full-screen\n * panel's rows above them. A centred panel reads nothing from it.\n */\n effect((onCleanup) => {\n const node = this.layerRef()?.nativeElement;\n const coversLayer = this.resolvedFullScreen() !== 'never' || this.resolvedFullscreen();\n if (!this.open() || node === undefined || !coversLayer) return;\n const stop = observeKeyboardInset(node.ownerDocument.defaultView, (pixels) => {\n if (pixels === 0) node.style.removeProperty('--slotted-keyboard-inset');\n else node.style.setProperty('--slotted-keyboard-inset', `${pixels}px`);\n });\n onCleanup(() => {\n stop();\n node.style.removeProperty('--slotted-keyboard-inset');\n });\n });\n\n this.destroyRef.onDestroy(() => {\n this.parent?.nested.delete(this);\n this.layer?.destroy();\n this.scope?.destroy();\n this.presence.destroy();\n this.releasePortal();\n });\n }\n\n /**\n * Takes down what the layer does while it is open, once per opening. The\n * nested layers that closed in the same change go first.\n *\n * The layer before the scope: it lifts the `inert` it wrote on the\n * background, and a browser refuses focus inside an inert subtree, so a\n * scope taken down first hands focus back to a trigger that cannot take it.\n */\n private takeDown() {\n if (!this.engaged) return;\n this.engaged = false;\n for (const layer of this.nested) if (!layer.open()) layer.takeDown();\n this.layer?.destroy();\n this.layer = null;\n this.scope?.destroy();\n this.scope = null;\n this.closed.emit(this.result());\n this.result.set(undefined);\n }\n\n /**\n * The layer element is given back to the host before the portal goes, so\n * Angular removes a node that is where its own view expects it to be.\n */\n private releasePortal() {\n if (this.portal === null) return;\n const node = this.layerRef()?.nativeElement;\n if (node !== undefined) this.host.append(node);\n this.portal.release();\n this.portal = null;\n }\n\n /** Asks to move, carrying the reason, the result and the originating event. */\n request(next: boolean, reason: DialogOpenReason, result: string | undefined, source: unknown) {\n if (next === this.open()) return;\n\n let cancelled = false;\n const state = createControllable<boolean>({\n initial: this.open(),\n onRequest: (raw) => {\n cancelled = raw.cancelled;\n this.openChangeRequest.emit({\n cancel: () => raw.cancel(),\n get cancelled() {\n return raw.cancelled;\n },\n previous: raw.previous,\n reason,\n result,\n source: raw.source,\n value: raw.value,\n });\n },\n });\n\n if (!state.request(next, reason, source) || cancelled) return;\n if (!next) this.result.set(result);\n this.open.set(next);\n }\n\n /** Asks to take the layer or give it back, carrying the reason and the event. */\n requestFullscreen(next: boolean, reason: DialogFullscreenReason, source: unknown) {\n if (next === this.resolvedFullscreen()) return;\n\n let cancelled = false;\n const state = createControllable<boolean>({\n initial: this.fullscreen(),\n onRequest: (raw) => {\n cancelled = raw.cancelled;\n this.fullscreenChangeRequest.emit({\n cancel: () => raw.cancel(),\n get cancelled() {\n return raw.cancelled;\n },\n previous: raw.previous,\n reason,\n source: raw.source,\n value: raw.value,\n });\n },\n });\n\n if (!state.request(next, reason, source) || cancelled) return;\n this.fullscreen.set(next);\n }\n\n /** Opens the layer from code, carrying `programmatic`. */\n openDialog() {\n this.request(true, 'programmatic', undefined, undefined);\n }\n\n /** Closes it from code, carrying `programmatic` and the result given. */\n close(result?: string) {\n this.request(false, 'programmatic', result, undefined);\n }\n\n /** Moves focus into the layer, as opening does. */\n focus() {\n this.panelRef()?.nativeElement.focus();\n }\n}\n\n/**\n * One template for the two members. `tag` already names its own the same way,\n * which is what says the compiler folds it: `entry-points.source.test.mjs`\n * refuses an identifier for `styleUrl` because that one needs a file resolved\n * at build time, and a template string needs nothing resolved at all.\n */\nconst LAYER_TEMPLATE = `\n @if (mounted()) {\n <div\n #layer\n data-ui=\"dialog\"\n data-part=\"root\"\n [attr.data-size]=\"resolvedSize()\"\n [attr.data-placement]=\"resolvedPlacement()\"\n [attr.data-scroll]=\"resolvedScroll()\"\n [attr.data-surface]=\"resolvedSurface()\"\n [attr.data-mount]=\"resolvedMount()\"\n [attr.data-full-screen]=\"resolvedFullScreen()\"\n [attr.data-fullscreen]=\"resolvedFullscreen() ? '' : null\"\n [attr.data-outside-press]=\"resolvedOutsidePress()\"\n [attr.data-tone]=\"resolvedTone()\"\n [attr.data-modal]=\"resolvedModal() ? '' : null\"\n [attr.data-open]=\"visible() ? '' : null\"\n [attr.data-loading]=\"loading() ? '' : null\"\n [attr.inert]=\"interactive() ? null : ''\"\n >\n <div data-part=\"backdrop\"></div>\n <div data-part=\"viewport\">\n <div\n #panel\n data-part=\"content\"\n [id]=\"contentId\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"resolvedModal() ? 'true' : null\"\n [attr.aria-label]=\"label()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"describedBy()\"\n >\n <ng-content />\n </div>\n </div>\n </div>\n }`;\n\n@Component({\n selector: 'sl-dialog',\n standalone: true,\n exportAs: 'slDialog',\n template: LAYER_TEMPLATE,\n styleUrl: '../../../styles/src/dialog/dialog.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n /* The host is the origin the layer inherits its theme from, and nothing else. */\n host: { '[style.display]': \"'contents'\" },\n providers: [{ provide: SlDialogBase, useExisting: forwardRef(() => SlDialog) }],\n})\nexport class SlDialog extends SlDialogBase {\n protected readonly member = 'dialog' as const;\n\n /**\n * Whether the background is inert, the scroll is locked and focus is\n * contained. A non-modal layer writes no `aria-modal`, which the APG requires\n * of anything that does not actually make the background unreachable.\n */\n readonly modal = input(true, { transform: booleanAttribute });\n readonly outsidePress = input<DialogDismissPolicy | undefined>(undefined);\n\n protected override modalInput() {\n return this.modal();\n }\n\n protected override outsidePressInput() {\n return this.outsidePress() ?? this.defaults.outsidePress;\n }\n}\n\n/**\n * A dialog that interrupts to confirm something irreversible.\n *\n * Two rules are fixed rather than left to an input: outside press never closes\n * it, and it is always modal. Ark and React Aria make the role a prop, so a\n * consumer who sets `role=\"alertdialog\"` and forgets the dismissal policy ships\n * a destructive confirmation a stray click dismisses.\n *\n * Focus lands on `slAlertDialogCancel` rather than on the first tabbable\n * element, which is the APG's own advice for a step that is not easily\n * reversible.\n */\n@Component({\n selector: 'sl-alert-dialog',\n standalone: true,\n exportAs: 'slAlertDialog',\n template: LAYER_TEMPLATE,\n styleUrl: '../../../styles/src/dialog/dialog.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { '[style.display]': \"'contents'\" },\n providers: [{ provide: SlDialogBase, useExisting: forwardRef(() => SlAlertDialog) }],\n})\nexport class SlAlertDialog extends SlDialogBase {\n protected readonly member = 'alertDialog' as const;\n\n readonly tone = input<DialogTone>('danger');\n\n constructor() {\n super();\n\n /**\n * The alert dialog pattern *requires* `aria-describedby`. A confirmation\n * announced as a title and two buttons, with the sentence saying what is\n * about to be destroyed left out, is the failure the requirement exists\n * for — so it fails loudly rather than shipping.\n *\n * The DOM rather than the signal: projected content is created before this\n * effect flushes, so the element is there and the signal it sets may not\n * have been read yet.\n */\n effect(() => {\n const panel = this.panelRef()?.nativeElement;\n if (!this.open() || panel === undefined) return;\n if (panel.querySelector('[data-part=\"description\"]') !== null) return;\n throw new Error(\n 'sl-alert-dialog requires an element with slDialogDescription: the alertdialog pattern makes aria-describedby mandatory.',\n );\n });\n }\n\n protected override toneInput() {\n return this.tone();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n ElementRef,\n HostAttributeToken,\n inject,\n input,\n OnDestroy,\n OnInit,\n} from '@angular/core';\nimport { SlGlyph, SlIcon } from '@slotted/angular/icon';\nimport type { GlyphName } from '@slotted/angular/icon';\n\nimport { SlDialogBase } from './dialog';\nimport type { DialogOpenReason, DialogTone } from './dialog-defaults';\n\n/**\n * A click synthesised by the keyboard reports no detail; a real one reports the\n * click count. It is how `Enter`, `Space` and a pointer are told apart without\n * a key listener existing for something the platform already handles.\n */\nfunction activationReason(event: MouseEvent): DialogOpenReason {\n return event.detail === 0 ? 'keyboard' : 'pointer';\n}\n\n/**\n * The part a control names. On an element another family draws — `slButton` —\n * that family's root stays its part: two directives write one attribute, and\n * the family the element is drawn by keeps it, as React's `render` does by\n * spreading the button's props last.\n */\nfunction ownPart(native: HTMLElement, part: string): string | null {\n return native.hasAttribute('data-ui') ? native.getAttribute('data-part') : part;\n}\n\n/**\n * The control that opens a layer.\n *\n * It is the consumer's own element, which is what this ecosystem composes with:\n * `<button slButton slDialogTrigger [dialog]=\"d\">` is the library's own button\n * and this adds the wiring to it. React reaches the same place with `render`,\n * because there the component owns the tag.\n *\n * The trigger is also the layer's *branch*: a press on it is inside the layer\n * as far as `dismissable-layer` is concerned, or opening would immediately be\n * read as an outside press and close what it just opened.\n */\n@Directive({\n selector: '[slDialogTrigger]',\n standalone: true,\n exportAs: 'slDialogTrigger',\n host: {\n '[attr.data-part]': 'part',\n type: 'button',\n '[attr.aria-haspopup]': \"'dialog'\",\n '[attr.aria-expanded]': 'dialog().open()',\n '[attr.aria-controls]': 'controls()',\n '[attr.data-open]': \"dialog().open() ? '' : null\",\n '[id]': 'dialog().triggerId',\n '(click)': 'press($event)',\n },\n})\nexport class SlDialogTrigger implements OnInit, OnDestroy {\n /** The layer this control opens, reached with a template reference variable. */\n readonly dialog = input.required<SlDialogBase>({ alias: 'slDialogTrigger' });\n\n private readonly native: HTMLElement = inject(ElementRef).nativeElement;\n\n /** `trigger`, unless the element is another family's root. */\n protected readonly part = ownPart(this.native, 'trigger');\n\n protected readonly controls = computed(() =>\n this.dialog().mounted() ? this.dialog().contentId : null,\n );\n\n ngOnInit() {\n this.dialog().triggerNode.set(this.native);\n }\n\n ngOnDestroy() {\n if (this.dialog().triggerNode() === this.native) this.dialog().triggerNode.set(null);\n }\n\n protected press(event: MouseEvent) {\n /* The consumer's own handler ran first, and `preventDefault()` refuses the\n open — composed with, never replaced. */\n if (event.defaultPrevented) return;\n this.dialog().request(true, activationReason(event), undefined, event);\n }\n}\n\n/**\n * The header, and the one part of it the family renders rather than the\n * consumer: the full-screen toggle, when the layer was asked for one.\n *\n * It is written in the DOM after whatever the consumer projected. The title\n * and the description come first for a reader moving through the header, and\n * the two corner controls are adjacent peers whose order carries no meaning —\n * a toggle written first would be announced ahead of the name of the dialog it\n * belongs to. The stylesheet puts it in the column before the close, which is\n * where a window's controls put it.\n *\n * It is a component on the consumer's own `<header>`, so the toggle is a child\n * of that element written after the projected content, which is the DOM React\n * reaches by rendering the part; the two have to land together.\n *\n * `aria-pressed` says which way the toggle is set, so the name stays one word\n * in every state: a label that changed with the state would be read as a\n * second control. The mark is the opposite of the state, because a mark on a\n * control says what pressing it does.\n */\n@Component({\n selector: '[slDialogHeader]',\n standalone: true,\n exportAs: 'slDialogHeader',\n imports: [SlGlyph, SlIcon],\n template: `<ng-content />\n @if (dialog.resolvedFullscreenToggle()) {\n <button\n type=\"button\"\n data-part=\"fullscreen\"\n [attr.aria-label]=\"dialog.t('fullScreen')\"\n [attr.aria-pressed]=\"dialog.resolvedFullscreen()\"\n (click)=\"toggle($event)\"\n >\n <span slIcon\n ><svg slGlyph [name]=\"dialog.resolvedFullscreen() ? 'minimize' : 'maximize'\"></svg\n ></span>\n </button>\n }`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { 'data-part': 'header' },\n})\nexport class SlDialogHeader {\n protected readonly dialog = inject(SlDialogBase);\n\n protected toggle(event: MouseEvent) {\n if (event.defaultPrevented) return;\n this.dialog.requestFullscreen(\n !this.dialog.resolvedFullscreen(),\n activationReason(event) === 'keyboard' ? 'keyboard' : 'pointer',\n event,\n );\n }\n}\n\n/** The visible name, which `aria-labelledby` points at. */\n@Directive({\n selector: '[slDialogTitle]',\n standalone: true,\n exportAs: 'slDialogTitle',\n host: { 'data-part': 'title', '[id]': 'dialog.titleId' },\n})\nexport class SlDialogTitle implements OnInit, OnDestroy {\n protected readonly dialog = inject(SlDialogBase);\n\n ngOnInit() {\n this.dialog.hasTitle.set(true);\n }\n\n ngOnDestroy() {\n this.dialog.hasTitle.set(false);\n }\n}\n\n/**\n * The sentence that says what the dialog is about. The alert dialog pattern\n * makes it mandatory; the modal dialog pattern makes it optional and advises\n * against it for structured content.\n */\n@Directive({\n selector: '[slDialogDescription]',\n standalone: true,\n exportAs: 'slDialogDescription',\n host: { 'data-part': 'description', '[id]': 'dialog.descriptionId' },\n})\nexport class SlDialogDescription implements OnInit, OnDestroy {\n protected readonly dialog = inject(SlDialogBase);\n\n ngOnInit() {\n this.dialog.hasDescription.set(true);\n }\n\n ngOnDestroy() {\n this.dialog.hasDescription.set(false);\n }\n}\n\n/**\n * The one row that scrolls, and the row `aria-busy` belongs to while the\n * content is still on its way — the header, the close button and Escape all\n * stay operable, because a loading dialog a reader cannot leave is the worse\n * failure of the two.\n */\n@Directive({\n selector: '[slDialogBody]',\n standalone: true,\n exportAs: 'slDialogBody',\n host: { 'data-part': 'body', '[attr.aria-busy]': \"dialog.loading() ? 'true' : null\" },\n})\nexport class SlDialogBody {\n protected readonly dialog = inject(SlDialogBase);\n}\n\n@Directive({\n selector: '[slDialogFooter]',\n standalone: true,\n exportAs: 'slDialogFooter',\n host: { 'data-part': 'footer' },\n})\nexport class SlDialogFooter {}\n\n/**\n * The ✕ in the corner. It carries `dismiss`, which is the word the closed\n * vocabulary in `docs/state-and-events.md` already has for what a close button\n * means; `docs/component-features.md` §8 calls the source `closeButton`, and a\n * twelfth reason would be a change to a contract outside this family.\n */\n@Component({\n selector: '[slDialogClose]',\n standalone: true,\n exportAs: 'slDialogClose',\n imports: [SlGlyph, SlIcon],\n /* The cross is drawn unless the consumer wrote content of their own. */\n template: `<ng-content\n ><span slIcon><svg slGlyph name=\"x\"></svg></span\n ></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-part': 'close',\n type: 'button',\n '[attr.aria-label]': 'label()',\n '(click)': 'press($event)',\n },\n})\nexport class SlDialogClose {\n /** The result the close carries out, which is the platform's `returnValue`. */\n readonly value = input<string | undefined>(undefined);\n\n private readonly dialog = inject(SlDialogBase);\n /** A consumer's own `aria-label`, which wins over the catalog. */\n private readonly ownLabel = inject(new HostAttributeToken('aria-label'), { optional: true });\n\n protected readonly label = computed(() => this.ownLabel ?? this.dialog.t('close'));\n\n constructor() {\n if (this.dialog.isAlert()) {\n throw new Error(\n 'sl-alert-dialog has no close part: a confirmation is answered with slAlertDialogCancel or slAlertDialogAction, not dismissed by an ✕.',\n );\n }\n }\n\n protected press(event: MouseEvent) {\n if (event.defaultPrevented) return;\n this.dialog.request(false, 'dismiss', this.value(), event);\n }\n}\n\n/**\n * The glyph each tone draws, and a triangle where no tone was resolved. Warning\n * and danger differ in silhouette as well as colour, because under forced\n * colours the silhouette is all that is left.\n */\nconst TONE_GLYPH: Record<DialogTone, GlyphName> = {\n accent: 'circle-info',\n secondary: 'circle-info',\n success: 'circle-check',\n warning: 'triangle-alert',\n danger: 'circle-alert',\n};\n\n/**\n * The tone's own mark, which is geometry rather than a character. A mark the\n * consumer writes as content replaces the tone's.\n */\n@Component({\n selector: '[slAlertDialogIcon]',\n standalone: true,\n exportAs: 'slAlertDialogIcon',\n imports: [SlGlyph, SlIcon],\n template: `<ng-content\n ><span slIcon><svg slGlyph [name]=\"glyph()\"></svg></span\n ></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { 'data-part': 'icon', 'aria-hidden': 'true' },\n})\nexport class SlAlertDialogIcon {\n private readonly dialog = inject(SlDialogBase);\n\n protected readonly glyph = computed<GlyphName>(() => {\n const tone = this.dialog.resolvedTone();\n return tone === null ? 'triangle-alert' : TONE_GLYPH[tone];\n });\n}\n\n/**\n * The least destructive action, and where focus lands when the layer opens.\n * That is the APG's own advice for a step that is not easily reversible, and it\n * is a default of the member rather than something a consumer remembers.\n */\n@Directive({\n selector: '[slAlertDialogCancel]',\n standalone: true,\n exportAs: 'slAlertDialogCancel',\n host: { '[attr.data-part]': 'part', type: 'button', '(click)': 'press($event)' },\n})\nexport class SlAlertDialogCancel implements OnInit, OnDestroy {\n readonly value = input<string>('cancel');\n\n private readonly dialog = inject(SlDialogBase);\n private readonly native: HTMLElement = inject(ElementRef).nativeElement;\n\n /** `cancel`, unless the element is another family's root. */\n protected readonly part = ownPart(this.native, 'cancel');\n\n ngOnInit() {\n this.dialog.cancelNode.set(this.native);\n }\n\n ngOnDestroy() {\n if (this.dialog.cancelNode() === this.native) this.dialog.cancelNode.set(null);\n }\n\n protected press(event: MouseEvent) {\n if (event.defaultPrevented) return;\n this.dialog.request(false, 'dismiss', this.value(), event);\n }\n}\n\n/**\n * The action being confirmed. It carries `submit`, because confirming is what\n * the reader came to do, and `dismiss` is what the other two controls mean.\n */\n@Directive({\n selector: '[slAlertDialogAction]',\n standalone: true,\n exportAs: 'slAlertDialogAction',\n host: { '[attr.data-part]': 'part', type: 'button', '(click)': 'press($event)' },\n})\nexport class SlAlertDialogAction {\n readonly value = input<string>('confirm');\n\n private readonly dialog = inject(SlDialogBase);\n\n /** `action`, unless the element is another family's root. */\n protected readonly part = ownPart(inject(ElementRef).nativeElement as HTMLElement, 'action');\n\n protected press(event: MouseEvent) {\n if (event.defaultPrevented) return;\n this.dialog.request(false, 'submit', this.value(), event);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAoHA,MAAM,QAAQ,GAAmB;AAC/B,IAAA,IAAI,EAAE,OA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,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,eAAA,EAAA,EAAA,UAAA,EAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,IAAI,EAAE,EAAE,kBAAkB,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE;AACjF,iBAAA;;;ACrVD;;AAEG;;"}
@@ -520,9 +520,13 @@ class SlDrawer {
520
520
  const own = inline ? panel.offsetWidth : panel.offsetHeight;
521
521
  this.rest.set(Math.round((own / span) * 1000) / 1000);
522
522
  };
523
- read();
524
- if (typeof ResizeObserver === 'undefined')
523
+ /* The observer's first report arrives after the layout that placed the
524
+ panel, so reading there lays nothing out; a read here, as the panel
525
+ mounts, forced that layout early. */
526
+ if (typeof ResizeObserver === 'undefined') {
527
+ read();
525
528
  return;
529
+ }
526
530
  const observer = new ResizeObserver(read);
527
531
  observer.observe(panel);
528
532
  observer.observe(box);