@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
@@ -3,7 +3,7 @@ import { inject, computed, Directive, ElementRef, input, signal, TemplateRef, bo
3
3
  import * as i1 from '@radix-ng/primitives/popper';
4
4
  import { RdxPopperContentWrapper, RdxPopperArrow, RdxPopperContent, provideRdxPopperContentWrapper, provideRdxPopperContentConfig, RdxPopper } from '@radix-ng/primitives/popper';
5
5
  import * as i2 from '@radix-ng/primitives/core';
6
- import { createContext, ENTER, SPACE, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, ARROW_DOWN, RDX_FLOATING_ROOT_CONTEXT, RDX_FLOATING_REGISTRATION, TAB, HOME, END, rdxDevError, useGraceArea, createFloatingRootContext, useTransitionStatus, provideFloatingTree, provideFloatingRootContext, RdxFloatingNodeRegistration, createCancelableChangeEventDetails, injectDocument, getMaxTransitionDuration } from '@radix-ng/primitives/core';
6
+ import { createContext, injectId, ENTER, SPACE, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, ARROW_DOWN, RDX_FLOATING_ROOT_CONTEXT, RDX_FLOATING_REGISTRATION, TAB, HOME, END, rdxDevError, useGraceArea, createFloatingRootContext, useTransitionStatus, provideFloatingTree, provideFloatingRootContext, RdxFloatingNodeRegistration, createCancelableChangeEventDetails, injectDocument, getMaxTransitionDuration } from '@radix-ng/primitives/core';
7
7
  import * as i1$1 from '@radix-ng/primitives/composite';
8
8
  import { RdxCompositeItem, RdxCompositeRoot } from '@radix-ng/primitives/composite';
9
9
  import { RdxDismiss } from '@radix-ng/primitives/dismissable-layer';
@@ -21,14 +21,17 @@ class RdxNavigationMenuArrow {
21
21
  constructor() {
22
22
  this.rootContext = injectNavigationMenuRootContext();
23
23
  this.wrapper = inject(RdxPopperContentWrapper, { optional: true });
24
- this.side = computed(() => this.wrapper?.placedSide(), ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
25
- this.align = computed(() => this.wrapper?.placedAlign(), ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
26
- this.uncentered = computed(() => this.wrapper?.arrowUncentered() ?? false, ...(ngDevMode ? [{ debugName: "uncentered" }] : /* istanbul ignore next */ []));
27
- }
28
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuArrow, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
29
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxNavigationMenuArrow, isStandalone: true, selector: "[rdxNavigationMenuArrow]", 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 }); }
24
+ this.side = computed(() => this.wrapper?.placedSide(), /* @ts-ignore */
25
+ ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
26
+ this.align = computed(() => this.wrapper?.placedAlign(), /* @ts-ignore */
27
+ ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
28
+ this.uncentered = computed(() => this.wrapper?.arrowUncentered() ?? false, /* @ts-ignore */
29
+ ...(ngDevMode ? [{ debugName: "uncentered" }] : /* istanbul ignore next */ []));
30
+ }
31
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuArrow, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
32
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxNavigationMenuArrow, isStandalone: true, selector: "[rdxNavigationMenuArrow]", 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 }); }
30
33
  }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuArrow, decorators: [{
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuArrow, decorators: [{
32
35
  type: Directive,
33
36
  args: [{
34
37
  selector: '[rdxNavigationMenuArrow]',
@@ -53,10 +56,10 @@ class RdxNavigationMenuBackdrop {
53
56
  host.style.setProperty('-webkit-user-select', 'none');
54
57
  host.style.webkitUserSelect = 'none';
55
58
  }
56
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuBackdrop, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
57
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxNavigationMenuBackdrop, isStandalone: true, selector: "[rdxNavigationMenuBackdrop]", host: { attributes: { "role": "presentation" }, properties: { "attr.hidden": "rootContext.present() ? undefined : \"\"", "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-starting-style": "rootContext.transitionStatus() === \"starting\" ? \"\" : undefined", "attr.data-ending-style": "rootContext.transitionStatus() === \"ending\" ? \"\" : undefined", "attr.data-instant": "rootContext.instant() ? \"\" : undefined", "attr.data-state": "rootContext.isOpen() ? \"open\" : \"closed\"", "style.user-select": "\"none\"" } }, ngImport: i0 }); }
59
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuBackdrop, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
60
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxNavigationMenuBackdrop, isStandalone: true, selector: "[rdxNavigationMenuBackdrop]", host: { attributes: { "role": "presentation" }, properties: { "attr.hidden": "rootContext.present() ? undefined : \"\"", "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-starting-style": "rootContext.transitionStatus() === \"starting\" ? \"\" : undefined", "attr.data-ending-style": "rootContext.transitionStatus() === \"ending\" ? \"\" : undefined", "attr.data-instant": "rootContext.instant() ? \"\" : undefined", "style.user-select": "\"none\"" } }, ngImport: i0 }); }
58
61
  }
59
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuBackdrop, decorators: [{
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuBackdrop, decorators: [{
60
63
  type: Directive,
61
64
  args: [{
62
65
  selector: '[rdxNavigationMenuBackdrop]',
@@ -68,124 +71,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
68
71
  '[attr.data-starting-style]': 'rootContext.transitionStatus() === "starting" ? "" : undefined',
69
72
  '[attr.data-ending-style]': 'rootContext.transitionStatus() === "ending" ? "" : undefined',
70
73
  '[attr.data-instant]': 'rootContext.instant() ? "" : undefined',
71
- '[attr.data-state]': 'rootContext.isOpen() ? "open" : "closed"',
72
74
  '[style.user-select]': '"none"'
73
75
  }
74
76
  }]
75
77
  }], ctorParameters: () => [] });
76
78
 
77
- /**
78
- * Generate a short unique id segment.
79
- */
80
- function generateId() {
81
- return Math.random().toString(36).substring(2, 11);
82
- }
83
- /**
84
- * Collect the tabbable elements inside a container, in DOM order, skipping hidden ones.
85
- */
86
- function getTabbableCandidates(container) {
87
- if (!container || !container.querySelectorAll) {
88
- return [];
89
- }
90
- const TABBABLE_SELECTOR = 'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), ' +
91
- 'select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), ' +
92
- '[contenteditable="true"]:not([tabindex="-1"])';
93
- const elements = Array.from(container.querySelectorAll(TABBABLE_SELECTOR));
94
- return elements.filter((element) => {
95
- if (element.tabIndex < 0) {
96
- return false;
97
- }
98
- if (element.hasAttribute('disabled')) {
99
- return false;
100
- }
101
- if (element.getAttribute('aria-hidden') === 'true') {
102
- return false;
103
- }
104
- let current = element;
105
- while (current) {
106
- const style = window.getComputedStyle(current);
107
- if (style.display === 'none' || style.visibility === 'hidden') {
108
- return false;
109
- }
110
- current = current.parentElement;
111
- }
112
- return true;
113
- });
114
- }
115
- /**
116
- * Focus the first focusable candidate, returning whether focus moved.
117
- */
118
- function focusFirst(candidates, preventScroll = false) {
119
- const previouslyFocused = document.activeElement;
120
- return candidates.some((candidate) => {
121
- if (candidate === previouslyFocused) {
122
- return true;
123
- }
124
- candidate.focus({ preventScroll });
125
- return document.activeElement !== previouslyFocused;
126
- });
127
- }
128
- /**
129
- * Derive a slide direction (e.g. `"left"`, `"right up"`) from the relative position of two triggers.
130
- * Used by the viewport to animate content as the active item changes.
131
- */
132
- function getActivationDirection(previous, next) {
133
- const previousCenter = getCenter(previous.getBoundingClientRect());
134
- const nextCenter = getCenter(next.getBoundingClientRect());
135
- const directions = [];
136
- if (nextCenter.x < previousCenter.x) {
137
- directions.push('left');
138
- }
139
- else if (nextCenter.x > previousCenter.x) {
140
- directions.push('right');
141
- }
142
- if (nextCenter.y < previousCenter.y) {
143
- directions.push('up');
144
- }
145
- else if (nextCenter.y > previousCenter.y) {
146
- directions.push('down');
147
- }
148
- return directions.join(' ') || undefined;
149
- }
150
- /**
151
- * Remove `id` from an element and all its descendants (used when cloning content for an exit
152
- * animation, to avoid duplicate ids in the document).
153
- */
154
- function removeIds(element) {
155
- element.removeAttribute('id');
156
- element.querySelectorAll('[id]').forEach((child) => child.removeAttribute('id'));
157
- }
158
- function getCenter(rect) {
159
- return { x: rect.left + rect.width / 2, y: rect.top + rect.height / 2 };
160
- }
161
-
162
79
  /**
163
80
  * A single navigation menu item. Holds a trigger + content pair, or a standalone link.
164
81
  */
165
82
  class RdxNavigationMenuItem {
166
83
  constructor() {
167
84
  this.rootContext = injectNavigationMenuRootContext();
168
- /**
169
- * A unique value that identifies the item. Falls back to a generated id.
170
- */
171
- this.value = input('', { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), transform: (value) => value || `item-${generateId()}` });
85
+ /** A unique value that identifies the item. Falls back to a stable generated id. */
86
+ this.valueInput = input(undefined, { ...(ngDevMode ? { debugName: "valueInput" } : /* istanbul ignore next */ {}), alias: 'value' });
87
+ this.generatedValue = injectId('rdx-nav-menu-item-');
88
+ this.value = computed(() => this.valueInput() || this.generatedValue, /* @ts-ignore */
89
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
172
90
  /** The trigger element, set by the trigger directive. */
173
- this.triggerRef = signal(null, ...(ngDevMode ? [{ debugName: "triggerRef" }] : /* istanbul ignore next */ []));
91
+ this.triggerRef = signal(null, /* @ts-ignore */
92
+ ...(ngDevMode ? [{ debugName: "triggerRef" }] : /* istanbul ignore next */ []));
174
93
  /** Whether this item is the currently open one. */
175
- this.isOpen = computed(() => this.rootContext.value() === this.value(), ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
176
- this.triggerId = computed(() => this.rootContext.triggerId(this.value()), ...(ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []));
177
- this.contentId = computed(() => this.rootContext.contentId(this.value()), ...(ngDevMode ? [{ debugName: "contentId" }] : /* istanbul ignore next */ []));
178
- }
179
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
180
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxNavigationMenuItem, isStandalone: true, selector: "[rdxNavigationMenuItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["rdxNavigationMenuItem"], ngImport: i0 }); }
94
+ this.isOpen = computed(() => this.rootContext.value() === this.value(), /* @ts-ignore */
95
+ ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
96
+ this.triggerId = computed(() => this.rootContext.triggerId(this.value()), /* @ts-ignore */
97
+ ...(ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []));
98
+ this.contentId = computed(() => this.rootContext.contentId(this.value()), /* @ts-ignore */
99
+ ...(ngDevMode ? [{ debugName: "contentId" }] : /* istanbul ignore next */ []));
100
+ }
101
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
102
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxNavigationMenuItem, isStandalone: true, selector: "[rdxNavigationMenuItem]", inputs: { valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["rdxNavigationMenuItem"], ngImport: i0 }); }
181
103
  }
182
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuItem, decorators: [{
104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuItem, decorators: [{
183
105
  type: Directive,
184
106
  args: [{
185
107
  selector: '[rdxNavigationMenuItem]',
186
108
  exportAs: 'rdxNavigationMenuItem'
187
109
  }]
188
- }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
110
+ }], propDecorators: { valueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
189
111
 
190
112
  /**
191
113
  * The content shown when its item is open. Used as a structural directive; its template is rendered
@@ -222,10 +144,10 @@ class RdxNavigationMenuContent {
222
144
  onCleanup(unregister);
223
145
  });
224
146
  }
225
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
226
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxNavigationMenuContent, isStandalone: true, selector: "[rdxNavigationMenuContent]", inputs: { rdxNavigationMenuContent: { classPropertyName: "rdxNavigationMenuContent", publicName: "rdxNavigationMenuContent", isSignal: true, isRequired: false, transformFunction: null }, forceMount: { classPropertyName: "forceMount", publicName: "forceMount", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
147
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
148
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxNavigationMenuContent, isStandalone: true, selector: "[rdxNavigationMenuContent]", inputs: { rdxNavigationMenuContent: { classPropertyName: "rdxNavigationMenuContent", publicName: "rdxNavigationMenuContent", isSignal: true, isRequired: false, transformFunction: null }, forceMount: { classPropertyName: "forceMount", publicName: "forceMount", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
227
149
  }
228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuContent, decorators: [{
150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuContent, decorators: [{
229
151
  type: Directive,
230
152
  args: [{
231
153
  selector: '[rdxNavigationMenuContent]'
@@ -239,18 +161,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
239
161
  class RdxNavigationMenuIcon {
240
162
  constructor() {
241
163
  this.item = inject(RdxNavigationMenuItem);
242
- this.open = computed(() => this.item.isOpen(), ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
164
+ this.open = computed(() => this.item.isOpen(), /* @ts-ignore */
165
+ ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
243
166
  }
244
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
245
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxNavigationMenuIcon, isStandalone: true, selector: "[rdxNavigationMenuIcon]", host: { attributes: { "aria-hidden": "true" }, properties: { "attr.data-state": "open() ? \"open\" : \"closed\"" } }, ngImport: i0 }); }
167
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
168
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxNavigationMenuIcon, isStandalone: true, selector: "[rdxNavigationMenuIcon]", host: { attributes: { "aria-hidden": "true" }, properties: { "attr.data-popup-open": "open() ? \"\" : undefined" } }, ngImport: i0 }); }
246
169
  }
247
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuIcon, decorators: [{
170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuIcon, decorators: [{
248
171
  type: Directive,
249
172
  args: [{
250
173
  selector: '[rdxNavigationMenuIcon]',
251
174
  host: {
252
175
  'aria-hidden': 'true',
253
- '[attr.data-state]': 'open() ? "open" : "closed"'
176
+ '[attr.data-popup-open]': 'open() ? "" : undefined'
254
177
  }
255
178
  }]
256
179
  }] });
@@ -281,7 +204,7 @@ class RdxNavigationMenuLink {
281
204
  onClick(event) {
282
205
  this.onSelect.emit(event);
283
206
  if (this.closeOnClick() && !event.defaultPrevented) {
284
- this.rootContext.close('link-select', event);
207
+ this.rootContext.close('link-press', event);
285
208
  }
286
209
  }
287
210
  onKeydown(event) {
@@ -290,10 +213,10 @@ class RdxNavigationMenuLink {
290
213
  this.elementRef.nativeElement.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }));
291
214
  }
292
215
  }
293
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuLink, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
294
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxNavigationMenuLink, isStandalone: true, selector: "[rdxNavigationMenuLink]", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, closeOnClick: { classPropertyName: "closeOnClick", publicName: "closeOnClick", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelect: "onSelect" }, host: { listeners: { "click": "onClick($event)", "keydown": "onKeydown($event)" }, properties: { "attr.data-active": "active() ? \"\" : undefined", "attr.aria-current": "active() ? \"page\" : undefined" } }, hostDirectives: [{ directive: i1$1.RdxCompositeItem }], ngImport: i0 }); }
216
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuLink, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
217
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxNavigationMenuLink, isStandalone: true, selector: "[rdxNavigationMenuLink]", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, closeOnClick: { classPropertyName: "closeOnClick", publicName: "closeOnClick", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelect: "onSelect" }, host: { listeners: { "click": "onClick($event)", "keydown": "onKeydown($event)" }, properties: { "attr.data-active": "active() ? \"\" : undefined", "attr.aria-current": "active() ? \"page\" : undefined" } }, hostDirectives: [{ directive: i1$1.RdxCompositeItem }], ngImport: i0 }); }
295
218
  }
296
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuLink, decorators: [{
219
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuLink, decorators: [{
297
220
  type: Directive,
298
221
  args: [{
299
222
  selector: '[rdxNavigationMenuLink]',
@@ -340,10 +263,10 @@ class RdxNavigationMenuList {
340
263
  }
341
264
  this.rootContext.closeOnHover(event);
342
265
  }
343
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuList, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
344
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxNavigationMenuList, isStandalone: true, selector: "[rdxNavigationMenuList]", host: { listeners: { "keydown": "onKeydown($event)", "pointerleave": "onPointerLeave($event)" }, properties: { "attr.data-orientation": "rootContext.orientation()" } }, hostDirectives: [{ directive: i1$1.RdxCompositeRoot }], ngImport: i0 }); }
266
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuList, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
267
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxNavigationMenuList, isStandalone: true, selector: "[rdxNavigationMenuList]", host: { listeners: { "keydown": "onKeydown($event)", "pointerleave": "onPointerLeave($event)" }, properties: { "attr.data-orientation": "rootContext.orientation()" } }, hostDirectives: [{ directive: i1$1.RdxCompositeRoot }], ngImport: i0 }); }
345
268
  }
346
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuList, decorators: [{
269
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuList, decorators: [{
347
270
  type: Directive,
348
271
  args: [{
349
272
  selector: '[rdxNavigationMenuList]',
@@ -356,6 +279,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
356
279
  }]
357
280
  }], ctorParameters: () => [] });
358
281
 
282
+ /**
283
+ * Collect the tabbable elements inside a container, in DOM order, skipping hidden ones.
284
+ */
285
+ function getTabbableCandidates(container) {
286
+ if (!container || !container.querySelectorAll) {
287
+ return [];
288
+ }
289
+ const TABBABLE_SELECTOR = 'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), ' +
290
+ 'select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), ' +
291
+ '[contenteditable="true"]:not([tabindex="-1"])';
292
+ const elements = Array.from(container.querySelectorAll(TABBABLE_SELECTOR));
293
+ return elements.filter((element) => {
294
+ if (element.tabIndex < 0) {
295
+ return false;
296
+ }
297
+ if (element.hasAttribute('disabled')) {
298
+ return false;
299
+ }
300
+ if (element.getAttribute('aria-hidden') === 'true') {
301
+ return false;
302
+ }
303
+ let current = element;
304
+ while (current) {
305
+ const style = window.getComputedStyle(current);
306
+ if (style.display === 'none' || style.visibility === 'hidden') {
307
+ return false;
308
+ }
309
+ current = current.parentElement;
310
+ }
311
+ return true;
312
+ });
313
+ }
314
+ /**
315
+ * Focus the first focusable candidate, returning whether focus moved.
316
+ */
317
+ function focusFirst(candidates, preventScroll = false) {
318
+ const previouslyFocused = document.activeElement;
319
+ return candidates.some((candidate) => {
320
+ if (candidate === previouslyFocused) {
321
+ return true;
322
+ }
323
+ candidate.focus({ preventScroll });
324
+ return document.activeElement !== previouslyFocused;
325
+ });
326
+ }
327
+ /**
328
+ * Derive a slide direction (e.g. `"left"`, `"right up"`) from the relative position of two triggers.
329
+ * Used by the viewport to animate content as the active item changes.
330
+ */
331
+ function getActivationDirection(previous, next) {
332
+ const previousCenter = getCenter(previous.getBoundingClientRect());
333
+ const nextCenter = getCenter(next.getBoundingClientRect());
334
+ const directions = [];
335
+ if (nextCenter.x < previousCenter.x) {
336
+ directions.push('left');
337
+ }
338
+ else if (nextCenter.x > previousCenter.x) {
339
+ directions.push('right');
340
+ }
341
+ if (nextCenter.y < previousCenter.y) {
342
+ directions.push('up');
343
+ }
344
+ else if (nextCenter.y > previousCenter.y) {
345
+ directions.push('down');
346
+ }
347
+ return directions.join(' ') || undefined;
348
+ }
349
+ /**
350
+ * Remove `id` from an element and all its descendants (used when cloning content for an exit
351
+ * animation, to avoid duplicate ids in the document).
352
+ */
353
+ function removeIds(element) {
354
+ element.removeAttribute('id');
355
+ element.querySelectorAll('[id]').forEach((child) => child.removeAttribute('id'));
356
+ }
357
+ function getCenter(rect) {
358
+ return { x: rect.left + rect.width / 2, y: rect.top + rect.height / 2 };
359
+ }
360
+
359
361
  /**
360
362
  * The shared container for the active item's content.
361
363
  */
@@ -366,12 +368,15 @@ class RdxNavigationMenuPopup {
366
368
  this.registration = inject(RDX_FLOATING_REGISTRATION, { optional: true });
367
369
  this.wrapper = inject(RdxPopperContentWrapper, { optional: true });
368
370
  this.elementRef = inject(ElementRef);
369
- this.side = computed(() => this.wrapper?.placedSide(), ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
370
- this.align = computed(() => this.wrapper?.placedAlign(), ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
371
+ this.side = computed(() => this.wrapper?.placedSide(), /* @ts-ignore */
372
+ ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
373
+ this.align = computed(() => this.wrapper?.placedAlign(), /* @ts-ignore */
374
+ ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
371
375
  this.id = computed(() => {
372
376
  const value = this.rootContext.value() ?? this.rootContext.previousValue();
373
377
  return value ? `${this.rootContext.baseId}-popup-${value}` : `${this.rootContext.baseId}-popup`;
374
- }, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
378
+ }, /* @ts-ignore */
379
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
375
380
  /**
376
381
  * Event handler called when the escape key is down. Can be prevented.
377
382
  */
@@ -530,10 +535,10 @@ class RdxNavigationMenuPopup {
530
535
  .filter((item) => !item.hasAttribute('disabled'))
531
536
  .filter((item) => item.getAttribute('aria-hidden') !== 'true');
532
537
  }
533
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuPopup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
534
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxNavigationMenuPopup, isStandalone: true, selector: "[rdxNavigationMenuPopup]", outputs: { escapeKeyDown: "escapeKeyDown", pointerDownOutside: "pointerDownOutside", focusOutside: "focusOutside" }, host: { attributes: { "tabindex": "-1" }, listeners: { "pointerenter": "rootContext.cancelHoverClose()", "pointerleave": "onPointerLeave($event)", "keydown": "onKeydown($event)" }, properties: { "id": "id()", "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-starting-style": "rootContext.transitionStatus() === \"starting\" ? \"\" : undefined", "attr.data-ending-style": "rootContext.transitionStatus() === \"ending\" ? \"\" : undefined", "attr.data-instant": "rootContext.instant() ? \"\" : undefined", "attr.data-state": "rootContext.isOpen() ? \"open\" : \"closed\"", "attr.data-side": "side()", "attr.data-align": "align()", "style.--popup-width.px": "rootContext.size()?.width", "style.--popup-height.px": "rootContext.size()?.height" } }, hostDirectives: [{ directive: i1.RdxPopperContent }], ngImport: i0 }); }
538
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuPopup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
539
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxNavigationMenuPopup, isStandalone: true, selector: "[rdxNavigationMenuPopup]", outputs: { escapeKeyDown: "escapeKeyDown", pointerDownOutside: "pointerDownOutside", focusOutside: "focusOutside" }, host: { attributes: { "tabindex": "-1" }, listeners: { "pointerenter": "rootContext.cancelHoverClose()", "pointerleave": "onPointerLeave($event)", "keydown": "onKeydown($event)" }, properties: { "id": "id()", "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-starting-style": "rootContext.transitionStatus() === \"starting\" ? \"\" : undefined", "attr.data-ending-style": "rootContext.transitionStatus() === \"ending\" ? \"\" : undefined", "attr.data-instant": "rootContext.instant() ? \"\" : undefined", "attr.data-side": "side()", "attr.data-align": "align()", "style.--popup-width.px": "rootContext.size()?.width", "style.--popup-height.px": "rootContext.size()?.height" } }, hostDirectives: [{ directive: i1.RdxPopperContent }], ngImport: i0 }); }
535
540
  }
536
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuPopup, decorators: [{
541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuPopup, decorators: [{
537
542
  type: Directive,
538
543
  args: [{
539
544
  selector: '[rdxNavigationMenuPopup]',
@@ -546,7 +551,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
546
551
  '[attr.data-starting-style]': 'rootContext.transitionStatus() === "starting" ? "" : undefined',
547
552
  '[attr.data-ending-style]': 'rootContext.transitionStatus() === "ending" ? "" : undefined',
548
553
  '[attr.data-instant]': 'rootContext.instant() ? "" : undefined',
549
- '[attr.data-state]': 'rootContext.isOpen() ? "open" : "closed"',
550
554
  '[attr.data-side]': 'side()',
551
555
  '[attr.data-align]': 'align()',
552
556
  '[style.--popup-width.px]': 'rootContext.size()?.width',
@@ -575,12 +579,13 @@ class RdxNavigationMenuPortal {
575
579
  * Keep the portal mounted while the menu is closed.
576
580
  */
577
581
  this.keepMounted = input(false, { ...(ngDevMode ? { debugName: "keepMounted" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
578
- this.present = computed(() => this.rootContext.present() || this.keepMounted(), ...(ngDevMode ? [{ debugName: "present" }] : /* istanbul ignore next */ []));
582
+ this.present = computed(() => this.rootContext.present() || this.keepMounted(), /* @ts-ignore */
583
+ ...(ngDevMode ? [{ debugName: "present" }] : /* istanbul ignore next */ []));
579
584
  }
580
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuPortal, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
581
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxNavigationMenuPortal, isStandalone: true, selector: "ng-template[rdxNavigationMenuPortal]", inputs: { keepMounted: { classPropertyName: "keepMounted", publicName: "keepMounted", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideRdxPresenceContext(() => ({ present: inject(RdxNavigationMenuPortal).present }))], exportAs: ["rdxNavigationMenuPortal"], hostDirectives: [{ directive: i1$2.RdxPortalPresence, inputs: ["container", "container"] }], ngImport: i0 }); }
585
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuPortal, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
586
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxNavigationMenuPortal, isStandalone: true, selector: "ng-template[rdxNavigationMenuPortal]", inputs: { keepMounted: { classPropertyName: "keepMounted", publicName: "keepMounted", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideRdxPresenceContext(() => ({ present: inject(RdxNavigationMenuPortal).present }))], exportAs: ["rdxNavigationMenuPortal"], hostDirectives: [{ directive: i1$2.RdxPortalPresence, inputs: ["container", "container"] }], ngImport: i0 }); }
582
587
  }
583
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuPortal, decorators: [{
588
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuPortal, decorators: [{
584
589
  type: Directive,
585
590
  args: [{
586
591
  selector: 'ng-template[rdxNavigationMenuPortal]',
@@ -602,10 +607,10 @@ class RdxNavigationMenuPortalMisuseGuard {
602
607
  '`<ng-template rdxNavigationMenuPortal>`. rdxNavigationMenuPortalPresence has been removed.', 'components/navigation-menu');
603
608
  }
604
609
  }
605
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuPortalMisuseGuard, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
606
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxNavigationMenuPortalMisuseGuard, isStandalone: true, selector: "[rdxNavigationMenuPortal]:not(ng-template)", ngImport: i0 }); }
610
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuPortalMisuseGuard, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
611
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxNavigationMenuPortalMisuseGuard, isStandalone: true, selector: "[rdxNavigationMenuPortal]:not(ng-template)", ngImport: i0 }); }
607
612
  }
608
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuPortalMisuseGuard, decorators: [{
613
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuPortalMisuseGuard, decorators: [{
609
614
  type: Directive,
610
615
  args: [{
611
616
  selector: '[rdxNavigationMenuPortal]:not(ng-template)'
@@ -625,8 +630,10 @@ class RdxNavigationMenuPositioner extends RdxPopperContentWrapper {
625
630
  super();
626
631
  this.rootContext = injectNavigationMenuRootContext();
627
632
  this.containerRef = inject(ElementRef);
628
- this.triggerEl = signal(null, ...(ngDevMode ? [{ debugName: "triggerEl" }] : /* istanbul ignore next */ []));
629
- this.containerEl = signal(this.containerRef.nativeElement, ...(ngDevMode ? [{ debugName: "containerEl" }] : /* istanbul ignore next */ []));
633
+ this.triggerEl = signal(null, /* @ts-ignore */
634
+ ...(ngDevMode ? [{ debugName: "triggerEl" }] : /* istanbul ignore next */ []));
635
+ this.containerEl = signal(this.containerRef.nativeElement, /* @ts-ignore */
636
+ ...(ngDevMode ? [{ debugName: "containerEl" }] : /* istanbul ignore next */ []));
630
637
  this.graceArea = useGraceArea(this.triggerEl, this.containerEl);
631
638
  const destroyRef = inject(DestroyRef);
632
639
  effect(() => this.triggerEl.set(this.rootContext.trigger() ?? null));
@@ -648,13 +655,13 @@ class RdxNavigationMenuPositioner extends RdxPopperContentWrapper {
648
655
  // leaves the grace area between them.
649
656
  this.graceArea.onPointerExit(() => this.rootContext.closeOnHover());
650
657
  }
651
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuPositioner, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
652
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxNavigationMenuPositioner, isStandalone: true, selector: "[rdxNavigationMenuPositioner]", host: { properties: { "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-instant": "rootContext.instant() ? \"\" : undefined", "style.--positioner-width.px": "rootContext.size()?.width", "style.--positioner-height.px": "rootContext.size()?.height" } }, providers: [
658
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuPositioner, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
659
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxNavigationMenuPositioner, isStandalone: true, selector: "[rdxNavigationMenuPositioner]", host: { properties: { "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-instant": "rootContext.instant() ? \"\" : undefined", "style.--positioner-width.px": "rootContext.size()?.width", "style.--positioner-height.px": "rootContext.size()?.height" } }, providers: [
653
660
  ...provideRdxPopperContentWrapper(RdxNavigationMenuPositioner),
654
661
  provideRdxPopperContentConfig({ arrowPadding: 5, collisionPadding: 5, updatePositionStrategy: 'always' })
655
662
  ], usesInheritance: true, ngImport: i0 }); }
656
663
  }
657
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuPositioner, decorators: [{
664
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuPositioner, decorators: [{
658
665
  type: Directive,
659
666
  args: [{
660
667
  selector: '[rdxNavigationMenuPositioner]',
@@ -693,19 +700,22 @@ class RdxNavigationMenuRoot {
693
700
  });
694
701
  /** Whether this root is nested inside another navigation menu's content. */
695
702
  this.nested = !!this.parentRoot;
696
- this.baseId = `rdx-nav-menu-${generateId()}`;
703
+ this.baseId = injectId('rdx-nav-menu-');
697
704
  /**
698
705
  * The value of the navigation menu item that should be currently open.
699
706
  */
700
- this.value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
707
+ this.value = model(null, /* @ts-ignore */
708
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
701
709
  /**
702
710
  * The uncontrolled value of the item that should be initially open.
703
711
  */
704
- this.defaultValue = input(null, ...(ngDevMode ? [{ debugName: "defaultValue" }] : /* istanbul ignore next */ []));
712
+ this.defaultValue = input(null, /* @ts-ignore */
713
+ ...(ngDevMode ? [{ debugName: "defaultValue" }] : /* istanbul ignore next */ []));
705
714
  /**
706
715
  * The orientation of the navigation menu.
707
716
  */
708
- this.orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
717
+ this.orientation = input('horizontal', /* @ts-ignore */
718
+ ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
709
719
  /**
710
720
  * The reading direction of the navigation menu.
711
721
  */
@@ -736,22 +746,34 @@ class RdxNavigationMenuRoot {
736
746
  this.instant.set(false);
737
747
  this.onOpenChangeComplete.emit(open);
738
748
  });
739
- this.instant = signal(false, ...(ngDevMode ? [{ debugName: "instant" }] : /* istanbul ignore next */ []));
749
+ this.instant = signal(false, /* @ts-ignore */
750
+ ...(ngDevMode ? [{ debugName: "instant" }] : /* istanbul ignore next */ []));
740
751
  this.transitionStatus = this.transition.status;
741
- this.previousValue = signal(null, ...(ngDevMode ? [{ debugName: "previousValue" }] : /* istanbul ignore next */ []));
742
- this.isOpen = computed(() => this.value() !== null, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
743
- this.preventUnmountOnClose = signal(false, ...(ngDevMode ? [{ debugName: "preventUnmountOnClose" }] : /* istanbul ignore next */ []));
744
- this.present = computed(() => this.isOpen() || this.preventUnmountOnClose(), ...(ngDevMode ? [{ debugName: "present" }] : /* istanbul ignore next */ []));
745
- this.trigger = signal(undefined, ...(ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []));
746
- this.triggers = signal([], ...(ngDevMode ? [{ debugName: "triggers" }] : /* istanbul ignore next */ []));
747
- this.list = signal(undefined, ...(ngDevMode ? [{ debugName: "list" }] : /* istanbul ignore next */ []));
748
- this.contents = signal(new Map(), ...(ngDevMode ? [{ debugName: "contents" }] : /* istanbul ignore next */ []));
749
- this.popup = signal(undefined, ...(ngDevMode ? [{ debugName: "popup" }] : /* istanbul ignore next */ []));
750
- this.size = signal(null, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
752
+ this.previousValue = signal(null, /* @ts-ignore */
753
+ ...(ngDevMode ? [{ debugName: "previousValue" }] : /* istanbul ignore next */ []));
754
+ this.isOpen = computed(() => this.value() !== null, /* @ts-ignore */
755
+ ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
756
+ this.preventUnmountOnClose = signal(false, /* @ts-ignore */
757
+ ...(ngDevMode ? [{ debugName: "preventUnmountOnClose" }] : /* istanbul ignore next */ []));
758
+ this.present = computed(() => this.isOpen() || this.preventUnmountOnClose(), /* @ts-ignore */
759
+ ...(ngDevMode ? [{ debugName: "present" }] : /* istanbul ignore next */ []));
760
+ this.trigger = signal(undefined, /* @ts-ignore */
761
+ ...(ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []));
762
+ this.triggers = signal([], /* @ts-ignore */
763
+ ...(ngDevMode ? [{ debugName: "triggers" }] : /* istanbul ignore next */ []));
764
+ this.list = signal(undefined, /* @ts-ignore */
765
+ ...(ngDevMode ? [{ debugName: "list" }] : /* istanbul ignore next */ []));
766
+ this.contents = signal(new Map(), /* @ts-ignore */
767
+ ...(ngDevMode ? [{ debugName: "contents" }] : /* istanbul ignore next */ []));
768
+ this.popup = signal(undefined, /* @ts-ignore */
769
+ ...(ngDevMode ? [{ debugName: "popup" }] : /* istanbul ignore next */ []));
770
+ this.size = signal(null, /* @ts-ignore */
771
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
751
772
  this.activeContent = computed(() => {
752
773
  const value = this.value() ?? this.previousValue();
753
774
  return value ? this.contents().get(value) : undefined;
754
- }, ...(ngDevMode ? [{ debugName: "activeContent" }] : /* istanbul ignore next */ []));
775
+ }, /* @ts-ignore */
776
+ ...(ngDevMode ? [{ debugName: "activeContent" }] : /* istanbul ignore next */ []));
755
777
  this.registeredTriggers = new Map();
756
778
  this.viewportTriggerChange = new Set();
757
779
  let previousOpen = this.isOpen();
@@ -814,7 +836,7 @@ class RdxNavigationMenuRoot {
814
836
  this.preventUnmountOnClose.set(value === null ? change.shouldPreventUnmountOnClose() : false);
815
837
  this.value.set(value);
816
838
  this.onValueChange.emit(value);
817
- if (this.nested && value === null && reason === 'link-select') {
839
+ if (this.nested && value === null && reason === 'link-press') {
818
840
  this.parentRoot?.close(reason, event);
819
841
  }
820
842
  }
@@ -984,8 +1006,8 @@ class RdxNavigationMenuRoot {
984
1006
  return !!floating && floating.contains(target);
985
1007
  });
986
1008
  }
987
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
988
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxNavigationMenuRoot, isStandalone: true, selector: "[rdxNavigationMenuRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, dirInput: { classPropertyName: "dirInput", publicName: "dir", 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 } }, outputs: { value: "valueChange", onValueChange: "onValueChange", onOpenChange: "onOpenChange", onOpenChangeComplete: "onOpenChangeComplete" }, host: { properties: { "attr.data-orientation": "orientation()", "attr.data-nested": "nested ? \"\" : undefined", "attr.dir": "dir()" } }, providers: [
1009
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1010
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxNavigationMenuRoot, isStandalone: true, selector: "[rdxNavigationMenuRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, dirInput: { classPropertyName: "dirInput", publicName: "dir", 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 } }, outputs: { value: "valueChange", onValueChange: "onValueChange", onOpenChange: "onOpenChange", onOpenChangeComplete: "onOpenChangeComplete" }, host: { properties: { "attr.data-orientation": "orientation()", "attr.data-nested": "nested ? \"\" : undefined", "attr.dir": "dir()" } }, providers: [
989
1011
  provideNavigationMenuRootContext(context),
990
1012
  // Base UI wraps every NavigationMenu.Root in a FloatingNode and only creates FloatingTree at the
991
1013
  // top boundary. `provideFloatingTree()` is inherit-or-create, so nested navigation menus join the
@@ -996,7 +1018,7 @@ class RdxNavigationMenuRoot {
996
1018
  provideFloatingRootContext(() => inject(RdxNavigationMenuRoot).floatingContext)
997
1019
  ], exportAs: ["rdxNavigationMenuRoot"], hostDirectives: [{ directive: i1.RdxPopper }, { directive: i2.RdxFloatingNodeRegistration }], ngImport: i0 }); }
998
1020
  }
999
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuRoot, decorators: [{
1021
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuRoot, decorators: [{
1000
1022
  type: Directive,
1001
1023
  args: [{
1002
1024
  selector: '[rdxNavigationMenuRoot]',
@@ -1090,7 +1112,11 @@ class RdxNavigationMenuTrigger {
1090
1112
  * Whether the content should also open when the trigger is hovered.
1091
1113
  */
1092
1114
  this.openOnHover = input(true, { ...(ngDevMode ? { debugName: "openOnHover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1093
- this.open = computed(() => this.item.isOpen(), ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
1115
+ /** Whether the trigger is currently pressed (pointer down), for Base UI's `data-pressed`. */
1116
+ this.pressed = signal(false, /* @ts-ignore */
1117
+ ...(ngDevMode ? [{ debugName: "pressed" }] : /* istanbul ignore next */ []));
1118
+ this.open = computed(() => this.item.isOpen(), /* @ts-ignore */
1119
+ ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
1094
1120
  // Host element is available in the constructor; the trigger ref does not depend on inputs.
1095
1121
  this.item.triggerRef.set(this.elementRef.nativeElement);
1096
1122
  effect((onCleanup) => {
@@ -1115,6 +1141,7 @@ class RdxNavigationMenuTrigger {
1115
1141
  this.rootContext.openOnHover(this.item.value(), this.elementRef.nativeElement, event);
1116
1142
  }
1117
1143
  onPointerLeave(event) {
1144
+ this.pressed.set(false);
1118
1145
  if (event.pointerType === 'touch' || !this.openOnHover()) {
1119
1146
  return;
1120
1147
  }
@@ -1174,10 +1201,10 @@ class RdxNavigationMenuTrigger {
1174
1201
  };
1175
1202
  requestAnimationFrame(tryFocus);
1176
1203
  }
1177
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1178
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxNavigationMenuTrigger, isStandalone: true, selector: "button[rdxNavigationMenuTrigger]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, openOnHover: { classPropertyName: "openOnHover", publicName: "openOnHover", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "onClick($event)", "pointerenter": "onPointerEnter($event)", "pointerleave": "onPointerLeave($event)", "keydown": "onKeydown($event)" }, properties: { "id": "item.triggerId()", "attr.aria-controls": "open() ? rootContext.popup()?.id : undefined", "attr.aria-expanded": "open()", "attr.data-state": "open() ? \"open\" : \"closed\"", "attr.data-popup-open": "open() ? \"\" : undefined", "attr.data-disabled": "disabled() ? \"\" : undefined", "attr.disabled": "disabled() ? \"\" : undefined" } }, hostDirectives: [{ directive: i1$1.RdxCompositeItem }], ngImport: i0 }); }
1204
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1205
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxNavigationMenuTrigger, isStandalone: true, selector: "button[rdxNavigationMenuTrigger]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, openOnHover: { classPropertyName: "openOnHover", publicName: "openOnHover", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "onClick($event)", "pointerdown": "pressed.set(true)", "pointerup": "pressed.set(false)", "pointercancel": "pressed.set(false)", "pointerenter": "onPointerEnter($event)", "pointerleave": "onPointerLeave($event)", "keydown": "onKeydown($event)" }, properties: { "id": "item.triggerId()", "attr.aria-controls": "open() ? rootContext.popup()?.id : undefined", "attr.aria-expanded": "open()", "attr.data-popup-open": "open() ? \"\" : undefined", "attr.data-pressed": "pressed() ? \"\" : undefined", "attr.data-disabled": "disabled() ? \"\" : undefined", "attr.aria-disabled": "disabled() ? \"true\" : undefined" } }, hostDirectives: [{ directive: i1$1.RdxCompositeItem }], ngImport: i0 }); }
1179
1206
  }
1180
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuTrigger, decorators: [{
1207
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuTrigger, decorators: [{
1181
1208
  type: Directive,
1182
1209
  args: [{
1183
1210
  selector: 'button[rdxNavigationMenuTrigger]',
@@ -1187,11 +1214,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
1187
1214
  '[id]': 'item.triggerId()',
1188
1215
  '[attr.aria-controls]': 'open() ? rootContext.popup()?.id : undefined',
1189
1216
  '[attr.aria-expanded]': 'open()',
1190
- '[attr.data-state]': 'open() ? "open" : "closed"',
1191
1217
  '[attr.data-popup-open]': 'open() ? "" : undefined',
1218
+ '[attr.data-pressed]': 'pressed() ? "" : undefined',
1192
1219
  '[attr.data-disabled]': 'disabled() ? "" : undefined',
1193
- '[attr.disabled]': 'disabled() ? "" : undefined',
1220
+ // Base UI keeps a disabled nav-menu trigger focusable (`focusableWhenDisabled`): it uses
1221
+ // `aria-disabled` (not the native `disabled` attribute) so the trigger stays in the tab order,
1222
+ // while the click / keydown handlers below already no-op when disabled.
1223
+ '[attr.aria-disabled]': 'disabled() ? "true" : undefined',
1194
1224
  '(click)': 'onClick($event)',
1225
+ '(pointerdown)': 'pressed.set(true)',
1226
+ '(pointerup)': 'pressed.set(false)',
1227
+ '(pointercancel)': 'pressed.set(false)',
1195
1228
  '(pointerenter)': 'onPointerEnter($event)',
1196
1229
  '(pointerleave)': 'onPointerLeave($event)',
1197
1230
  '(keydown)': 'onKeydown($event)'
@@ -1214,17 +1247,22 @@ class RdxNavigationMenuViewport {
1214
1247
  * Keep the viewport mounted even when the menu is closed.
1215
1248
  */
1216
1249
  this.forceMount = input(false, { ...(ngDevMode ? { debugName: "forceMount" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1217
- this.activationDirection = signal(undefined, ...(ngDevMode ? [{ debugName: "activationDirection" }] : /* istanbul ignore next */ []));
1218
- this.transitioning = signal(false, ...(ngDevMode ? [{ debugName: "transitioning" }] : /* istanbul ignore next */ []));
1219
- this.size = signal(null, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1250
+ this.activationDirection = signal(undefined, /* @ts-ignore */
1251
+ ...(ngDevMode ? [{ debugName: "activationDirection" }] : /* istanbul ignore next */ []));
1252
+ this.transitioning = signal(false, /* @ts-ignore */
1253
+ ...(ngDevMode ? [{ debugName: "transitioning" }] : /* istanbul ignore next */ []));
1254
+ this.size = signal(null, /* @ts-ignore */
1255
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1220
1256
  this.current = null;
1221
1257
  this.rendered = new Map();
1222
1258
  this.previousElement = null;
1223
1259
  this.resizeObserver = typeof ResizeObserver !== 'undefined' ? new ResizeObserver(() => this.measure()) : null;
1224
1260
  this.activeContent = computed(() => this.rootContext.isOpen() || this.rootContext.transitionStatus() === 'ending'
1225
1261
  ? this.rootContext.activeContent()
1226
- : undefined, ...(ngDevMode ? [{ debugName: "activeContent" }] : /* istanbul ignore next */ []));
1227
- this.contents = computed(() => this.rootContext.contents(), ...(ngDevMode ? [{ debugName: "contents" }] : /* istanbul ignore next */ []));
1262
+ : undefined, /* @ts-ignore */
1263
+ ...(ngDevMode ? [{ debugName: "activeContent" }] : /* istanbul ignore next */ []));
1264
+ this.contents = computed(() => this.rootContext.contents(), /* @ts-ignore */
1265
+ ...(ngDevMode ? [{ debugName: "contents" }] : /* istanbul ignore next */ []));
1228
1266
  const unregister = this.rootContext.registerViewport((previous, next) => {
1229
1267
  this.pendingDirection = getActivationDirection(previous, next);
1230
1268
  });
@@ -1383,17 +1421,16 @@ class RdxNavigationMenuViewport {
1383
1421
  this.rootContext.setSize(nextSize);
1384
1422
  }
1385
1423
  }
1386
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuViewport, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1387
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxNavigationMenuViewport, isStandalone: true, selector: "[rdxNavigationMenuViewport]", inputs: { forceMount: { classPropertyName: "forceMount", publicName: "forceMount", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-state": "rootContext.isOpen() ? \"open\" : \"closed\"", "attr.data-orientation": "rootContext.orientation()", "attr.data-activation-direction": "activationDirection()", "attr.data-transitioning": "transitioning() ? \"\" : undefined" } }, ngImport: i0 }); }
1424
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuViewport, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1425
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxNavigationMenuViewport, isStandalone: true, selector: "[rdxNavigationMenuViewport]", inputs: { forceMount: { classPropertyName: "forceMount", publicName: "forceMount", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-orientation": "rootContext.orientation()", "attr.data-activation-direction": "activationDirection()", "attr.data-transitioning": "transitioning() ? \"\" : undefined" } }, ngImport: i0 }); }
1388
1426
  }
1389
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuViewport, decorators: [{
1427
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuViewport, decorators: [{
1390
1428
  type: Directive,
1391
1429
  args: [{
1392
1430
  selector: '[rdxNavigationMenuViewport]',
1393
1431
  host: {
1394
1432
  '[attr.data-open]': 'rootContext.isOpen() ? "" : undefined',
1395
1433
  '[attr.data-closed]': 'rootContext.isOpen() ? undefined : ""',
1396
- '[attr.data-state]': 'rootContext.isOpen() ? "open" : "closed"',
1397
1434
  '[attr.data-orientation]': 'rootContext.orientation()',
1398
1435
  '[attr.data-activation-direction]': 'activationDirection()',
1399
1436
  '[attr.data-transitioning]': 'transitioning() ? "" : undefined'
@@ -1418,8 +1455,8 @@ const navigationMenuImports = [
1418
1455
  RdxNavigationMenuViewport
1419
1456
  ];
1420
1457
  class RdxNavigationMenuModule {
1421
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1422
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuModule, imports: [RdxNavigationMenuRoot,
1458
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1459
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuModule, imports: [RdxNavigationMenuRoot,
1423
1460
  RdxNavigationMenuList,
1424
1461
  RdxNavigationMenuItem,
1425
1462
  RdxNavigationMenuTrigger,
@@ -1446,9 +1483,9 @@ class RdxNavigationMenuModule {
1446
1483
  RdxNavigationMenuPopup,
1447
1484
  RdxNavigationMenuArrow,
1448
1485
  RdxNavigationMenuViewport] }); }
1449
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuModule }); }
1486
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuModule }); }
1450
1487
  }
1451
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxNavigationMenuModule, decorators: [{
1488
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxNavigationMenuModule, decorators: [{
1452
1489
  type: NgModule,
1453
1490
  args: [{
1454
1491
  imports: [...navigationMenuImports],