@radix-ng/primitives 1.0.9 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/fesm2022/radix-ng-primitives-autocomplete.mjs +11 -3
  2. package/fesm2022/radix-ng-primitives-autocomplete.mjs.map +1 -1
  3. package/fesm2022/radix-ng-primitives-combobox.mjs +11 -3
  4. package/fesm2022/radix-ng-primitives-combobox.mjs.map +1 -1
  5. package/fesm2022/radix-ng-primitives-core.mjs +9 -6
  6. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  7. package/fesm2022/radix-ng-primitives-date-field.mjs +18 -8
  8. package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
  9. package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs +9 -0
  10. package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs.map +1 -1
  11. package/fesm2022/radix-ng-primitives-focus-scope.mjs +241 -95
  12. package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
  13. package/fesm2022/radix-ng-primitives-menu.mjs +97 -9
  14. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  15. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +17 -3
  16. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  17. package/fesm2022/radix-ng-primitives-popper.mjs +148 -23
  18. package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
  19. package/fesm2022/radix-ng-primitives-portal.mjs +16 -5
  20. package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
  21. package/fesm2022/radix-ng-primitives-select.mjs +14 -6
  22. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  23. package/fesm2022/radix-ng-primitives-time-field.mjs +12 -4
  24. package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
  25. package/package.json +1 -5
  26. package/types/radix-ng-primitives-core.d.ts +15 -12
  27. package/types/radix-ng-primitives-date-field.d.ts +14 -4
  28. package/types/radix-ng-primitives-floating-focus-manager.d.ts +7 -0
  29. package/types/radix-ng-primitives-focus-scope.d.ts +61 -44
  30. package/types/radix-ng-primitives-menu.d.ts +14 -3
  31. package/types/radix-ng-primitives-popper.d.ts +136 -43
  32. package/types/radix-ng-primitives-portal.d.ts +18 -8
  33. package/types/radix-ng-primitives-time-field.d.ts +12 -4
  34. package/fesm2022/radix-ng-primitives-focus-guards.mjs +0 -53
  35. package/fesm2022/radix-ng-primitives-focus-guards.mjs.map +0 -1
  36. package/focus-guards/README.md +0 -1
  37. package/types/radix-ng-primitives-focus-guards.d.ts +0 -15
@@ -1,7 +1,7 @@
1
1
  import { DOCUMENT, isPlatformBrowser } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { ElementRef, inject, PLATFORM_ID, DestroyRef, input, linkedSignal, computed, effect, Directive, ViewContainerRef, TemplateRef, signal, Injector } from '@angular/core';
4
- import { PresenceMachine, RDX_PRESENCE_CONTEXT } from '@radix-ng/primitives/presence';
3
+ import { ElementRef, inject, PLATFORM_ID, DestroyRef, input, linkedSignal, computed, effect, Directive, ViewContainerRef, TemplateRef, booleanAttribute, signal, Injector } from '@angular/core';
4
+ import { RDX_PRESENCE_CONTEXT, PresenceMachine } from '@radix-ng/primitives/presence';
5
5
 
6
6
  /**
7
7
  * Resolve a {@link RdxPortalContainer} to a concrete element. Returns `null` when nothing usable is
@@ -104,6 +104,17 @@ class RdxPortalPresence {
104
104
  */
105
105
  this.container = input(/* @ts-ignore */
106
106
  ...(ngDevMode ? [undefined, { debugName: "container" }] : /* istanbul ignore next */ []));
107
+ /**
108
+ * Keep the portal mounted (in the container) while the layer is closed. When `true` the content
109
+ * stays in the DOM regardless of the {@link RDX_PRESENCE_CONTEXT} `present` flag — the consumer is
110
+ * responsible for hiding it while closed (typically via the `data-closed` / `data-open` state on the
111
+ * positioner). Any `*rdxXxxPortal` wrapper opts in by mapping this input in its `hostDirectives`.
112
+ */
113
+ this.keepMounted = input(false, { ...(ngDevMode ? { debugName: "keepMounted" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
114
+ /** The layer's own open/present flag, OR'd with {@link keepMounted} to gate mount/unmount. */
115
+ this.contextPresent = inject(RDX_PRESENCE_CONTEXT).present;
116
+ this.present = computed(() => this.contextPresent() || this.keepMounted(), /* @ts-ignore */
117
+ ...(ngDevMode ? [{ debugName: "present" }] : /* istanbul ignore next */ []));
107
118
  this._computedContainer = linkedSignal(this.container, /* @ts-ignore */
108
119
  ...(ngDevMode ? [{ debugName: "_computedContainer" }] : /* istanbul ignore next */ []));
109
120
  this.elementContainer = computed(() => {
@@ -116,7 +127,7 @@ class RdxPortalPresence {
116
127
  ...(ngDevMode ? [{ debugName: "mountedNodes" }] : /* istanbul ignore next */ []));
117
128
  this.viewRef = null;
118
129
  const machine = new PresenceMachine({
119
- present: inject(RDX_PRESENCE_CONTEXT).present,
130
+ present: this.present,
120
131
  isBrowser: this.isBrowser,
121
132
  injector: inject(Injector),
122
133
  mountView: () => this.mountView(),
@@ -155,14 +166,14 @@ class RdxPortalPresence {
155
166
  this.mountedNodes.set([]);
156
167
  }
157
168
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPortalPresence, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
158
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxPortalPresence, isStandalone: true, inputs: { container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
169
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxPortalPresence, isStandalone: true, inputs: { container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null }, keepMounted: { classPropertyName: "keepMounted", publicName: "keepMounted", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
159
170
  }
160
171
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPortalPresence, decorators: [{
161
172
  type: Directive,
162
173
  args: [{
163
174
  standalone: true
164
175
  }]
165
- }], ctorParameters: () => [], propDecorators: { container: [{ type: i0.Input, args: [{ isSignal: true, alias: "container", required: false }] }] } });
176
+ }], ctorParameters: () => [], propDecorators: { container: [{ type: i0.Input, args: [{ isSignal: true, alias: "container", required: false }] }], keepMounted: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepMounted", required: false }] }] } });
166
177
 
167
178
  /**
168
179
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-portal.mjs","sources":["../../../packages/primitives/portal/src/resolve-container.ts","../../../packages/primitives/portal/src/portal.ts","../../../packages/primitives/portal/src/portal-presence.ts","../../../packages/primitives/portal/radix-ng-primitives-portal.ts"],"sourcesContent":["import { ElementRef } from '@angular/core';\n\n/**\n * A target container for a portal. Accepts an `ElementRef`, a native element, or a CSS selector\n * resolved against the document.\n */\nexport type RdxPortalContainer = ElementRef<HTMLElement> | HTMLElement | string;\n\n/**\n * Resolve a {@link RdxPortalContainer} to a concrete element. Returns `null` when nothing usable is\n * provided (a missing container, a selector matching nothing, or a non-element value), so callers can\n * fall back to `document.body`. Shared by `RdxPortal` and `RdxPortalPresence`.\n */\nexport function resolvePortalContainer(\n container: RdxPortalContainer | undefined,\n document: Document | null\n): HTMLElement | null {\n if (!container) {\n return null;\n }\n if (typeof container === 'string') {\n return document?.querySelector<HTMLElement>(container) ?? null;\n }\n if (container instanceof ElementRef) {\n return container.nativeElement ?? null;\n }\n // Anything that isn't a real element (e.g. a TemplateRef passed by mistake) falls back to the\n // default container so the content still leaves the flow instead of staying in place.\n return container instanceof HTMLElement ? container : null;\n}\n","import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n PLATFORM_ID\n} from '@angular/core';\nimport { RdxPortalContainer, resolvePortalContainer } from './resolve-container';\n\n@Directive({\n selector: '[rdxPortal]',\n exportAs: 'rdxPortal'\n})\nexport class RdxPortal {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly document = inject(DOCUMENT, { optional: true });\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Specify a container to portal the content into. Can be an `ElementRef`, a native element, or a\n * CSS selector. Defaults to `document.body` when not set (or when a selector matches nothing).\n */\n readonly container = input<RdxPortalContainer>();\n\n private readonly _computedContainer = linkedSignal(this.container);\n readonly computedContainer = this._computedContainer.asReadonly();\n\n private readonly elementContainer = computed<HTMLElement | null>(() => {\n const provided = resolvePortalContainer(this.computedContainer(), this.document);\n const body = this.document?.body ?? null;\n return provided ?? body;\n });\n\n constructor() {\n const isBrowser = isPlatformBrowser(this.platformId);\n if (!isBrowser || !this.document) {\n return;\n }\n\n const element = this.elementRef.nativeElement;\n // Anchor the original DOM position with a comment node, so the element can be restored\n // exactly where it was when the directive is destroyed.\n const anchor = this.document.createComment('rdx-portal');\n element.parentNode?.insertBefore(anchor, element);\n\n // Move reactively: the effect runs after inputs are bound (so `container` is respected on\n // first render) and re-runs whenever the target container changes. `appendChild` relocates\n // the element, it does not clone it.\n effect(() => {\n this.elementContainer()?.appendChild(element);\n });\n\n this.destroyRef.onDestroy(() => {\n anchor.parentNode?.replaceChild(element, anchor);\n });\n }\n\n setContainer(container: RdxPortalContainer) {\n this._computedContainer.set(container);\n }\n}\n","import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n computed,\n DestroyRef,\n Directive,\n effect,\n EmbeddedViewRef,\n inject,\n Injector,\n input,\n linkedSignal,\n PLATFORM_ID,\n signal,\n TemplateRef,\n ViewContainerRef\n} from '@angular/core';\nimport { PresenceMachine, RDX_PRESENCE_CONTEXT } from '@radix-ng/primitives/presence';\nimport { RdxPortalContainer, resolvePortalContainer } from './resolve-container';\n\n/**\n * Structural directive merging what `RdxPortal` + `RdxPresenceDirective` did as a pair: it mounts its\n * template while `present()` (from {@link RDX_PRESENCE_CONTEXT}) is `true`, **relocates every root\n * node into a portal container** (default `document.body`), and on close runs the presence exit state\n * machine — keeping the content mounted until every running CSS exit `@keyframes` on any root node\n * finishes.\n *\n * Unlike `RdxPortal`, it adds **no wrapper element**: the template's root nodes become direct children\n * of the container. Use the `*` microsyntax for the common single-root case\n * (`<div *rdxXxxPortal rdxXxxPositioner>`) or the explicit `<ng-template rdxXxxPortal>` form for a\n * custom container or multiple root nodes (e.g. a dialog backdrop + popup).\n *\n * SSR: on the server the view renders in place and is never relocated; after hydration the relocation\n * effect moves the nodes into the container (same browser-guarded split `RdxPortal` uses).\n */\n@Directive({\n standalone: true\n})\nexport class RdxPortalPresence {\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly templateRef = inject(TemplateRef<void>);\n private readonly document = inject(DOCUMENT, { optional: true });\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /**\n * Container to portal the content into. Can be an `ElementRef`, a native element, or a CSS\n * selector. Defaults to `document.body` (or when a selector matches nothing).\n */\n readonly container = input<RdxPortalContainer>();\n\n private readonly _computedContainer = linkedSignal(this.container);\n\n private readonly elementContainer = computed<HTMLElement | null>(() => {\n const provided = resolvePortalContainer(this._computedContainer(), this.document);\n return provided ?? this.document?.body ?? null;\n });\n\n /** The live view's root nodes, exposed as a signal so the relocation effect re-runs on (re)mount. */\n private readonly mountedNodes = signal<Node[]>([]);\n private viewRef: EmbeddedViewRef<void> | null = null;\n\n constructor() {\n const machine = new PresenceMachine({\n present: inject(RDX_PRESENCE_CONTEXT).present,\n isBrowser: this.isBrowser,\n injector: inject(Injector),\n mountView: () => this.mountView(),\n destroyView: () => this.destroyView()\n });\n\n // Relocate reactively: re-runs whenever the resolved container changes or the view is\n // (re)mounted. On the server we never relocate — the nodes render in place.\n effect(() => {\n const container = this.elementContainer();\n const nodes = this.mountedNodes();\n if (!this.isBrowser || !container) {\n return;\n }\n for (const node of nodes) {\n container.appendChild(node);\n }\n });\n\n inject(DestroyRef).onDestroy(() => machine.dispose());\n }\n\n /** Imperatively override the portal container (parity with `RdxPortal.setContainer`). */\n setContainer(container: RdxPortalContainer): void {\n this._computedContainer.set(container);\n }\n\n private mountView(): HTMLElement[] {\n this.viewRef = this.viewContainerRef.createEmbeddedView(this.templateRef);\n const rootNodes = this.viewRef.rootNodes as Node[];\n this.mountedNodes.set(rootNodes);\n // Watch every element root for exit animations (dialog returns backdrop + popup).\n return rootNodes.filter((node): node is HTMLElement => node instanceof HTMLElement);\n }\n\n private destroyView(): void {\n // Destroying the view removes the nodes from wherever they currently live (the container) —\n // no anchor-comment juggling, unlike `RdxPortal` which restores its host element.\n this.viewRef?.destroy();\n this.viewRef = null;\n this.mountedNodes.set([]);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAQA;;;;AAIG;AACG,SAAU,sBAAsB,CAClC,SAAyC,EACzC,QAAyB,EAAA;IAEzB,IAAI,CAAC,SAAS,EAAE;AACZ,QAAA,OAAO,IAAI;IACf;AACA,IAAA,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;QAC/B,OAAO,QAAQ,EAAE,aAAa,CAAc,SAAS,CAAC,IAAI,IAAI;IAClE;AACA,IAAA,IAAI,SAAS,YAAY,UAAU,EAAE;AACjC,QAAA,OAAO,SAAS,CAAC,aAAa,IAAI,IAAI;IAC1C;;;IAGA,OAAO,SAAS,YAAY,WAAW,GAAG,SAAS,GAAG,IAAI;AAC9D;;MCXa,SAAS,CAAA;AAqBlB,IAAA,WAAA,GAAA;AApBiB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;AACxD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;QAChC,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,EAAE,EA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AAC,IAAI,CAAC,WAAW,CAAC;AACzE,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,SAAmB;AAClD,QAAA,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC;;AAEhC,QAAA,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,KAA0B,IAAI,YAAY,WAAW,CAAC;IACvF;IAEQ,WAAW,GAAA;;;AAGf,QAAA,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE;AACvB,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,QAAA,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;IAC7B;8GAnES,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE;AACf,iBAAA;;;ACpCD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-portal.mjs","sources":["../../../packages/primitives/portal/src/resolve-container.ts","../../../packages/primitives/portal/src/portal.ts","../../../packages/primitives/portal/src/portal-presence.ts","../../../packages/primitives/portal/radix-ng-primitives-portal.ts"],"sourcesContent":["import { ElementRef } from '@angular/core';\n\n/**\n * A target container for a portal. Accepts an `ElementRef`, a native element, or a CSS selector\n * resolved against the document.\n */\nexport type RdxPortalContainer = ElementRef<HTMLElement> | HTMLElement | string;\n\n/**\n * Resolve a {@link RdxPortalContainer} to a concrete element. Returns `null` when nothing usable is\n * provided (a missing container, a selector matching nothing, or a non-element value), so callers can\n * fall back to `document.body`. Shared by `RdxPortal` and `RdxPortalPresence`.\n */\nexport function resolvePortalContainer(\n container: RdxPortalContainer | undefined,\n document: Document | null\n): HTMLElement | null {\n if (!container) {\n return null;\n }\n if (typeof container === 'string') {\n return document?.querySelector<HTMLElement>(container) ?? null;\n }\n if (container instanceof ElementRef) {\n return container.nativeElement ?? null;\n }\n // Anything that isn't a real element (e.g. a TemplateRef passed by mistake) falls back to the\n // default container so the content still leaves the flow instead of staying in place.\n return container instanceof HTMLElement ? container : null;\n}\n","import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n PLATFORM_ID\n} from '@angular/core';\nimport { RdxPortalContainer, resolvePortalContainer } from './resolve-container';\n\n@Directive({\n selector: '[rdxPortal]',\n exportAs: 'rdxPortal'\n})\nexport class RdxPortal {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly document = inject(DOCUMENT, { optional: true });\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Specify a container to portal the content into. Can be an `ElementRef`, a native element, or a\n * CSS selector. Defaults to `document.body` when not set (or when a selector matches nothing).\n */\n readonly container = input<RdxPortalContainer>();\n\n private readonly _computedContainer = linkedSignal(this.container);\n readonly computedContainer = this._computedContainer.asReadonly();\n\n private readonly elementContainer = computed<HTMLElement | null>(() => {\n const provided = resolvePortalContainer(this.computedContainer(), this.document);\n const body = this.document?.body ?? null;\n return provided ?? body;\n });\n\n constructor() {\n const isBrowser = isPlatformBrowser(this.platformId);\n if (!isBrowser || !this.document) {\n return;\n }\n\n const element = this.elementRef.nativeElement;\n // Anchor the original DOM position with a comment node, so the element can be restored\n // exactly where it was when the directive is destroyed.\n const anchor = this.document.createComment('rdx-portal');\n element.parentNode?.insertBefore(anchor, element);\n\n // Move reactively: the effect runs after inputs are bound (so `container` is respected on\n // first render) and re-runs whenever the target container changes. `appendChild` relocates\n // the element, it does not clone it.\n effect(() => {\n this.elementContainer()?.appendChild(element);\n });\n\n this.destroyRef.onDestroy(() => {\n anchor.parentNode?.replaceChild(element, anchor);\n });\n }\n\n setContainer(container: RdxPortalContainer) {\n this._computedContainer.set(container);\n }\n}\n","import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n EmbeddedViewRef,\n inject,\n Injector,\n input,\n linkedSignal,\n PLATFORM_ID,\n signal,\n TemplateRef,\n ViewContainerRef\n} from '@angular/core';\nimport { PresenceMachine, RDX_PRESENCE_CONTEXT } from '@radix-ng/primitives/presence';\nimport { RdxPortalContainer, resolvePortalContainer } from './resolve-container';\n\n/**\n * Structural directive merging what `RdxPortal` + `RdxPresenceDirective` did as a pair: it mounts its\n * template while `present()` (from {@link RDX_PRESENCE_CONTEXT}) is `true`, **relocates every root\n * node into a portal container** (default `document.body`), and on close runs the presence exit state\n * machine — keeping the content mounted until every running CSS exit `@keyframes` on any root node\n * finishes.\n *\n * Unlike `RdxPortal`, it adds **no wrapper element**: the template's root nodes become direct children\n * of the container. Use the `*` microsyntax for the common single-root case\n * (`<div *rdxXxxPortal rdxXxxPositioner>`) or the explicit `<ng-template rdxXxxPortal>` form for a\n * custom container or multiple root nodes (e.g. a dialog backdrop + popup).\n *\n * SSR: on the server the view renders in place and is never relocated; after hydration the relocation\n * effect moves the nodes into the container (same browser-guarded split `RdxPortal` uses).\n */\n@Directive({\n standalone: true\n})\nexport class RdxPortalPresence {\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly templateRef = inject(TemplateRef<void>);\n private readonly document = inject(DOCUMENT, { optional: true });\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /**\n * Container to portal the content into. Can be an `ElementRef`, a native element, or a CSS\n * selector. Defaults to `document.body` (or when a selector matches nothing).\n */\n readonly container = input<RdxPortalContainer>();\n\n /**\n * Keep the portal mounted (in the container) while the layer is closed. When `true` the content\n * stays in the DOM regardless of the {@link RDX_PRESENCE_CONTEXT} `present` flag — the consumer is\n * responsible for hiding it while closed (typically via the `data-closed` / `data-open` state on the\n * positioner). Any `*rdxXxxPortal` wrapper opts in by mapping this input in its `hostDirectives`.\n */\n readonly keepMounted = input(false, { transform: booleanAttribute });\n\n /** The layer's own open/present flag, OR'd with {@link keepMounted} to gate mount/unmount. */\n private readonly contextPresent = inject(RDX_PRESENCE_CONTEXT).present;\n private readonly present = computed(() => this.contextPresent() || this.keepMounted());\n\n private readonly _computedContainer = linkedSignal(this.container);\n\n private readonly elementContainer = computed<HTMLElement | null>(() => {\n const provided = resolvePortalContainer(this._computedContainer(), this.document);\n return provided ?? this.document?.body ?? null;\n });\n\n /** The live view's root nodes, exposed as a signal so the relocation effect re-runs on (re)mount. */\n private readonly mountedNodes = signal<Node[]>([]);\n private viewRef: EmbeddedViewRef<void> | null = null;\n\n constructor() {\n const machine = new PresenceMachine({\n present: this.present,\n isBrowser: this.isBrowser,\n injector: inject(Injector),\n mountView: () => this.mountView(),\n destroyView: () => this.destroyView()\n });\n\n // Relocate reactively: re-runs whenever the resolved container changes or the view is\n // (re)mounted. On the server we never relocate — the nodes render in place.\n effect(() => {\n const container = this.elementContainer();\n const nodes = this.mountedNodes();\n if (!this.isBrowser || !container) {\n return;\n }\n for (const node of nodes) {\n container.appendChild(node);\n }\n });\n\n inject(DestroyRef).onDestroy(() => machine.dispose());\n }\n\n /** Imperatively override the portal container (parity with `RdxPortal.setContainer`). */\n setContainer(container: RdxPortalContainer): void {\n this._computedContainer.set(container);\n }\n\n private mountView(): HTMLElement[] {\n this.viewRef = this.viewContainerRef.createEmbeddedView(this.templateRef);\n const rootNodes = this.viewRef.rootNodes as Node[];\n this.mountedNodes.set(rootNodes);\n // Watch every element root for exit animations (dialog returns backdrop + popup).\n return rootNodes.filter((node): node is HTMLElement => node instanceof HTMLElement);\n }\n\n private destroyView(): void {\n // Destroying the view removes the nodes from wherever they currently live (the container) —\n // no anchor-comment juggling, unlike `RdxPortal` which restores its host element.\n this.viewRef?.destroy();\n this.viewRef = null;\n this.mountedNodes.set([]);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAQA;;;;AAIG;AACG,SAAU,sBAAsB,CAClC,SAAyC,EACzC,QAAyB,EAAA;IAEzB,IAAI,CAAC,SAAS,EAAE;AACZ,QAAA,OAAO,IAAI;IACf;AACA,IAAA,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;QAC/B,OAAO,QAAQ,EAAE,aAAa,CAAc,SAAS,CAAC,IAAI,IAAI;IAClE;AACA,IAAA,IAAI,SAAS,YAAY,UAAU,EAAE;AACjC,QAAA,OAAO,SAAS,CAAC,aAAa,IAAI,IAAI;IAC1C;;;IAGA,OAAO,SAAS,YAAY,WAAW,GAAG,SAAS,GAAG,IAAI;AAC9D;;MCXa,SAAS,CAAA;AAqBlB,IAAA,WAAA,GAAA;AApBiB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;AACxD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;QAChC,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC/C,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAEhD;;;AAGG;AACM,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAAsB;AAE/B,QAAA,IAAA,CAAA,kBAAkB,GAAG,YAAY,CAAC,IAAI,CAAC,SAAS;+FAAC;AACzD,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAAE;AAEhD,QAAA,IAAA,CAAA,gB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AAO,CAAC,SAAmB;AAClD,QAAA,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC;;AAEhC,QAAA,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,KAA0B,IAAI,YAAY,WAAW,CAAC;IACvF;IAEQ,WAAW,GAAA;;;AAGf,QAAA,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE;AACvB,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,QAAA,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;IAC7B;8GA/ES,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,WAAA,EAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,aAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE;AACf,iBAAA;;;ACrCD;;AAEG;;;;"}
@@ -1,12 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, model, signal, computed, ElementRef, input, booleanAttribute, output, effect, untracked, Directive, InjectionToken, Injector, DestroyRef, afterNextRender, linkedSignal, contentChild, forwardRef, isDevMode } from '@angular/core';
3
3
  import * as i3 from '@radix-ng/primitives/core';
4
- import { isEqual, getActiveElement, formUiStateContext, createContext, RdxFormUiControlBase, injectId, createFloatingRootContext, useTransitionStatus, isNullish, createCancelableChangeEventDetails, provideFloatingTree, provideFloatingRootContext, RDX_FLOATING_ROOT_CONTEXT, RDX_FLOATING_REGISTRATION, useListHighlight, useAnchoredScrollLock, RdxFloatingNodeRegistration, handleAndDispatchCustomEvent, resizeEffect, clamp, rdxDevError, setupInternalBackdrop } from '@radix-ng/primitives/core';
4
+ import { isEqual, getActiveElement, formUiStateContext, createContext, RdxFormUiControlBase, injectId, createFloatingRootContext, useTransitionStatus, isNullish, createCancelableChangeEventDetails, provideFloatingTree, provideFloatingRootContext, RDX_FLOATING_ROOT_CONTEXT, RDX_FLOATING_REGISTRATION, useListHighlight, useAnchoredScrollLock, RdxFloatingNodeRegistration, handleAndDispatchCustomEvent, resizeEffect, clamp, rdxDevError, setupInternalBackdrop, provideExistingToken } from '@radix-ng/primitives/core';
5
5
  import { injectDirection } from '@radix-ng/primitives/direction-provider';
6
6
  import * as i2 from '@radix-ng/primitives/floating-focus-manager';
7
7
  import { getInteractionTypeFromEvent, provideFloatingFocusManagerConfig, RdxFloatingFocusManager, createRdxTriggerInteraction } from '@radix-ng/primitives/floating-focus-manager';
8
8
  import * as i1 from '@radix-ng/primitives/popper';
9
- import { RdxPopper, RdxPopperContent, RdxPopperContentWrapper, legacyPopperVars, provideRdxPopperContentWrapper, provideRdxPopperContentConfig, RdxPopperAnchor } from '@radix-ng/primitives/popper';
9
+ import { RdxPopper, RdxPopperContent, RdxPopperContentWrapper, legacyPopperVars, provideRdxPopperContentWrapper, provideRdxPopperContentConfig, DROPDOWN_COLLISION_AVOIDANCE, RdxPopperAnchor } from '@radix-ng/primitives/popper';
10
10
  import * as i4 from '@radix-ng/primitives/composite';
11
11
  import { RdxCompositeList, RdxCompositeListItem } from '@radix-ng/primitives/composite';
12
12
  import { RdxDismiss } from '@radix-ng/primitives/dismissable-layer';
@@ -1315,8 +1315,12 @@ class RdxSelectPositioner extends RdxPopperContentWrapper {
1315
1315
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxSelectPositioner, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1316
1316
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxSelectPositioner, isStandalone: true, selector: "[rdxSelectPositioner]", host: { properties: { "style": "positionerStyle" } }, providers: [
1317
1317
  ...provideRdxPopperContentWrapper(RdxSelectPositioner),
1318
- provideRdxPopperContentConfig({ align: 'start', updatePositionStrategy: 'always' }),
1319
- { provide: RDX_SELECT_POSITIONER_TOKEN, useExisting: forwardRef(() => RdxSelectPositioner) }
1318
+ provideRdxPopperContentConfig({
1319
+ align: 'start',
1320
+ collisionAvoidance: DROPDOWN_COLLISION_AVOIDANCE,
1321
+ updatePositionStrategy: 'always'
1322
+ }),
1323
+ provideExistingToken(RDX_SELECT_POSITIONER_TOKEN, RdxSelectPositioner)
1320
1324
  ], usesInheritance: true, ngImport: i0 }); }
1321
1325
  }
1322
1326
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxSelectPositioner, decorators: [{
@@ -1325,8 +1329,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
1325
1329
  selector: '[rdxSelectPositioner]',
1326
1330
  providers: [
1327
1331
  ...provideRdxPopperContentWrapper(RdxSelectPositioner),
1328
- provideRdxPopperContentConfig({ align: 'start', updatePositionStrategy: 'always' }),
1329
- { provide: RDX_SELECT_POSITIONER_TOKEN, useExisting: forwardRef(() => RdxSelectPositioner) }
1332
+ provideRdxPopperContentConfig({
1333
+ align: 'start',
1334
+ collisionAvoidance: DROPDOWN_COLLISION_AVOIDANCE,
1335
+ updatePositionStrategy: 'always'
1336
+ }),
1337
+ provideExistingToken(RDX_SELECT_POSITIONER_TOKEN, RdxSelectPositioner)
1330
1338
  ],
1331
1339
  host: {
1332
1340
  // The unified vars + placement attrs come from the wrapper (ADR 0012); only `box-sizing` and