@radix-ng/primitives 1.0.5 → 1.0.7

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 (138) hide show
  1. package/aspect-ratio/README.md +1 -1
  2. package/fesm2022/radix-ng-primitives-accordion.mjs +40 -27
  3. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  4. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +34 -34
  5. package/fesm2022/radix-ng-primitives-arrow.mjs +3 -3
  6. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +11 -35
  7. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
  8. package/fesm2022/radix-ng-primitives-autocomplete.mjs +175 -125
  9. package/fesm2022/radix-ng-primitives-autocomplete.mjs.map +1 -1
  10. package/fesm2022/radix-ng-primitives-avatar.mjs +92 -35
  11. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  12. package/fesm2022/radix-ng-primitives-button.mjs +11 -7
  13. package/fesm2022/radix-ng-primitives-button.mjs.map +1 -1
  14. package/fesm2022/radix-ng-primitives-calendar.mjs +140 -90
  15. package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
  16. package/fesm2022/radix-ng-primitives-checkbox.mjs +63 -46
  17. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  18. package/fesm2022/radix-ng-primitives-collapsible.mjs +37 -25
  19. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
  20. package/fesm2022/radix-ng-primitives-combobox.mjs +278 -177
  21. package/fesm2022/radix-ng-primitives-combobox.mjs.map +1 -1
  22. package/fesm2022/radix-ng-primitives-composite.mjs +50 -33
  23. package/fesm2022/radix-ng-primitives-composite.mjs.map +1 -1
  24. package/fesm2022/radix-ng-primitives-config.mjs +7 -5
  25. package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
  26. package/fesm2022/radix-ng-primitives-context-menu.mjs +48 -22
  27. package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
  28. package/fesm2022/radix-ng-primitives-core.mjs +44 -28
  29. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  30. package/fesm2022/radix-ng-primitives-cropper.mjs +73 -45
  31. package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
  32. package/fesm2022/radix-ng-primitives-date-field.mjs +70 -40
  33. package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
  34. package/fesm2022/radix-ng-primitives-dialog.mjs +93 -67
  35. package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
  36. package/fesm2022/radix-ng-primitives-direction-provider.mjs +5 -4
  37. package/fesm2022/radix-ng-primitives-direction-provider.mjs.map +1 -1
  38. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +20 -16
  39. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
  40. package/fesm2022/radix-ng-primitives-drawer.mjs +107 -81
  41. package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -1
  42. package/fesm2022/radix-ng-primitives-editable.mjs +53 -39
  43. package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
  44. package/fesm2022/radix-ng-primitives-field.mjs +76 -50
  45. package/fesm2022/radix-ng-primitives-field.mjs.map +1 -1
  46. package/fesm2022/radix-ng-primitives-fieldset.mjs +8 -7
  47. package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -1
  48. package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs +77 -40
  49. package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs.map +1 -1
  50. package/fesm2022/radix-ng-primitives-focus-guards.mjs +3 -3
  51. package/fesm2022/radix-ng-primitives-focus-scope.mjs +7 -5
  52. package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
  53. package/fesm2022/radix-ng-primitives-form.mjs +26 -17
  54. package/fesm2022/radix-ng-primitives-form.mjs.map +1 -1
  55. package/fesm2022/radix-ng-primitives-input.mjs +41 -22
  56. package/fesm2022/radix-ng-primitives-input.mjs.map +1 -1
  57. package/fesm2022/radix-ng-primitives-label.mjs +11 -8
  58. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  59. package/fesm2022/radix-ng-primitives-menu.mjs +274 -154
  60. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  61. package/fesm2022/radix-ng-primitives-menubar.mjs +35 -17
  62. package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
  63. package/fesm2022/radix-ng-primitives-meter.mjs +41 -30
  64. package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -1
  65. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +220 -183
  66. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  67. package/fesm2022/radix-ng-primitives-number-field.mjs +93 -61
  68. package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
  69. package/fesm2022/radix-ng-primitives-pagination.mjs +48 -38
  70. package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
  71. package/fesm2022/radix-ng-primitives-popover.mjs +150 -107
  72. package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
  73. package/fesm2022/radix-ng-primitives-popper.mjs +79 -47
  74. package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
  75. package/fesm2022/radix-ng-primitives-portal.mjs +20 -13
  76. package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
  77. package/fesm2022/radix-ng-primitives-presence.mjs +3 -3
  78. package/fesm2022/radix-ng-primitives-preview-card.mjs +119 -74
  79. package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -1
  80. package/fesm2022/radix-ng-primitives-progress.mjs +73 -46
  81. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  82. package/fesm2022/radix-ng-primitives-radio.mjs +58 -40
  83. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  84. package/fesm2022/radix-ng-primitives-scroll-area.mjs +57 -41
  85. package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
  86. package/fesm2022/radix-ng-primitives-select.mjs +595 -102
  87. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  88. package/fesm2022/radix-ng-primitives-separator.mjs +11 -15
  89. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  90. package/fesm2022/radix-ng-primitives-slider.mjs +101 -64
  91. package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
  92. package/fesm2022/radix-ng-primitives-stepper.mjs +53 -39
  93. package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
  94. package/fesm2022/radix-ng-primitives-switch.mjs +25 -20
  95. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  96. package/fesm2022/radix-ng-primitives-tabs.mjs +76 -51
  97. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  98. package/fesm2022/radix-ng-primitives-time-field.mjs +72 -41
  99. package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
  100. package/fesm2022/radix-ng-primitives-toast.mjs +75 -56
  101. package/fesm2022/radix-ng-primitives-toast.mjs.map +1 -1
  102. package/fesm2022/radix-ng-primitives-toggle-group.mjs +39 -23
  103. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  104. package/fesm2022/radix-ng-primitives-toggle.mjs +36 -36
  105. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  106. package/fesm2022/radix-ng-primitives-toolbar.mjs +52 -31
  107. package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
  108. package/fesm2022/radix-ng-primitives-tooltip.mjs +118 -63
  109. package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
  110. package/fesm2022/radix-ng-primitives-visually-hidden.mjs +31 -20
  111. package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
  112. package/package.json +2 -2
  113. package/types/radix-ng-primitives-accordion.d.ts +1 -0
  114. package/types/radix-ng-primitives-aspect-ratio.d.ts +10 -23
  115. package/types/radix-ng-primitives-autocomplete.d.ts +3 -1
  116. package/types/radix-ng-primitives-avatar.d.ts +51 -25
  117. package/types/radix-ng-primitives-checkbox.d.ts +26 -98
  118. package/types/radix-ng-primitives-combobox.d.ts +28 -9
  119. package/types/radix-ng-primitives-context-menu.d.ts +2 -0
  120. package/types/radix-ng-primitives-dialog.d.ts +6 -3
  121. package/types/radix-ng-primitives-field.d.ts +33 -207
  122. package/types/radix-ng-primitives-floating-focus-manager.d.ts +11 -0
  123. package/types/radix-ng-primitives-form.d.ts +24 -33
  124. package/types/radix-ng-primitives-label.d.ts +3 -2
  125. package/types/radix-ng-primitives-menu.d.ts +47 -15
  126. package/types/radix-ng-primitives-menubar.d.ts +6 -1
  127. package/types/radix-ng-primitives-navigation-menu.d.ts +8 -6
  128. package/types/radix-ng-primitives-number-field.d.ts +1 -1
  129. package/types/radix-ng-primitives-popover.d.ts +12 -4
  130. package/types/radix-ng-primitives-preview-card.d.ts +18 -5
  131. package/types/radix-ng-primitives-progress.d.ts +59 -121
  132. package/types/radix-ng-primitives-radio.d.ts +0 -1
  133. package/types/radix-ng-primitives-select.d.ts +186 -391
  134. package/types/radix-ng-primitives-separator.d.ts +0 -7
  135. package/types/radix-ng-primitives-toggle-group.d.ts +7 -3
  136. package/types/radix-ng-primitives-toggle.d.ts +8 -8
  137. package/types/radix-ng-primitives-toolbar.d.ts +2 -0
  138. package/types/radix-ng-primitives-tooltip.d.ts +17 -3
@@ -33,14 +33,17 @@ class RdxPortal {
33
33
  * Specify a container to portal the content into. Can be an `ElementRef`, a native element, or a
34
34
  * CSS selector. Defaults to `document.body` when not set (or when a selector matches nothing).
35
35
  */
36
- this.container = input(...(ngDevMode ? [undefined, { debugName: "container" }] : /* istanbul ignore next */ []));
37
- this._computedContainer = linkedSignal(this.container, ...(ngDevMode ? [{ debugName: "_computedContainer" }] : /* istanbul ignore next */ []));
36
+ this.container = input(/* @ts-ignore */
37
+ ...(ngDevMode ? [undefined, { debugName: "container" }] : /* istanbul ignore next */ []));
38
+ this._computedContainer = linkedSignal(this.container, /* @ts-ignore */
39
+ ...(ngDevMode ? [{ debugName: "_computedContainer" }] : /* istanbul ignore next */ []));
38
40
  this.computedContainer = this._computedContainer.asReadonly();
39
41
  this.elementContainer = computed(() => {
40
42
  const provided = resolvePortalContainer(this.computedContainer(), this.document);
41
43
  const body = this.document?.body ?? null;
42
44
  return provided ?? body;
43
- }, ...(ngDevMode ? [{ debugName: "elementContainer" }] : /* istanbul ignore next */ []));
45
+ }, /* @ts-ignore */
46
+ ...(ngDevMode ? [{ debugName: "elementContainer" }] : /* istanbul ignore next */ []));
44
47
  const isBrowser = isPlatformBrowser(this.platformId);
45
48
  if (!isBrowser || !this.document) {
46
49
  return;
@@ -63,10 +66,10 @@ class RdxPortal {
63
66
  setContainer(container) {
64
67
  this._computedContainer.set(container);
65
68
  }
66
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPortal, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
67
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxPortal, isStandalone: true, selector: "[rdxPortal]", inputs: { container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["rdxPortal"], ngImport: i0 }); }
69
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPortal, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
70
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxPortal, isStandalone: true, selector: "[rdxPortal]", inputs: { container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["rdxPortal"], ngImport: i0 }); }
68
71
  }
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPortal, decorators: [{
72
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPortal, decorators: [{
70
73
  type: Directive,
71
74
  args: [{
72
75
  selector: '[rdxPortal]',
@@ -99,14 +102,18 @@ class RdxPortalPresence {
99
102
  * Container to portal the content into. Can be an `ElementRef`, a native element, or a CSS
100
103
  * selector. Defaults to `document.body` (or when a selector matches nothing).
101
104
  */
102
- this.container = input(...(ngDevMode ? [undefined, { debugName: "container" }] : /* istanbul ignore next */ []));
103
- this._computedContainer = linkedSignal(this.container, ...(ngDevMode ? [{ debugName: "_computedContainer" }] : /* istanbul ignore next */ []));
105
+ this.container = input(/* @ts-ignore */
106
+ ...(ngDevMode ? [undefined, { debugName: "container" }] : /* istanbul ignore next */ []));
107
+ this._computedContainer = linkedSignal(this.container, /* @ts-ignore */
108
+ ...(ngDevMode ? [{ debugName: "_computedContainer" }] : /* istanbul ignore next */ []));
104
109
  this.elementContainer = computed(() => {
105
110
  const provided = resolvePortalContainer(this._computedContainer(), this.document);
106
111
  return provided ?? this.document?.body ?? null;
107
- }, ...(ngDevMode ? [{ debugName: "elementContainer" }] : /* istanbul ignore next */ []));
112
+ }, /* @ts-ignore */
113
+ ...(ngDevMode ? [{ debugName: "elementContainer" }] : /* istanbul ignore next */ []));
108
114
  /** The live view's root nodes, exposed as a signal so the relocation effect re-runs on (re)mount. */
109
- this.mountedNodes = signal([], ...(ngDevMode ? [{ debugName: "mountedNodes" }] : /* istanbul ignore next */ []));
115
+ this.mountedNodes = signal([], /* @ts-ignore */
116
+ ...(ngDevMode ? [{ debugName: "mountedNodes" }] : /* istanbul ignore next */ []));
110
117
  this.viewRef = null;
111
118
  const machine = new PresenceMachine({
112
119
  present: inject(RDX_PRESENCE_CONTEXT).present,
@@ -147,10 +154,10 @@ class RdxPortalPresence {
147
154
  this.viewRef = null;
148
155
  this.mountedNodes.set([]);
149
156
  }
150
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPortalPresence, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
151
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxPortalPresence, isStandalone: true, inputs: { container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
157
+ 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 }); }
152
159
  }
153
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPortalPresence, decorators: [{
160
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPortalPresence, decorators: [{
154
161
  type: Directive,
155
162
  args: [{
156
163
  standalone: true
@@ -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;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AAA,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 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,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,K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C;;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;;;;"}
@@ -336,10 +336,10 @@ class RdxPresenceDirective {
336
336
  this.viewRef?.destroy();
337
337
  this.viewRef = null;
338
338
  }
339
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPresenceDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
340
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxPresenceDirective, isStandalone: true, ngImport: i0 }); }
339
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPresenceDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
340
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxPresenceDirective, isStandalone: true, ngImport: i0 }); }
341
341
  }
342
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPresenceDirective, decorators: [{
342
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPresenceDirective, decorators: [{
343
343
  type: Directive,
344
344
  args: [{
345
345
  standalone: true
@@ -36,14 +36,18 @@ class RdxPreviewCardRoot {
36
36
  this.hasAppliedDefaultTriggerId = false;
37
37
  this.hoverDelay = 600;
38
38
  this.hoverCloseDelay = 300;
39
- this.isHoverActive = signal(false, ...(ngDevMode ? [{ debugName: "isHoverActive" }] : /* istanbul ignore next */ []));
40
- this.instant = signal(false, ...(ngDevMode ? [{ debugName: "instant" }] : /* istanbul ignore next */ []));
41
- this.openChangeReason = signal('none', ...(ngDevMode ? [{ debugName: "openChangeReason" }] : /* istanbul ignore next */ []));
39
+ this.isHoverActive = signal(false, /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "isHoverActive" }] : /* istanbul ignore next */ []));
41
+ this.instant = signal(false, /* @ts-ignore */
42
+ ...(ngDevMode ? [{ debugName: "instant" }] : /* istanbul ignore next */ []));
43
+ this.openChangeReason = signal('none', /* @ts-ignore */
44
+ ...(ngDevMode ? [{ debugName: "openChangeReason" }] : /* istanbul ignore next */ []));
42
45
  this.transitionStatus = this.transition.status;
43
46
  /**
44
47
  * Whether the preview-card is currently open.
45
48
  */
46
- this.open = model(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
49
+ this.open = model(false, /* @ts-ignore */
50
+ ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
47
51
  /**
48
52
  * Whether the preview-card is initially open.
49
53
  */
@@ -51,27 +55,51 @@ class RdxPreviewCardRoot {
51
55
  /**
52
56
  * ID of the trigger associated with a controlled preview-card.
53
57
  */
54
- this.triggerId = model(null, ...(ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []));
58
+ this.triggerId = model(null, /* @ts-ignore */
59
+ ...(ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []));
55
60
  /**
56
61
  * ID of the trigger associated with an initially open uncontrolled preview-card.
57
62
  */
58
- this.defaultTriggerId = input(null, ...(ngDevMode ? [{ debugName: "defaultTriggerId" }] : /* istanbul ignore next */ []));
63
+ this.defaultTriggerId = input(null, /* @ts-ignore */
64
+ ...(ngDevMode ? [{ debugName: "defaultTriggerId" }] : /* istanbul ignore next */ []));
59
65
  /**
60
66
  * Associates this root with detached trigger elements.
61
67
  */
62
- this.handle = input(...(ngDevMode ? [undefined, { debugName: "handle" }] : /* istanbul ignore next */ []));
68
+ this.handle = input(/* @ts-ignore */
69
+ ...(ngDevMode ? [undefined, { debugName: "handle" }] : /* istanbul ignore next */ []));
63
70
  this.contentId = injectId('rdx-preview-card-content-');
64
- this.trigger = signal(undefined, ...(ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []));
65
- this.triggers = signal([], ...(ngDevMode ? [{ debugName: "triggers" }] : /* istanbul ignore next */ []));
66
- this.payload = signal(undefined, ...(ngDevMode ? [{ debugName: "payload" }] : /* istanbul ignore next */ []));
67
- this.isPointerDownOnTrigger = signal(false, ...(ngDevMode ? [{ debugName: "isPointerDownOnTrigger" }] : /* istanbul ignore next */ []));
68
- this.preventUnmountOnClose = signal(false, ...(ngDevMode ? [{ debugName: "preventUnmountOnClose" }] : /* istanbul ignore next */ []));
71
+ this.trigger = signal(undefined, /* @ts-ignore */
72
+ ...(ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []));
73
+ this.triggers = signal([], /* @ts-ignore */
74
+ ...(ngDevMode ? [{ debugName: "triggers" }] : /* istanbul ignore next */ []));
75
+ this.payload = signal(undefined, /* @ts-ignore */
76
+ ...(ngDevMode ? [{ debugName: "payload" }] : /* istanbul ignore next */ []));
77
+ this.isPointerDownOnTrigger = signal(false, /* @ts-ignore */
78
+ ...(ngDevMode ? [{ debugName: "isPointerDownOnTrigger" }] : /* istanbul ignore next */ []));
79
+ this.preventUnmountOnClose = signal(false, /* @ts-ignore */
80
+ ...(ngDevMode ? [{ debugName: "preventUnmountOnClose" }] : /* istanbul ignore next */ []));
69
81
  this.onOpenChange = output();
70
82
  this.onOpenChangeComplete = output();
71
83
  this.registeredTriggers = new Map();
72
84
  this.viewportTriggerChange = new Set();
73
- this.state = computed(() => (this.open() ? 'open' : 'closed'), ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
74
- this.present = computed(() => this.open() || this.preventUnmountOnClose(), ...(ngDevMode ? [{ debugName: "present" }] : /* istanbul ignore next */ []));
85
+ this.present = computed(() => this.open() || this.preventUnmountOnClose(), /* @ts-ignore */
86
+ ...(ngDevMode ? [{ debugName: "present" }] : /* istanbul ignore next */ []));
87
+ /**
88
+ * Base UI `data-instant` enum, derived from the instant flag + reason: `'focus'` for a focus open,
89
+ * `'dismiss'` for a trigger-press / Escape close, `undefined` otherwise — including an outside-press
90
+ * close and a trigger switch, which Base UI animates rather than marking instant.
91
+ */
92
+ this.instantType = computed(() => {
93
+ if (!this.instant()) {
94
+ return undefined;
95
+ }
96
+ const reason = this.openChangeReason();
97
+ if (this.open()) {
98
+ return reason === 'trigger-focus' ? 'focus' : undefined;
99
+ }
100
+ return reason === 'trigger-press' || reason === 'escape-key' ? 'dismiss' : undefined;
101
+ }, /* @ts-ignore */
102
+ ...(ngDevMode ? [{ debugName: "instantType" }] : /* istanbul ignore next */ []));
75
103
  let previousOpen = this.open();
76
104
  effect(() => {
77
105
  const defaultOpen = this.defaultOpen();
@@ -316,14 +344,14 @@ class RdxPreviewCardRoot {
316
344
  }
317
345
  });
318
346
  }
319
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
320
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxPreviewCardRoot, isStandalone: true, selector: "[rdxPreviewCardRoot]", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, defaultOpen: { classPropertyName: "defaultOpen", publicName: "defaultOpen", isSignal: true, isRequired: false, transformFunction: null }, triggerId: { classPropertyName: "triggerId", publicName: "triggerId", isSignal: true, isRequired: false, transformFunction: null }, defaultTriggerId: { classPropertyName: "defaultTriggerId", publicName: "defaultTriggerId", isSignal: true, isRequired: false, transformFunction: null }, handle: { classPropertyName: "handle", publicName: "handle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", triggerId: "triggerIdChange", onOpenChange: "onOpenChange", onOpenChangeComplete: "onOpenChangeComplete" }, providers: [
347
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
348
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxPreviewCardRoot, isStandalone: true, selector: "[rdxPreviewCardRoot]", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, defaultOpen: { classPropertyName: "defaultOpen", publicName: "defaultOpen", isSignal: true, isRequired: false, transformFunction: null }, triggerId: { classPropertyName: "triggerId", publicName: "triggerId", isSignal: true, isRequired: false, transformFunction: null }, defaultTriggerId: { classPropertyName: "defaultTriggerId", publicName: "defaultTriggerId", isSignal: true, isRequired: false, transformFunction: null }, handle: { classPropertyName: "handle", publicName: "handle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", triggerId: "triggerIdChange", onOpenChange: "onOpenChange", onOpenChangeComplete: "onOpenChangeComplete" }, providers: [
321
349
  provideRdxPreviewCardRootContext(context),
322
350
  provideFloatingTree(),
323
351
  provideFloatingRootContext(() => inject(RdxPreviewCardRoot).floatingContext)
324
352
  ], exportAs: ["rdxPreviewCardRoot"], hostDirectives: [{ directive: i1.RdxPopper }], ngImport: i0 }); }
325
353
  }
326
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardRoot, decorators: [{
354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardRoot, decorators: [{
327
355
  type: Directive,
328
356
  args: [{
329
357
  selector: '[rdxPreviewCardRoot]',
@@ -346,6 +374,7 @@ function contextFor(root) {
346
374
  payload: root.payload.asReadonly(),
347
375
  isHoverActive: root.isHoverActive.asReadonly(),
348
376
  instant: root.instant.asReadonly(),
377
+ instantType: root.instantType,
349
378
  openChangeReason: root.openChangeReason.asReadonly(),
350
379
  isPointerDownOnTrigger: root.isPointerDownOnTrigger.asReadonly(),
351
380
  close: (reason, event) => root.close(reason, event),
@@ -371,14 +400,17 @@ class RdxPreviewCardArrow {
371
400
  constructor() {
372
401
  this.rootContext = injectRdxPreviewCardRootContext();
373
402
  this.wrapper = inject(RdxPopperContentWrapper, { optional: true });
374
- this.side = computed(() => this.wrapper?.placedSide(), ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
375
- this.align = computed(() => this.wrapper?.placedAlign(), ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
376
- this.uncentered = computed(() => this.wrapper?.arrowUncentered() ?? false, ...(ngDevMode ? [{ debugName: "uncentered" }] : /* istanbul ignore next */ []));
377
- }
378
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardArrow, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
379
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxPreviewCardArrow, isStandalone: true, selector: "[rdxPreviewCardArrow]", host: { properties: { "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-side": "side()", "attr.data-align": "align()", "attr.data-uncentered": "uncentered() ? \"\" : undefined" } }, hostDirectives: [{ directive: i1.RdxPopperArrow }], ngImport: i0 }); }
403
+ this.side = computed(() => this.wrapper?.placedSide(), /* @ts-ignore */
404
+ ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
405
+ this.align = computed(() => this.wrapper?.placedAlign(), /* @ts-ignore */
406
+ ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
407
+ this.uncentered = computed(() => this.wrapper?.arrowUncentered() ?? false, /* @ts-ignore */
408
+ ...(ngDevMode ? [{ debugName: "uncentered" }] : /* istanbul ignore next */ []));
409
+ }
410
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardArrow, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
411
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxPreviewCardArrow, isStandalone: true, selector: "[rdxPreviewCardArrow]", host: { properties: { "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-side": "side()", "attr.data-align": "align()", "attr.data-uncentered": "uncentered() ? \"\" : undefined" } }, hostDirectives: [{ directive: i1.RdxPopperArrow }], ngImport: i0 }); }
380
412
  }
381
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardArrow, decorators: [{
413
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardArrow, decorators: [{
382
414
  type: Directive,
383
415
  args: [{
384
416
  selector: '[rdxPreviewCardArrow]',
@@ -400,20 +432,19 @@ class RdxPreviewCardBackdrop {
400
432
  constructor() {
401
433
  this.rootContext = injectRdxPreviewCardRootContext();
402
434
  }
403
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardBackdrop, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
404
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxPreviewCardBackdrop, isStandalone: true, selector: "[rdxPreviewCardBackdrop]", host: { properties: { "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-ending-style": "rootContext.transitionStatus() === \"ending\" ? \"\" : undefined", "attr.data-instant": "rootContext.instant() ? \"\" : undefined", "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-starting-style": "rootContext.transitionStatus() === \"starting\" ? \"\" : undefined", "attr.data-state": "rootContext.isOpen() ? \"open\" : \"closed\"" } }, ngImport: i0 }); }
435
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardBackdrop, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
436
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxPreviewCardBackdrop, isStandalone: true, selector: "[rdxPreviewCardBackdrop]", host: { properties: { "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-ending-style": "rootContext.transitionStatus() === \"ending\" ? \"\" : undefined", "attr.data-instant": "rootContext.instantType()", "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-starting-style": "rootContext.transitionStatus() === \"starting\" ? \"\" : undefined" } }, ngImport: i0 }); }
405
437
  }
406
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardBackdrop, decorators: [{
438
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardBackdrop, decorators: [{
407
439
  type: Directive,
408
440
  args: [{
409
441
  selector: '[rdxPreviewCardBackdrop]',
410
442
  host: {
411
443
  '[attr.data-closed]': 'rootContext.isOpen() ? undefined : ""',
412
444
  '[attr.data-ending-style]': 'rootContext.transitionStatus() === "ending" ? "" : undefined',
413
- '[attr.data-instant]': 'rootContext.instant() ? "" : undefined',
445
+ '[attr.data-instant]': 'rootContext.instantType()',
414
446
  '[attr.data-open]': 'rootContext.isOpen() ? "" : undefined',
415
- '[attr.data-starting-style]': 'rootContext.transitionStatus() === "starting" ? "" : undefined',
416
- '[attr.data-state]': 'rootContext.isOpen() ? "open" : "closed"'
447
+ '[attr.data-starting-style]': 'rootContext.transitionStatus() === "starting" ? "" : undefined'
417
448
  }
418
449
  }]
419
450
  }] });
@@ -434,8 +465,10 @@ class RdxPreviewCardPopup {
434
465
  this.floatingContext = inject(RDX_FLOATING_ROOT_CONTEXT);
435
466
  this.registration = inject(RDX_FLOATING_REGISTRATION, { optional: true });
436
467
  this.wrapper = inject(RdxPopperContentWrapper, { optional: true });
437
- this.align = computed(() => this.wrapper?.placedAlign(), ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
438
- this.side = computed(() => this.wrapper?.placedSide(), ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
468
+ this.align = computed(() => this.wrapper?.placedAlign(), /* @ts-ignore */
469
+ ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
470
+ this.side = computed(() => this.wrapper?.placedSide(), /* @ts-ignore */
471
+ ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
439
472
  /**
440
473
  * Event handler called when the escape key is down. Can be prevented.
441
474
  */
@@ -479,10 +512,10 @@ class RdxPreviewCardPopup {
479
512
  }
480
513
  });
481
514
  }
482
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardPopup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
483
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxPreviewCardPopup, isStandalone: true, selector: "[rdxPreviewCardPopup]", outputs: { escapeKeyDown: "escapeKeyDown", pointerDownOutside: "pointerDownOutside", focusOutside: "focusOutside", interactOutside: "interactOutside" }, host: { listeners: { "pointerenter": "rootContext.cancelHoverClose()" }, properties: { "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-ending-style": "rootContext.transitionStatus() === \"ending\" ? \"\" : undefined", "attr.data-instant": "rootContext.instant() ? \"\" : undefined", "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-starting-style": "rootContext.transitionStatus() === \"starting\" ? \"\" : undefined", "attr.data-state": "rootContext.isOpen() ? \"open\" : \"closed\"", "attr.data-align": "align()", "attr.data-side": "side()", "id": "rootContext.contentId" } }, hostDirectives: [{ directive: i1.RdxPopperContent }, { directive: i2.RdxFloatingNodeRegistration }], ngImport: i0 }); }
515
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardPopup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
516
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxPreviewCardPopup, isStandalone: true, selector: "[rdxPreviewCardPopup]", outputs: { escapeKeyDown: "escapeKeyDown", pointerDownOutside: "pointerDownOutside", focusOutside: "focusOutside", interactOutside: "interactOutside" }, host: { listeners: { "pointerenter": "rootContext.cancelHoverClose()" }, properties: { "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-ending-style": "rootContext.transitionStatus() === \"ending\" ? \"\" : undefined", "attr.data-instant": "rootContext.instantType()", "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-starting-style": "rootContext.transitionStatus() === \"starting\" ? \"\" : undefined", "attr.data-align": "align()", "attr.data-side": "side()", "id": "rootContext.contentId" } }, hostDirectives: [{ directive: i1.RdxPopperContent }, { directive: i2.RdxFloatingNodeRegistration }], ngImport: i0 }); }
484
517
  }
485
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardPopup, decorators: [{
518
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardPopup, decorators: [{
486
519
  type: Directive,
487
520
  args: [{
488
521
  selector: '[rdxPreviewCardPopup]',
@@ -490,10 +523,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
490
523
  host: {
491
524
  '[attr.data-closed]': 'rootContext.isOpen() ? undefined : ""',
492
525
  '[attr.data-ending-style]': 'rootContext.transitionStatus() === "ending" ? "" : undefined',
493
- '[attr.data-instant]': 'rootContext.instant() ? "" : undefined',
526
+ '[attr.data-instant]': 'rootContext.instantType()',
494
527
  '[attr.data-open]': 'rootContext.isOpen() ? "" : undefined',
495
528
  '[attr.data-starting-style]': 'rootContext.transitionStatus() === "starting" ? "" : undefined',
496
- '[attr.data-state]': 'rootContext.isOpen() ? "open" : "closed"',
497
529
  '[attr.data-align]': 'align()',
498
530
  '[attr.data-side]': 'side()',
499
531
  '[id]': 'rootContext.contentId',
@@ -512,10 +544,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
512
544
  * `<ng-template rdxPreviewCardPortal>`. For a custom container use the explicit form with `[container]`.
513
545
  */
514
546
  class RdxPreviewCardPortal {
515
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardPortal, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
516
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxPreviewCardPortal, isStandalone: true, selector: "ng-template[rdxPreviewCardPortal]", providers: [provideRdxPresenceContext(() => ({ present: injectRdxPreviewCardRootContext().present }))], exportAs: ["rdxPreviewCardPortal"], hostDirectives: [{ directive: i1$1.RdxPortalPresence, inputs: ["container", "container"] }], ngImport: i0 }); }
547
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardPortal, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
548
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxPreviewCardPortal, isStandalone: true, selector: "ng-template[rdxPreviewCardPortal]", providers: [provideRdxPresenceContext(() => ({ present: injectRdxPreviewCardRootContext().present }))], exportAs: ["rdxPreviewCardPortal"], hostDirectives: [{ directive: i1$1.RdxPortalPresence, inputs: ["container", "container"] }], ngImport: i0 }); }
517
549
  }
518
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardPortal, decorators: [{
550
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardPortal, decorators: [{
519
551
  type: Directive,
520
552
  args: [{
521
553
  selector: 'ng-template[rdxPreviewCardPortal]',
@@ -537,10 +569,10 @@ class RdxPreviewCardPortalMisuseGuard {
537
569
  'rdxPreviewCardPortalPresence has been removed.', 'components/preview-card');
538
570
  }
539
571
  }
540
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardPortalMisuseGuard, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
541
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxPreviewCardPortalMisuseGuard, isStandalone: true, selector: "[rdxPreviewCardPortal]:not(ng-template)", ngImport: i0 }); }
572
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardPortalMisuseGuard, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
573
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxPreviewCardPortalMisuseGuard, isStandalone: true, selector: "[rdxPreviewCardPortal]:not(ng-template)", ngImport: i0 }); }
542
574
  }
543
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardPortalMisuseGuard, decorators: [{
575
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardPortalMisuseGuard, decorators: [{
544
576
  type: Directive,
545
577
  args: [{
546
578
  selector: '[rdxPreviewCardPortal]:not(ng-template)'
@@ -561,21 +593,23 @@ class RdxPreviewCardPositioner extends RdxPopperContentWrapper {
561
593
  this.rootContext = injectRdxPreviewCardRootContext();
562
594
  this.legacyVars = legacyPopperVars('preview-card');
563
595
  this.containerRef = inject(ElementRef);
564
- this.triggerEl = signal(null, ...(ngDevMode ? [{ debugName: "triggerEl" }] : /* istanbul ignore next */ []));
565
- this.containerEl = signal(this.containerRef.nativeElement, ...(ngDevMode ? [{ debugName: "containerEl" }] : /* istanbul ignore next */ []));
596
+ this.triggerEl = signal(null, /* @ts-ignore */
597
+ ...(ngDevMode ? [{ debugName: "triggerEl" }] : /* istanbul ignore next */ []));
598
+ this.containerEl = signal(this.containerRef.nativeElement, /* @ts-ignore */
599
+ ...(ngDevMode ? [{ debugName: "containerEl" }] : /* istanbul ignore next */ []));
566
600
  this.graceArea = useGraceArea(this.triggerEl, this.containerEl);
567
601
  effect(() => this.triggerEl.set(this.rootContext.trigger() ?? null));
568
602
  this.graceArea.onPointerExit(() => {
569
603
  this.rootContext.closeOnHover();
570
604
  });
571
605
  }
572
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardPositioner, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
573
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxPreviewCardPositioner, isStandalone: true, selector: "[rdxPreviewCardPositioner]", host: { properties: { "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-instant": "rootContext.instant() ? \"\" : undefined", "style": "legacyVars" } }, providers: [
606
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardPositioner, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
607
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxPreviewCardPositioner, isStandalone: true, selector: "[rdxPreviewCardPositioner]", host: { properties: { "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-instant": "rootContext.instantType()", "style": "legacyVars" } }, providers: [
574
608
  ...provideRdxPopperContentWrapper(RdxPreviewCardPositioner),
575
609
  provideRdxPopperContentConfig({ arrowPadding: 5, collisionPadding: 5, updatePositionStrategy: 'always' })
576
610
  ], usesInheritance: true, ngImport: i0 }); }
577
611
  }
578
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardPositioner, decorators: [{
612
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardPositioner, decorators: [{
579
613
  type: Directive,
580
614
  args: [{
581
615
  selector: '[rdxPreviewCardPositioner]',
@@ -586,7 +620,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
586
620
  host: {
587
621
  '[attr.data-open]': 'rootContext.isOpen() ? "" : undefined',
588
622
  '[attr.data-closed]': 'rootContext.isOpen() ? undefined : ""',
589
- '[attr.data-instant]': 'rootContext.instant() ? "" : undefined',
623
+ '[attr.data-instant]': 'rootContext.instantType()',
590
624
  // `data-side`/`data-align`/`data-anchor-hidden` and the unified `--anchor-*`/`--available-*`/
591
625
  // `--transform-origin` vars come from the inherited wrapper (ADR 0012); only the deprecated
592
626
  // `--radix-preview-card-*` aliases remain, for one release of back-compat.
@@ -605,15 +639,18 @@ class RdxPreviewCardTrigger {
605
639
  /**
606
640
  * Associates this trigger with a detached preview-card root.
607
641
  */
608
- this.handle = input(...(ngDevMode ? [undefined, { debugName: "handle" }] : /* istanbul ignore next */ []));
642
+ this.handle = input(/* @ts-ignore */
643
+ ...(ngDevMode ? [undefined, { debugName: "handle" }] : /* istanbul ignore next */ []));
609
644
  /**
610
645
  * Data associated with this trigger while it is active.
611
646
  */
612
- this.payload = input(...(ngDevMode ? [undefined, { debugName: "payload" }] : /* istanbul ignore next */ []));
647
+ this.payload = input(/* @ts-ignore */
648
+ ...(ngDevMode ? [undefined, { debugName: "payload" }] : /* istanbul ignore next */ []));
613
649
  /**
614
650
  * ID used to identify this trigger when opening a detached preview-card imperatively.
615
651
  */
616
- this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
652
+ this.id = input(/* @ts-ignore */
653
+ ...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
617
654
  /**
618
655
  * Whether the trigger should ignore user interaction.
619
656
  */
@@ -626,10 +663,14 @@ class RdxPreviewCardTrigger {
626
663
  * How long to wait before closing a hover-opened preview-card, in milliseconds.
627
664
  */
628
665
  this.closeDelay = input(300, { ...(ngDevMode ? { debugName: "closeDelay" } : /* istanbul ignore next */ {}), transform: numberAttribute });
629
- this.triggerId = computed(() => this.id() ?? this.generatedId, ...(ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []));
630
- this.rootContext = computed(() => this.handle()?.context() ?? this.parentRootContext, ...(ngDevMode ? [{ debugName: "rootContext" }] : /* istanbul ignore next */ []));
631
- this.isOpen = computed(() => this.rootContext()?.isOpen() === true && this.rootContext()?.trigger() === this.elementRef.nativeElement, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
632
- this.isPressed = computed(() => this.isOpen() && this.rootContext()?.openChangeReason() === 'trigger-press', ...(ngDevMode ? [{ debugName: "isPressed" }] : /* istanbul ignore next */ []));
666
+ this.triggerId = computed(() => this.id() ?? this.generatedId, /* @ts-ignore */
667
+ ...(ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []));
668
+ this.rootContext = computed(() => this.handle()?.context() ?? this.parentRootContext, /* @ts-ignore */
669
+ ...(ngDevMode ? [{ debugName: "rootContext" }] : /* istanbul ignore next */ []));
670
+ this.isOpen = computed(() => this.rootContext()?.isOpen() === true && this.rootContext()?.trigger() === this.elementRef.nativeElement, /* @ts-ignore */
671
+ ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
672
+ this.isPressed = computed(() => this.isOpen() && this.rootContext()?.openChangeReason() === 'trigger-press', /* @ts-ignore */
673
+ ...(ngDevMode ? [{ debugName: "isPressed" }] : /* istanbul ignore next */ []));
633
674
  this.generatedId = injectId('rdx-preview-card-trigger-');
634
675
  rdxCheckTriggerElement('rdxPreviewCardTrigger', 'preview-card/trigger-element', 'components/preview-card');
635
676
  effect((onCleanup) => {
@@ -680,21 +721,20 @@ class RdxPreviewCardTrigger {
680
721
  handlePointerUp() {
681
722
  this.rootContext()?.setPointerDownOnTrigger(false);
682
723
  }
683
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
684
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxPreviewCardTrigger, isStandalone: true, selector: "[rdxPreviewCardTrigger]", inputs: { handle: { classPropertyName: "handle", publicName: "handle", isSignal: true, isRequired: false, transformFunction: null }, payload: { classPropertyName: "payload", publicName: "payload", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, closeDelay: { classPropertyName: "closeDelay", publicName: "closeDelay", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "handleClick($event)", "pointerenter": "handlePointerEnter($event)", "pointerleave": "handlePointerLeave($event)", "focus": "handleFocus($event)", "blur": "handleBlur($event)", "pointerdown": "handlePointerDown()", "pointerup": "handlePointerUp()", "pointercancel": "handlePointerUp()" }, properties: { "attr.aria-controls": "rootContext()?.contentId", "attr.aria-disabled": "disabled() ? \"true\" : undefined", "attr.aria-expanded": "isOpen()", "attr.aria-haspopup": "\"dialog\"", "attr.data-disabled": "disabled() ? \"\" : undefined", "attr.data-state": "isOpen() ? \"open\" : \"closed\"", "attr.data-popup-open": "isOpen() ? \"\" : undefined", "attr.data-pressed": "isPressed() ? \"\" : undefined", "id": "triggerId()" } }, hostDirectives: [{ directive: i1.RdxPopperAnchor }], ngImport: i0 }); }
724
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
725
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxPreviewCardTrigger, isStandalone: true, selector: "[rdxPreviewCardTrigger]", inputs: { handle: { classPropertyName: "handle", publicName: "handle", isSignal: true, isRequired: false, transformFunction: null }, payload: { classPropertyName: "payload", publicName: "payload", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, closeDelay: { classPropertyName: "closeDelay", publicName: "closeDelay", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "handleClick($event)", "pointerenter": "handlePointerEnter($event)", "pointerleave": "handlePointerLeave($event)", "focus": "handleFocus($event)", "blur": "handleBlur($event)", "pointerdown": "handlePointerDown()", "pointerup": "handlePointerUp()", "pointercancel": "handlePointerUp()" }, properties: { "attr.aria-disabled": "disabled() ? \"true\" : undefined", "attr.data-disabled": "disabled() ? \"\" : undefined", "attr.data-popup-open": "isOpen() ? \"\" : undefined", "attr.data-pressed": "isPressed() ? \"\" : undefined", "id": "triggerId()" } }, hostDirectives: [{ directive: i1.RdxPopperAnchor }], ngImport: i0 }); }
685
726
  }
686
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardTrigger, decorators: [{
727
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardTrigger, decorators: [{
687
728
  type: Directive,
688
729
  args: [{
689
730
  selector: '[rdxPreviewCardTrigger]',
690
731
  hostDirectives: [RdxPopperAnchor],
691
732
  host: {
692
- '[attr.aria-controls]': 'rootContext()?.contentId',
733
+ // A preview card is supplementary content reached from a link, NOT a dialog — Base UI's trigger
734
+ // emits no `aria-haspopup`/`aria-expanded`/`aria-controls` (announcing a dialog would mis-describe
735
+ // it to AT). Only the disabled state is surfaced.
693
736
  '[attr.aria-disabled]': 'disabled() ? "true" : undefined',
694
- '[attr.aria-expanded]': 'isOpen()',
695
- '[attr.aria-haspopup]': '"dialog"',
696
737
  '[attr.data-disabled]': 'disabled() ? "" : undefined',
697
- '[attr.data-state]': 'isOpen() ? "open" : "closed"',
698
738
  '[attr.data-popup-open]': 'isOpen() ? "" : undefined',
699
739
  '[attr.data-pressed]': 'isPressed() ? "" : undefined',
700
740
  '[id]': 'triggerId()',
@@ -722,8 +762,10 @@ class RdxPreviewCardViewport {
722
762
  this.rootContext = injectRdxPreviewCardRootContext();
723
763
  this.elementRef = inject(ElementRef);
724
764
  this.destroyRef = inject(DestroyRef);
725
- this.activationDirection = signal(undefined, ...(ngDevMode ? [{ debugName: "activationDirection" }] : /* istanbul ignore next */ []));
726
- this.transitioning = signal(false, ...(ngDevMode ? [{ debugName: "transitioning" }] : /* istanbul ignore next */ []));
765
+ this.activationDirection = signal(undefined, /* @ts-ignore */
766
+ ...(ngDevMode ? [{ debugName: "activationDirection" }] : /* istanbul ignore next */ []));
767
+ this.transitioning = signal(false, /* @ts-ignore */
768
+ ...(ngDevMode ? [{ debugName: "transitioning" }] : /* istanbul ignore next */ []));
727
769
  const unregister = this.rootContext.registerViewport((previousTrigger, nextTrigger) => {
728
770
  this.startTransition(previousTrigger, nextTrigger);
729
771
  });
@@ -787,15 +829,16 @@ class RdxPreviewCardViewport {
787
829
  this.previous = undefined;
788
830
  this.transitioning.set(false);
789
831
  }
790
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardViewport, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
791
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxPreviewCardViewport, isStandalone: true, selector: "[rdxPreviewCardViewport]", host: { properties: { "attr.data-activation-direction": "activationDirection()", "attr.data-transitioning": "transitioning() ? \"\" : undefined" } }, ngImport: i0 }); }
832
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardViewport, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
833
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxPreviewCardViewport, isStandalone: true, selector: "[rdxPreviewCardViewport]", host: { properties: { "attr.data-activation-direction": "activationDirection()", "attr.data-instant": "rootContext.instantType()", "attr.data-transitioning": "transitioning() ? \"\" : undefined" } }, ngImport: i0 }); }
792
834
  }
793
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardViewport, decorators: [{
835
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardViewport, decorators: [{
794
836
  type: Directive,
795
837
  args: [{
796
838
  selector: '[rdxPreviewCardViewport]',
797
839
  host: {
798
840
  '[attr.data-activation-direction]': 'activationDirection()',
841
+ '[attr.data-instant]': 'rootContext.instantType()',
799
842
  '[attr.data-transitioning]': 'transitioning() ? "" : undefined'
800
843
  }
801
844
  }]
@@ -845,10 +888,12 @@ function parseDuration(value) {
845
888
 
846
889
  class RdxPreviewCardHandle {
847
890
  constructor() {
848
- this.rootContext = signal(undefined, ...(ngDevMode ? [{ debugName: "rootContext" }] : /* istanbul ignore next */ []));
891
+ this.rootContext = signal(undefined, /* @ts-ignore */
892
+ ...(ngDevMode ? [{ debugName: "rootContext" }] : /* istanbul ignore next */ []));
849
893
  this.triggers = new Map();
850
894
  this.rootTriggerCleanups = new Map();
851
- this.isOpen = computed(() => this.rootContext()?.isOpen() ?? false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
895
+ this.isOpen = computed(() => this.rootContext()?.isOpen() ?? false, /* @ts-ignore */
896
+ ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
852
897
  }
853
898
  open(triggerId) {
854
899
  const trigger = this.triggers.get(triggerId);
@@ -915,8 +960,8 @@ const previewCardImports = [
915
960
  RdxPreviewCardViewport
916
961
  ];
917
962
  class RdxPreviewCardModule {
918
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
919
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardModule, imports: [RdxPreviewCardRoot,
963
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
964
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardModule, imports: [RdxPreviewCardRoot,
920
965
  RdxPreviewCardTrigger,
921
966
  RdxPreviewCardPortal,
922
967
  RdxPreviewCardPortalMisuseGuard,
@@ -933,9 +978,9 @@ class RdxPreviewCardModule {
933
978
  RdxPreviewCardPopup,
934
979
  RdxPreviewCardArrow,
935
980
  RdxPreviewCardViewport] }); }
936
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardModule }); }
981
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardModule }); }
937
982
  }
938
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxPreviewCardModule, decorators: [{
983
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxPreviewCardModule, decorators: [{
939
984
  type: NgModule,
940
985
  args: [{
941
986
  imports: [...previewCardImports],