@radix-ng/primitives 1.0.5 → 1.0.6

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 (123) hide show
  1. package/fesm2022/radix-ng-primitives-accordion.mjs +35 -27
  2. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  3. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +34 -34
  4. package/fesm2022/radix-ng-primitives-arrow.mjs +3 -3
  5. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +5 -4
  6. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
  7. package/fesm2022/radix-ng-primitives-autocomplete.mjs +175 -125
  8. package/fesm2022/radix-ng-primitives-autocomplete.mjs.map +1 -1
  9. package/fesm2022/radix-ng-primitives-avatar.mjs +25 -19
  10. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  11. package/fesm2022/radix-ng-primitives-button.mjs +11 -7
  12. package/fesm2022/radix-ng-primitives-button.mjs.map +1 -1
  13. package/fesm2022/radix-ng-primitives-calendar.mjs +140 -90
  14. package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
  15. package/fesm2022/radix-ng-primitives-checkbox.mjs +61 -40
  16. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  17. package/fesm2022/radix-ng-primitives-collapsible.mjs +35 -24
  18. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
  19. package/fesm2022/radix-ng-primitives-combobox.mjs +278 -177
  20. package/fesm2022/radix-ng-primitives-combobox.mjs.map +1 -1
  21. package/fesm2022/radix-ng-primitives-composite.mjs +50 -33
  22. package/fesm2022/radix-ng-primitives-composite.mjs.map +1 -1
  23. package/fesm2022/radix-ng-primitives-config.mjs +7 -5
  24. package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
  25. package/fesm2022/radix-ng-primitives-context-menu.mjs +48 -22
  26. package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
  27. package/fesm2022/radix-ng-primitives-core.mjs +44 -28
  28. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  29. package/fesm2022/radix-ng-primitives-cropper.mjs +73 -45
  30. package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
  31. package/fesm2022/radix-ng-primitives-date-field.mjs +70 -40
  32. package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
  33. package/fesm2022/radix-ng-primitives-dialog.mjs +93 -67
  34. package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
  35. package/fesm2022/radix-ng-primitives-direction-provider.mjs +5 -4
  36. package/fesm2022/radix-ng-primitives-direction-provider.mjs.map +1 -1
  37. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +20 -16
  38. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
  39. package/fesm2022/radix-ng-primitives-drawer.mjs +107 -81
  40. package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -1
  41. package/fesm2022/radix-ng-primitives-editable.mjs +53 -39
  42. package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
  43. package/fesm2022/radix-ng-primitives-field.mjs +69 -42
  44. package/fesm2022/radix-ng-primitives-field.mjs.map +1 -1
  45. package/fesm2022/radix-ng-primitives-fieldset.mjs +8 -7
  46. package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -1
  47. package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs +77 -40
  48. package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs.map +1 -1
  49. package/fesm2022/radix-ng-primitives-focus-guards.mjs +3 -3
  50. package/fesm2022/radix-ng-primitives-focus-scope.mjs +7 -5
  51. package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
  52. package/fesm2022/radix-ng-primitives-form.mjs +25 -16
  53. package/fesm2022/radix-ng-primitives-form.mjs.map +1 -1
  54. package/fesm2022/radix-ng-primitives-input.mjs +41 -22
  55. package/fesm2022/radix-ng-primitives-input.mjs.map +1 -1
  56. package/fesm2022/radix-ng-primitives-label.mjs +7 -5
  57. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  58. package/fesm2022/radix-ng-primitives-menu.mjs +274 -154
  59. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  60. package/fesm2022/radix-ng-primitives-menubar.mjs +35 -17
  61. package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
  62. package/fesm2022/radix-ng-primitives-meter.mjs +41 -30
  63. package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -1
  64. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +220 -183
  65. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  66. package/fesm2022/radix-ng-primitives-number-field.mjs +87 -59
  67. package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
  68. package/fesm2022/radix-ng-primitives-pagination.mjs +48 -38
  69. package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
  70. package/fesm2022/radix-ng-primitives-popover.mjs +150 -107
  71. package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
  72. package/fesm2022/radix-ng-primitives-popper.mjs +79 -47
  73. package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
  74. package/fesm2022/radix-ng-primitives-portal.mjs +20 -13
  75. package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
  76. package/fesm2022/radix-ng-primitives-presence.mjs +3 -3
  77. package/fesm2022/radix-ng-primitives-preview-card.mjs +119 -74
  78. package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -1
  79. package/fesm2022/radix-ng-primitives-progress.mjs +43 -31
  80. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  81. package/fesm2022/radix-ng-primitives-radio.mjs +58 -35
  82. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  83. package/fesm2022/radix-ng-primitives-scroll-area.mjs +54 -38
  84. package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
  85. package/fesm2022/radix-ng-primitives-select.mjs +595 -102
  86. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  87. package/fesm2022/radix-ng-primitives-separator.mjs +7 -5
  88. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  89. package/fesm2022/radix-ng-primitives-slider.mjs +101 -63
  90. package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
  91. package/fesm2022/radix-ng-primitives-stepper.mjs +53 -39
  92. package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
  93. package/fesm2022/radix-ng-primitives-switch.mjs +23 -18
  94. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  95. package/fesm2022/radix-ng-primitives-tabs.mjs +72 -47
  96. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  97. package/fesm2022/radix-ng-primitives-time-field.mjs +72 -41
  98. package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
  99. package/fesm2022/radix-ng-primitives-toast.mjs +75 -56
  100. package/fesm2022/radix-ng-primitives-toast.mjs.map +1 -1
  101. package/fesm2022/radix-ng-primitives-toggle-group.mjs +29 -19
  102. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  103. package/fesm2022/radix-ng-primitives-toggle.mjs +16 -11
  104. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  105. package/fesm2022/radix-ng-primitives-toolbar.mjs +38 -30
  106. package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
  107. package/fesm2022/radix-ng-primitives-tooltip.mjs +118 -63
  108. package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
  109. package/fesm2022/radix-ng-primitives-visually-hidden.mjs +31 -20
  110. package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
  111. package/package.json +2 -2
  112. package/types/radix-ng-primitives-autocomplete.d.ts +3 -1
  113. package/types/radix-ng-primitives-combobox.d.ts +28 -9
  114. package/types/radix-ng-primitives-context-menu.d.ts +2 -0
  115. package/types/radix-ng-primitives-dialog.d.ts +6 -3
  116. package/types/radix-ng-primitives-floating-focus-manager.d.ts +11 -0
  117. package/types/radix-ng-primitives-menu.d.ts +47 -15
  118. package/types/radix-ng-primitives-menubar.d.ts +6 -1
  119. package/types/radix-ng-primitives-navigation-menu.d.ts +8 -6
  120. package/types/radix-ng-primitives-popover.d.ts +12 -4
  121. package/types/radix-ng-primitives-preview-card.d.ts +18 -5
  122. package/types/radix-ng-primitives-select.d.ts +186 -391
  123. package/types/radix-ng-primitives-tooltip.d.ts +17 -3
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Directive, ElementRef, input, booleanAttribute, numberAttribute, DestroyRef, NgModule } from '@angular/core';
2
+ import { inject, Directive, ElementRef, input, booleanAttribute, numberAttribute, signal, DestroyRef, NgModule } from '@angular/core';
3
3
  import { createContext } from '@radix-ng/primitives/core';
4
4
  import * as i1 from '@radix-ng/primitives/menu';
5
5
  import { RdxMenuRoot } from '@radix-ng/primitives/menu';
@@ -43,16 +43,20 @@ class RdxContextMenuRoot {
43
43
  if (this.menuRoot.disabled()) {
44
44
  return;
45
45
  }
46
+ // A touch long-press gets a small 10×10 anchor box (Base UI) so the popup is offset from the
47
+ // finger; a mouse/keyboard open uses a 0×0 point at the cursor. (`PointerEvent` is not a global in
48
+ // jsdom, so duck-type the pointer type instead of `instanceof`.)
49
+ const size = event && 'pointerType' in event && event.pointerType === 'touch' ? 10 : 0;
46
50
  const anchor = {
47
51
  getBoundingClientRect: () => ({
48
- width: 0,
49
- height: 0,
52
+ width: size,
53
+ height: size,
50
54
  x: clientX,
51
55
  y: clientY,
52
56
  top: clientY,
53
57
  left: clientX,
54
- right: clientX,
55
- bottom: clientY,
58
+ right: clientX + size,
59
+ bottom: clientY + size,
56
60
  toJSON: () => ({})
57
61
  })
58
62
  };
@@ -60,10 +64,10 @@ class RdxContextMenuRoot {
60
64
  // Move focus into the popup so keyboard navigation and outside-dismiss work immediately.
61
65
  this.menuRoot.show(autoFocus, 'trigger-press', event);
62
66
  }
63
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
64
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxContextMenuRoot, isStandalone: true, selector: "[rdxContextMenuRoot]", providers: [provideRdxContextMenuRootContext(contextFactory)], exportAs: ["rdxContextMenuRoot"], hostDirectives: [{ directive: i1.RdxMenuRoot, inputs: ["open", "open", "modal", "modal", "loopFocus", "loopFocus", "highlightItemOnHover", "highlightItemOnHover"], outputs: ["openChange", "openChange", "onOpenChange", "onOpenChange", "onOpenChangeComplete", "onOpenChangeComplete"] }], ngImport: i0 }); }
67
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxContextMenuRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
68
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxContextMenuRoot, isStandalone: true, selector: "[rdxContextMenuRoot]", providers: [provideRdxContextMenuRootContext(contextFactory)], exportAs: ["rdxContextMenuRoot"], hostDirectives: [{ directive: i1.RdxMenuRoot, inputs: ["open", "open", "modal", "modal", "loopFocus", "loopFocus", "highlightItemOnHover", "highlightItemOnHover"], outputs: ["openChange", "openChange", "onOpenChange", "onOpenChange", "onOpenChangeComplete", "onOpenChangeComplete"] }], ngImport: i0 }); }
65
69
  }
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuRoot, decorators: [{
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxContextMenuRoot, decorators: [{
67
71
  type: Directive,
68
72
  args: [{
69
73
  selector: '[rdxContextMenuRoot]',
@@ -94,6 +98,9 @@ class RdxContextMenuTrigger {
94
98
  this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
95
99
  /** How long (ms) a touch must be held before the menu opens. */
96
100
  this.longPressDelay = input(500, { ...(ngDevMode ? { debugName: "longPressDelay" } : /* istanbul ignore next */ {}), transform: numberAttribute });
101
+ /** Whether the trigger is mid-press (Base UI `data-pressed`). */
102
+ this.pressed = signal(false, /* @ts-ignore */
103
+ ...(ngDevMode ? [{ debugName: "pressed" }] : /* istanbul ignore next */ []));
97
104
  this.lastPointerDownTime = 0;
98
105
  this.allowMouseUp = false;
99
106
  this.handleDocumentMouseUp = (event) => {
@@ -109,7 +116,22 @@ class RdxContextMenuTrigger {
109
116
  }
110
117
  this.rootContext.close('cancel-open', event);
111
118
  };
119
+ const ownerDocument = this.elementRef.nativeElement.ownerDocument;
120
+ // While the menu is open, a second right-click over the trigger or the popup must not surface the
121
+ // native browser context menu (Base UI registers the same document-level suppressor).
122
+ const suppressNativeContextMenu = (event) => {
123
+ if (!this.rootContext.isOpen()) {
124
+ return;
125
+ }
126
+ const target = event.target;
127
+ const popup = this.menuRoot.popupElement();
128
+ if (target && (this.elementRef.nativeElement.contains(target) || popup?.contains(target))) {
129
+ event.preventDefault();
130
+ }
131
+ };
132
+ ownerDocument.addEventListener('contextmenu', suppressNativeContextMenu);
112
133
  inject(DestroyRef).onDestroy(() => {
134
+ ownerDocument.removeEventListener('contextmenu', suppressNativeContextMenu);
113
135
  this.cancelLongPress();
114
136
  this.clearContextMenuMouseUpGuard();
115
137
  });
@@ -121,17 +143,19 @@ class RdxContextMenuTrigger {
121
143
  // Suppress the native context menu and open ours at the pointer.
122
144
  event.preventDefault();
123
145
  this.cancelLongPress();
124
- // A keyboard-initiated context menu (e.g. the Menu key / Shift+F10) is not preceded by a
125
- // pointerdown, so it opens with the first item highlighted; a pointer opens the popup
126
- // without highlighting an item.
146
+ this.pressed.set(true);
147
+ // A keyboard-initiated context menu (the Menu key / Shift+F10) is not preceded by a pointerdown,
148
+ // so it opens with the first item highlighted; a pointer opens the popup without highlighting.
127
149
  const fromKeyboard = event.timeStamp - this.lastPointerDownTime > 300;
128
150
  // A right-click `contextmenu` event has no `pointerType`, so this records a non-touch open.
129
151
  this.rootContext.openAt(event.clientX, event.clientY, fromKeyboard ? 'first' : 'popup', event);
130
- this.armContextMenuMouseUpGuard(event.currentTarget);
152
+ this.armContextMenuMouseUpGuard(this.elementRef.nativeElement);
131
153
  }
132
154
  onPointerDown(event) {
133
155
  this.lastPointerDownTime = event.timeStamp;
134
- if (this.disabled() || event.pointerType !== 'touch') {
156
+ this.pressed.set(true);
157
+ // Ignore non-primary pointers (a second finger in a multi-touch gesture must not arm long-press).
158
+ if (this.disabled() || event.pointerType !== 'touch' || event.isPrimary === false) {
135
159
  return;
136
160
  }
137
161
  const { clientX, clientY } = event;
@@ -155,6 +179,7 @@ class RdxContextMenuTrigger {
155
179
  }
156
180
  }
157
181
  cancelLongPress() {
182
+ this.pressed.set(false);
158
183
  clearTimeout(this.longPressTimer);
159
184
  this.longPressTimer = undefined;
160
185
  this.longPressOrigin = undefined;
@@ -171,18 +196,19 @@ class RdxContextMenuTrigger {
171
196
  clearContextMenuMouseUpGuard() {
172
197
  clearTimeout(this.allowMouseUpTimer);
173
198
  this.allowMouseUpTimer = undefined;
174
- this.elementRef?.nativeElement?.ownerDocument?.removeEventListener('mouseup', this.handleDocumentMouseUp);
199
+ this.elementRef.nativeElement.ownerDocument.removeEventListener('mouseup', this.handleDocumentMouseUp);
175
200
  }
176
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
177
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxContextMenuTrigger, isStandalone: true, selector: "[rdxContextMenuTrigger]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, longPressDelay: { classPropertyName: "longPressDelay", publicName: "longPressDelay", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "contextmenu": "onContextMenu($event)", "pointerdown": "onPointerDown($event)", "pointermove": "onPointerMove($event)", "pointerup": "cancelLongPress()", "pointercancel": "cancelLongPress()", "pointerleave": "cancelLongPress()" }, properties: { "attr.data-state": "rootContext.isOpen() ? \"open\" : \"closed\"", "attr.data-disabled": "disabled() ? \"\" : undefined" } }, exportAs: ["rdxContextMenuTrigger"], ngImport: i0 }); }
201
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxContextMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
202
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxContextMenuTrigger, isStandalone: true, selector: "[rdxContextMenuTrigger]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, longPressDelay: { classPropertyName: "longPressDelay", publicName: "longPressDelay", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "contextmenu": "onContextMenu($event)", "pointerdown": "onPointerDown($event)", "pointermove": "onPointerMove($event)", "pointerup": "cancelLongPress()", "pointercancel": "cancelLongPress()", "pointerleave": "cancelLongPress()" }, properties: { "attr.data-popup-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-pressed": "pressed() ? \"\" : undefined", "attr.data-disabled": "disabled() ? \"\" : undefined" } }, exportAs: ["rdxContextMenuTrigger"], ngImport: i0 }); }
178
203
  }
179
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuTrigger, decorators: [{
204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxContextMenuTrigger, decorators: [{
180
205
  type: Directive,
181
206
  args: [{
182
207
  selector: '[rdxContextMenuTrigger]',
183
208
  exportAs: 'rdxContextMenuTrigger',
184
209
  host: {
185
- '[attr.data-state]': 'rootContext.isOpen() ? "open" : "closed"',
210
+ '[attr.data-popup-open]': 'rootContext.isOpen() ? "" : undefined',
211
+ '[attr.data-pressed]': 'pressed() ? "" : undefined',
186
212
  '[attr.data-disabled]': 'disabled() ? "" : undefined',
187
213
  '(contextmenu)': 'onContextMenu($event)',
188
214
  '(pointerdown)': 'onPointerDown($event)',
@@ -200,11 +226,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
200
226
  */
201
227
  const contextMenuImports = [RdxContextMenuRoot, RdxContextMenuTrigger];
202
228
  class RdxContextMenuModule {
203
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
204
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuModule, imports: [RdxContextMenuRoot, RdxContextMenuTrigger], exports: [RdxContextMenuRoot, RdxContextMenuTrigger] }); }
205
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuModule }); }
229
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
230
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.2", ngImport: i0, type: RdxContextMenuModule, imports: [RdxContextMenuRoot, RdxContextMenuTrigger], exports: [RdxContextMenuRoot, RdxContextMenuTrigger] }); }
231
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxContextMenuModule }); }
206
232
  }
207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuModule, decorators: [{
233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxContextMenuModule, decorators: [{
208
234
  type: NgModule,
209
235
  args: [{
210
236
  imports: [...contextMenuImports],
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-context-menu.mjs","sources":["../../../packages/primitives/context-menu/src/context-menu-root.ts","../../../packages/primitives/context-menu/src/context-menu-trigger.ts","../../../packages/primitives/context-menu/index.ts","../../../packages/primitives/context-menu/radix-ng-primitives-context-menu.ts"],"sourcesContent":["import { Directive, inject, Signal } from '@angular/core';\nimport type { VirtualElement } from '@floating-ui/dom';\nimport { createContext } from '@radix-ng/primitives/core';\nimport { RdxMenuAutoFocusInput, RdxMenuOpenChangeReason, RdxMenuRoot } from '@radix-ng/primitives/menu';\nimport { RdxPopper } from '@radix-ng/primitives/popper';\n\nexport interface RdxContextMenuRootContext {\n /** Whether the context menu is currently open. */\n isOpen: Signal<boolean>;\n /** Whether the whole menu is disabled. */\n disabled: Signal<boolean>;\n /** Open the menu anchored at the given viewport coordinates. */\n openAt: (clientX: number, clientY: number, autoFocus?: RdxMenuAutoFocusInput, event?: Event) => void;\n /** Close the menu. */\n close: (reason?: RdxMenuOpenChangeReason, event?: Event) => void;\n}\n\nexport const [injectRdxContextMenuRootContext, provideRdxContextMenuRootContext] =\n createContext<RdxContextMenuRootContext>('RdxContextMenuRootContext', 'components/context-menu');\n\nconst contextFactory = (): RdxContextMenuRootContext => {\n const root = inject(RdxContextMenuRoot);\n return {\n isOpen: root.menuRoot.open,\n disabled: root.menuRoot.disabled,\n openAt: (clientX, clientY, autoFocus, event) => root.openAt(clientX, clientY, autoFocus, event),\n close: (reason, event) => root.menuRoot.close(reason, event)\n };\n};\n\n/**\n * Groups all parts of a context menu. Composes the Menu primitive but, instead of anchoring the\n * popup to a trigger element, anchors it to the pointer position captured by `rdxContextMenuTrigger`.\n *\n * Reuse the Menu popup parts inside it — `rdxMenuPositioner`, `rdxMenuPopup`, `rdxMenuItem`,\n * `rdxMenuCheckboxItem`, `rdxMenuRadioGroup`, `rdxMenuSubTrigger`, `rdxMenuSeparator`, … all behave\n * identically here.\n */\n@Directive({\n selector: '[rdxContextMenuRoot]',\n exportAs: 'rdxContextMenuRoot',\n hostDirectives: [\n {\n directive: RdxMenuRoot,\n inputs: ['open', 'modal', 'loopFocus', 'highlightItemOnHover'],\n outputs: ['openChange', 'onOpenChange', 'onOpenChangeComplete']\n }\n ],\n providers: [provideRdxContextMenuRootContext(contextFactory)]\n})\nexport class RdxContextMenuRoot {\n readonly menuRoot = inject(RdxMenuRoot);\n private readonly popper = inject(RdxPopper);\n\n constructor() {\n // Tell the composed menu root it is a Context Menu, so its per-kind policy (modal focus trap,\n // backdrop, outside-press grace) differs from a plain dropdown (Base UI `MenuParent.type`).\n this.menuRoot.markAsContextMenu();\n }\n\n /**\n * Open the menu with the popup anchored at the given viewport coordinates.\n *\n * `autoFocus` defaults to `'popup'` so a right-click opens with the popup focused but no item\n * highlighted (matching Base UI's pointer behavior). Pass `'first'` for keyboard opening. `event` is\n * the originating pointer event (threaded to the menu so a touch long-press is recorded for the\n * anchored scroll-lock policy, ADR 0016 §3).\n */\n openAt(clientX: number, clientY: number, autoFocus: RdxMenuAutoFocusInput = 'popup', event?: Event): void {\n if (this.menuRoot.disabled()) {\n return;\n }\n\n const anchor: VirtualElement = {\n getBoundingClientRect: () =>\n ({\n width: 0,\n height: 0,\n x: clientX,\n y: clientY,\n top: clientY,\n left: clientX,\n right: clientX,\n bottom: clientY,\n toJSON: () => ({})\n }) as DOMRect\n };\n\n this.popper.anchorOverride.set(anchor);\n // Move focus into the popup so keyboard navigation and outside-dismiss work immediately.\n this.menuRoot.show(autoFocus, 'trigger-press', event);\n }\n}\n","import { booleanAttribute, DestroyRef, Directive, ElementRef, inject, input, numberAttribute } from '@angular/core';\nimport { BooleanInput, NumberInput } from '@radix-ng/primitives/core';\nimport { RdxMenuRoot } from '@radix-ng/primitives/menu';\nimport { injectRdxContextMenuRootContext } from './context-menu-root';\n\n/**\n * An area that opens the context menu on right click (or a touch long-press).\n *\n * Apply it to the element that should respond to the context-menu gesture; the popup is positioned\n * at the pointer, not against this element.\n */\n@Directive({\n selector: '[rdxContextMenuTrigger]',\n exportAs: 'rdxContextMenuTrigger',\n host: {\n '[attr.data-state]': 'rootContext.isOpen() ? \"open\" : \"closed\"',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '(contextmenu)': 'onContextMenu($event)',\n '(pointerdown)': 'onPointerDown($event)',\n '(pointermove)': 'onPointerMove($event)',\n '(pointerup)': 'cancelLongPress()',\n '(pointercancel)': 'cancelLongPress()',\n '(pointerleave)': 'cancelLongPress()'\n }\n})\nexport class RdxContextMenuTrigger {\n protected readonly rootContext = injectRdxContextMenuRootContext();\n private readonly menuRoot = inject(RdxMenuRoot);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Whether the trigger is disabled. */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** How long (ms) a touch must be held before the menu opens. */\n readonly longPressDelay = input<number, NumberInput>(500, { transform: numberAttribute });\n\n private longPressTimer: ReturnType<typeof setTimeout> | undefined;\n private allowMouseUpTimer: ReturnType<typeof setTimeout> | undefined;\n private longPressOrigin: { x: number; y: number } | undefined;\n private lastPointerDownTime = 0;\n private allowMouseUp = false;\n private readonly handleDocumentMouseUp = (event: MouseEvent): void => {\n this.clearContextMenuMouseUpGuard();\n\n if (!this.allowMouseUp) {\n return;\n }\n\n this.allowMouseUp = false;\n const target = event.target as Node | null;\n const popup = this.menuRoot.popupElement();\n\n if (target && popup?.contains(target)) {\n return;\n }\n\n this.rootContext.close('cancel-open', event);\n };\n\n constructor() {\n inject(DestroyRef).onDestroy(() => {\n this.cancelLongPress();\n this.clearContextMenuMouseUpGuard();\n });\n }\n\n protected onContextMenu(event: MouseEvent): void {\n if (this.disabled()) {\n return;\n }\n\n // Suppress the native context menu and open ours at the pointer.\n event.preventDefault();\n this.cancelLongPress();\n\n // A keyboard-initiated context menu (e.g. the Menu key / Shift+F10) is not preceded by a\n // pointerdown, so it opens with the first item highlighted; a pointer opens the popup\n // without highlighting an item.\n const fromKeyboard = event.timeStamp - this.lastPointerDownTime > 300;\n // A right-click `contextmenu` event has no `pointerType`, so this records a non-touch open.\n this.rootContext.openAt(event.clientX, event.clientY, fromKeyboard ? 'first' : 'popup', event);\n this.armContextMenuMouseUpGuard(event.currentTarget as HTMLElement);\n }\n\n protected onPointerDown(event: PointerEvent): void {\n this.lastPointerDownTime = event.timeStamp;\n\n if (this.disabled() || event.pointerType !== 'touch') {\n return;\n }\n\n const { clientX, clientY } = event;\n this.longPressOrigin = { x: clientX, y: clientY };\n this.cancelLongPress();\n this.longPressTimer = setTimeout(() => {\n this.longPressTimer = undefined;\n // Pass the touch pointer event so the menu records a touch open (ADR 0016 §3).\n this.rootContext.openAt(clientX, clientY, 'popup', event);\n }, this.longPressDelay());\n }\n\n protected onPointerMove(event: PointerEvent): void {\n // A finger that drifts more than ~10px is a scroll/drag, not a long-press.\n if (!this.longPressOrigin) {\n return;\n }\n\n const dx = event.clientX - this.longPressOrigin.x;\n const dy = event.clientY - this.longPressOrigin.y;\n if (Math.hypot(dx, dy) > 10) {\n this.cancelLongPress();\n }\n }\n\n protected cancelLongPress(): void {\n clearTimeout(this.longPressTimer);\n this.longPressTimer = undefined;\n this.longPressOrigin = undefined;\n }\n\n private armContextMenuMouseUpGuard(trigger: HTMLElement): void {\n this.clearContextMenuMouseUpGuard();\n this.allowMouseUp = false;\n this.allowMouseUpTimer = setTimeout(() => {\n this.allowMouseUpTimer = undefined;\n this.allowMouseUp = true;\n }, 500);\n\n trigger.ownerDocument.addEventListener('mouseup', this.handleDocumentMouseUp, { once: true });\n }\n\n private clearContextMenuMouseUpGuard(): void {\n clearTimeout(this.allowMouseUpTimer);\n this.allowMouseUpTimer = undefined;\n this.elementRef?.nativeElement?.ownerDocument?.removeEventListener('mouseup', this.handleDocumentMouseUp);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxContextMenuRoot } from './src/context-menu-root';\nimport { RdxContextMenuTrigger } from './src/context-menu-trigger';\n\nexport * from './src/context-menu-root';\nexport * from './src/context-menu-trigger';\n\n/**\n * Context-menu-specific parts. The popup, items, checkbox/radio, submenus, separators, etc. come\n * from `@radix-ng/primitives/menu` (`RdxMenuModule`) and behave identically inside a context menu.\n */\nconst contextMenuImports = [RdxContextMenuRoot, RdxContextMenuTrigger];\n\n@NgModule({\n imports: [...contextMenuImports],\n exports: [...contextMenuImports]\n})\nexport class RdxContextMenuModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAiBO,MAAM,CAAC,+BAA+B,EAAE,gCAAgC,CAAC,GAC5E,aAAa,CAA4B,2BAA2B,EAAE,yBAAyB;AAEnG,MAAM,cAAc,GAAG,MAAgC;AACnD,IAAA,MAAM,IAAI,GAAG,MAAM,CAAC,kBAAkB,CAAC;IACvC,OAAO;AACH,QAAA,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI;AAC1B,QAAA,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ;QAChC,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,KAAK,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC;AAC/F,QAAA,KAAK,EAAE,CAAC,MAAM,EAAE,KAAK,KAAK,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK;KAC9D;AACL,CAAC;AAED;;;;;;;AAOG;MAaU,kBAAkB,CAAA;AAI3B,IAAA,WAAA,GAAA;AAHS,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,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
+ {"version":3,"file":"radix-ng-primitives-context-menu.mjs","sources":["../../../packages/primitives/context-menu/src/context-menu-root.ts","../../../packages/primitives/context-menu/src/context-menu-trigger.ts","../../../packages/primitives/context-menu/index.ts","../../../packages/primitives/context-menu/radix-ng-primitives-context-menu.ts"],"sourcesContent":["import { Directive, inject, Signal } from '@angular/core';\nimport type { VirtualElement } from '@floating-ui/dom';\nimport { createContext } from '@radix-ng/primitives/core';\nimport { RdxMenuAutoFocusInput, RdxMenuOpenChangeReason, RdxMenuRoot } from '@radix-ng/primitives/menu';\nimport { RdxPopper } from '@radix-ng/primitives/popper';\n\nexport interface RdxContextMenuRootContext {\n /** Whether the context menu is currently open. */\n isOpen: Signal<boolean>;\n /** Whether the whole menu is disabled. */\n disabled: Signal<boolean>;\n /** Open the menu anchored at the given viewport coordinates. */\n openAt: (clientX: number, clientY: number, autoFocus?: RdxMenuAutoFocusInput, event?: Event) => void;\n /** Close the menu. */\n close: (reason?: RdxMenuOpenChangeReason, event?: Event) => void;\n}\n\nexport const [injectRdxContextMenuRootContext, provideRdxContextMenuRootContext] =\n createContext<RdxContextMenuRootContext>('RdxContextMenuRootContext', 'components/context-menu');\n\nconst contextFactory = (): RdxContextMenuRootContext => {\n const root = inject(RdxContextMenuRoot);\n return {\n isOpen: root.menuRoot.open,\n disabled: root.menuRoot.disabled,\n openAt: (clientX, clientY, autoFocus, event) => root.openAt(clientX, clientY, autoFocus, event),\n close: (reason, event) => root.menuRoot.close(reason, event)\n };\n};\n\n/**\n * Groups all parts of a context menu. Composes the Menu primitive but, instead of anchoring the\n * popup to a trigger element, anchors it to the pointer position captured by `rdxContextMenuTrigger`.\n *\n * Reuse the Menu popup parts inside it — `rdxMenuPositioner`, `rdxMenuPopup`, `rdxMenuItem`,\n * `rdxMenuCheckboxItem`, `rdxMenuRadioGroup`, `rdxMenuSubTrigger`, `rdxMenuSeparator`, … all behave\n * identically here.\n */\n@Directive({\n selector: '[rdxContextMenuRoot]',\n exportAs: 'rdxContextMenuRoot',\n hostDirectives: [\n {\n directive: RdxMenuRoot,\n inputs: ['open', 'modal', 'loopFocus', 'highlightItemOnHover'],\n outputs: ['openChange', 'onOpenChange', 'onOpenChangeComplete']\n }\n ],\n providers: [provideRdxContextMenuRootContext(contextFactory)]\n})\nexport class RdxContextMenuRoot {\n readonly menuRoot = inject(RdxMenuRoot);\n private readonly popper = inject(RdxPopper);\n\n constructor() {\n // Tell the composed menu root it is a Context Menu, so its per-kind policy (modal focus trap,\n // backdrop, outside-press grace) differs from a plain dropdown (Base UI `MenuParent.type`).\n this.menuRoot.markAsContextMenu();\n }\n\n /**\n * Open the menu with the popup anchored at the given viewport coordinates.\n *\n * `autoFocus` defaults to `'popup'` so a right-click opens with the popup focused but no item\n * highlighted (matching Base UI's pointer behavior). Pass `'first'` for keyboard opening. `event` is\n * the originating pointer event (threaded to the menu so a touch long-press is recorded for the\n * anchored scroll-lock policy, ADR 0016 §3).\n */\n openAt(clientX: number, clientY: number, autoFocus: RdxMenuAutoFocusInput = 'popup', event?: Event): void {\n if (this.menuRoot.disabled()) {\n return;\n }\n\n // A touch long-press gets a small 10×10 anchor box (Base UI) so the popup is offset from the\n // finger; a mouse/keyboard open uses a 0×0 point at the cursor. (`PointerEvent` is not a global in\n // jsdom, so duck-type the pointer type instead of `instanceof`.)\n const size = event && 'pointerType' in event && (event as PointerEvent).pointerType === 'touch' ? 10 : 0;\n const anchor: VirtualElement = {\n getBoundingClientRect: () =>\n ({\n width: size,\n height: size,\n x: clientX,\n y: clientY,\n top: clientY,\n left: clientX,\n right: clientX + size,\n bottom: clientY + size,\n toJSON: () => ({})\n }) as DOMRect\n };\n\n this.popper.anchorOverride.set(anchor);\n // Move focus into the popup so keyboard navigation and outside-dismiss work immediately.\n this.menuRoot.show(autoFocus, 'trigger-press', event);\n }\n}\n","import {\n booleanAttribute,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n input,\n numberAttribute,\n signal\n} from '@angular/core';\nimport { BooleanInput, NumberInput } from '@radix-ng/primitives/core';\nimport { RdxMenuRoot } from '@radix-ng/primitives/menu';\nimport { injectRdxContextMenuRootContext } from './context-menu-root';\n\n/**\n * An area that opens the context menu on right click (or a touch long-press).\n *\n * Apply it to the element that should respond to the context-menu gesture; the popup is positioned\n * at the pointer, not against this element.\n */\n@Directive({\n selector: '[rdxContextMenuTrigger]',\n exportAs: 'rdxContextMenuTrigger',\n host: {\n '[attr.data-popup-open]': 'rootContext.isOpen() ? \"\" : undefined',\n '[attr.data-pressed]': 'pressed() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '(contextmenu)': 'onContextMenu($event)',\n '(pointerdown)': 'onPointerDown($event)',\n '(pointermove)': 'onPointerMove($event)',\n '(pointerup)': 'cancelLongPress()',\n '(pointercancel)': 'cancelLongPress()',\n '(pointerleave)': 'cancelLongPress()'\n }\n})\nexport class RdxContextMenuTrigger {\n protected readonly rootContext = injectRdxContextMenuRootContext();\n private readonly menuRoot = inject(RdxMenuRoot);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Whether the trigger is disabled. */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** How long (ms) a touch must be held before the menu opens. */\n readonly longPressDelay = input<number, NumberInput>(500, { transform: numberAttribute });\n\n /** Whether the trigger is mid-press (Base UI `data-pressed`). */\n protected readonly pressed = signal(false);\n\n private longPressTimer: ReturnType<typeof setTimeout> | undefined;\n private allowMouseUpTimer: ReturnType<typeof setTimeout> | undefined;\n private longPressOrigin: { x: number; y: number } | undefined;\n private lastPointerDownTime = 0;\n private allowMouseUp = false;\n private readonly handleDocumentMouseUp = (event: MouseEvent): void => {\n this.clearContextMenuMouseUpGuard();\n\n if (!this.allowMouseUp) {\n return;\n }\n\n this.allowMouseUp = false;\n const target = event.target as Node | null;\n const popup = this.menuRoot.popupElement();\n\n if (target && popup?.contains(target)) {\n return;\n }\n\n this.rootContext.close('cancel-open', event);\n };\n\n constructor() {\n const ownerDocument = this.elementRef.nativeElement.ownerDocument;\n\n // While the menu is open, a second right-click over the trigger or the popup must not surface the\n // native browser context menu (Base UI registers the same document-level suppressor).\n const suppressNativeContextMenu = (event: MouseEvent): void => {\n if (!this.rootContext.isOpen()) {\n return;\n }\n const target = event.target as Node | null;\n const popup = this.menuRoot.popupElement();\n if (target && (this.elementRef.nativeElement.contains(target) || popup?.contains(target))) {\n event.preventDefault();\n }\n };\n ownerDocument.addEventListener('contextmenu', suppressNativeContextMenu);\n\n inject(DestroyRef).onDestroy(() => {\n ownerDocument.removeEventListener('contextmenu', suppressNativeContextMenu);\n this.cancelLongPress();\n this.clearContextMenuMouseUpGuard();\n });\n }\n\n protected onContextMenu(event: MouseEvent): void {\n if (this.disabled()) {\n return;\n }\n\n // Suppress the native context menu and open ours at the pointer.\n event.preventDefault();\n this.cancelLongPress();\n this.pressed.set(true);\n\n // A keyboard-initiated context menu (the Menu key / Shift+F10) is not preceded by a pointerdown,\n // so it opens with the first item highlighted; a pointer opens the popup without highlighting.\n const fromKeyboard = event.timeStamp - this.lastPointerDownTime > 300;\n // A right-click `contextmenu` event has no `pointerType`, so this records a non-touch open.\n this.rootContext.openAt(event.clientX, event.clientY, fromKeyboard ? 'first' : 'popup', event);\n this.armContextMenuMouseUpGuard(this.elementRef.nativeElement);\n }\n\n protected onPointerDown(event: PointerEvent): void {\n this.lastPointerDownTime = event.timeStamp;\n this.pressed.set(true);\n\n // Ignore non-primary pointers (a second finger in a multi-touch gesture must not arm long-press).\n if (this.disabled() || event.pointerType !== 'touch' || event.isPrimary === false) {\n return;\n }\n\n const { clientX, clientY } = event;\n this.longPressOrigin = { x: clientX, y: clientY };\n this.cancelLongPress();\n this.longPressTimer = setTimeout(() => {\n this.longPressTimer = undefined;\n // Pass the touch pointer event so the menu records a touch open (ADR 0016 §3).\n this.rootContext.openAt(clientX, clientY, 'popup', event);\n }, this.longPressDelay());\n }\n\n protected onPointerMove(event: PointerEvent): void {\n // A finger that drifts more than ~10px is a scroll/drag, not a long-press.\n if (!this.longPressOrigin) {\n return;\n }\n\n const dx = event.clientX - this.longPressOrigin.x;\n const dy = event.clientY - this.longPressOrigin.y;\n if (Math.hypot(dx, dy) > 10) {\n this.cancelLongPress();\n }\n }\n\n protected cancelLongPress(): void {\n this.pressed.set(false);\n clearTimeout(this.longPressTimer);\n this.longPressTimer = undefined;\n this.longPressOrigin = undefined;\n }\n\n private armContextMenuMouseUpGuard(trigger: HTMLElement): void {\n this.clearContextMenuMouseUpGuard();\n this.allowMouseUp = false;\n this.allowMouseUpTimer = setTimeout(() => {\n this.allowMouseUpTimer = undefined;\n this.allowMouseUp = true;\n }, 500);\n\n trigger.ownerDocument.addEventListener('mouseup', this.handleDocumentMouseUp, { once: true });\n }\n\n private clearContextMenuMouseUpGuard(): void {\n clearTimeout(this.allowMouseUpTimer);\n this.allowMouseUpTimer = undefined;\n this.elementRef.nativeElement.ownerDocument.removeEventListener('mouseup', this.handleDocumentMouseUp);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxContextMenuRoot } from './src/context-menu-root';\nimport { RdxContextMenuTrigger } from './src/context-menu-trigger';\n\nexport * from './src/context-menu-root';\nexport * from './src/context-menu-trigger';\n\n/**\n * Context-menu-specific parts. The popup, items, checkbox/radio, submenus, separators, etc. come\n * from `@radix-ng/primitives/menu` (`RdxMenuModule`) and behave identically inside a context menu.\n */\nconst contextMenuImports = [RdxContextMenuRoot, RdxContextMenuTrigger];\n\n@NgModule({\n imports: [...contextMenuImports],\n exports: [...contextMenuImports]\n})\nexport class RdxContextMenuModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAiBO,MAAM,CAAC,+BAA+B,EAAE,gCAAgC,CAAC,GAC5E,aAAa,CAA4B,2BAA2B,EAAE,yBAAyB;AAEnG,MAAM,cAAc,GAAG,MAAgC;AACnD,IAAA,MAAM,IAAI,GAAG,MAAM,CAAC,kBAAkB,CAAC;IACvC,OAA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IAAA,EAAA,oBAAoB,YANL,kBAAkB,EAAE,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAAzC,kBAAkB,EAAE,qBAAqB,CAAA,EAAA,CAAA,CAAA;+GAMxD,oBAAoB,EAAA,CAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB;AAClC,iBAAA;;;AChBD;;AAEG;;;;"}
@@ -41,12 +41,14 @@ class RdxControlValueAccessor {
41
41
  this.disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
42
42
  transform: booleanAttribute });
43
43
  this.valueChange = output();
44
- this._value = linkedSignal(() => this.valueInput(), ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
44
+ this._value = linkedSignal(() => this.valueInput(), /* @ts-ignore */
45
+ ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
45
46
  /**
46
47
  * Readonly access to the current value
47
48
  */
48
49
  this.value = this._value.asReadonly();
49
- this._disabled = linkedSignal(() => this.disabledInput(), ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
50
+ this._disabled = linkedSignal(() => this.disabledInput(), /* @ts-ignore */
51
+ ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
50
52
  /**
51
53
  * Readonly access to the disabled state
52
54
  */
@@ -92,10 +94,10 @@ class RdxControlValueAccessor {
92
94
  markAsTouched() {
93
95
  this.onTouched?.();
94
96
  }
95
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxControlValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
96
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxControlValueAccessor, isStandalone: true, inputs: { valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, providers: [provideValueAccessor(RdxControlValueAccessor)], exportAs: ["rdxControlValueAccessor"], ngImport: i0 }); }
97
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxControlValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
98
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxControlValueAccessor, isStandalone: true, inputs: { valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, providers: [provideValueAccessor(RdxControlValueAccessor)], exportAs: ["rdxControlValueAccessor"], ngImport: i0 }); }
97
99
  }
98
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxControlValueAccessor, decorators: [{
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxControlValueAccessor, decorators: [{
99
101
  type: Directive,
100
102
  args: [{
101
103
  exportAs: 'rdxControlValueAccessor',
@@ -1520,7 +1522,8 @@ function useDateField(props) {
1520
1522
  hourCycle: props.hourCycle,
1521
1523
  segmentValues: props.segmentValues(),
1522
1524
  formatter: props.formatter
1523
- }) ?? {}, ...(ngDevMode ? [{ debugName: "attributes" }] : /* istanbul ignore next */ []));
1525
+ }) ?? {}, /* @ts-ignore */
1526
+ ...(ngDevMode ? [{ debugName: "attributes" }] : /* istanbul ignore next */ []));
1524
1527
  function handleMonthSegmentKeydown(e) {
1525
1528
  if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key))
1526
1529
  return;
@@ -1783,10 +1786,10 @@ class RdxIdGenerator {
1783
1786
  counters.set(key, next + 1);
1784
1787
  return `${key}${next}`;
1785
1788
  }
1786
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxIdGenerator, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1787
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxIdGenerator, providedIn: 'root' }); }
1789
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxIdGenerator, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1790
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxIdGenerator, providedIn: 'root' }); }
1788
1791
  }
1789
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxIdGenerator, decorators: [{
1792
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxIdGenerator, decorators: [{
1790
1793
  type: Injectable,
1791
1794
  args: [{ providedIn: 'root' }]
1792
1795
  }] });
@@ -1992,10 +1995,10 @@ class RdxLiveAnnouncer {
1992
1995
  this.liveElement = element;
1993
1996
  return element;
1994
1997
  }
1995
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxLiveAnnouncer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1996
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxLiveAnnouncer, providedIn: 'root' }); }
1998
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxLiveAnnouncer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1999
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxLiveAnnouncer, providedIn: 'root' }); }
1997
2000
  }
1998
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxLiveAnnouncer, decorators: [{
2001
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxLiveAnnouncer, decorators: [{
1999
2002
  type: Injectable,
2000
2003
  args: [{ providedIn: 'root' }]
2001
2004
  }], ctorParameters: () => [] });
@@ -2161,12 +2164,14 @@ const DOCS$2 = 'utils/floating-tree';
2161
2164
  */
2162
2165
  class RdxFloatingRegistrationContext {
2163
2166
  constructor() {
2164
- this._state = signal({ status: 'pending' }, ...(ngDevMode ? [{ debugName: "_state" }] : /* istanbul ignore next */ []));
2167
+ this._state = signal({ status: 'pending' }, /* @ts-ignore */
2168
+ ...(ngDevMode ? [{ debugName: "_state" }] : /* istanbul ignore next */ []));
2165
2169
  /**
2166
2170
  * Lifecycle phase: `pending` (resolving — children must wait), `detached` (resolved, node-optional),
2167
2171
  * or `registered`. A `computed()` over the one internal state signal. See {@link RegistrationState}.
2168
2172
  */
2169
- this.status = computed(() => this._state().status, ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
2173
+ this.status = computed(() => this._state().status, /* @ts-ignore */
2174
+ ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
2170
2175
  /**
2171
2176
  * The tree this directive joined, or `null` unless `status() === 'registered'`. A `computed()`
2172
2177
  * derived from the internal state — always consistent with {@link node} and {@link status}.
@@ -2174,7 +2179,8 @@ class RdxFloatingRegistrationContext {
2174
2179
  this.tree = computed(() => {
2175
2180
  const state = this._state();
2176
2181
  return state.status === 'registered' ? state.tree : null;
2177
- }, ...(ngDevMode ? [{ debugName: "tree" }] : /* istanbul ignore next */ []));
2182
+ }, /* @ts-ignore */
2183
+ ...(ngDevMode ? [{ debugName: "tree" }] : /* istanbul ignore next */ []));
2178
2184
  /**
2179
2185
  * The node this directive registered, or `null` unless `status() === 'registered'`. A `computed()`
2180
2186
  * derived from the internal state — always consistent with {@link tree}
@@ -2183,7 +2189,8 @@ class RdxFloatingRegistrationContext {
2183
2189
  this.node = computed(() => {
2184
2190
  const state = this._state();
2185
2191
  return state.status === 'registered' ? state.node : null;
2186
- }, ...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
2192
+ }, /* @ts-ignore */
2193
+ ...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
2187
2194
  }
2188
2195
  /**
2189
2196
  * Atomically records the resolved tree and the registered node (`status → 'registered'`). Asserts
@@ -2636,9 +2643,11 @@ function injectFloatingRootContext(fallback) {
2636
2643
  class RdxFloatingNodeRegistration {
2637
2644
  constructor() {
2638
2645
  /** Explicit tree for detached sibling composition — Base UI's `externalTree`. */
2639
- this.externalTree = input(null, ...(ngDevMode ? [{ debugName: "externalTree" }] : /* istanbul ignore next */ []));
2646
+ this.externalTree = input(null, /* @ts-ignore */
2647
+ ...(ngDevMode ? [{ debugName: "externalTree" }] : /* istanbul ignore next */ []));
2640
2648
  /** How this node's logical parent is resolved. Defaults to `inherit` (nearest DI ancestor). */
2641
- this.parentOverride = input({ kind: 'inherit' }, ...(ngDevMode ? [{ debugName: "parentOverride" }] : /* istanbul ignore next */ []));
2649
+ this.parentOverride = input({ kind: 'inherit' }, /* @ts-ignore */
2650
+ ...(ngDevMode ? [{ debugName: "parentOverride" }] : /* istanbul ignore next */ []));
2642
2651
  /** Own handle — the WRITER side (concrete class); this directive is the only writer. */
2643
2652
  this.selfReg = inject(RdxFloatingRegistrationContext);
2644
2653
  /** Nearest ancestor handle — the READER side (reader-typed token), or `null` at the top. */
@@ -2691,10 +2700,10 @@ class RdxFloatingNodeRegistration {
2691
2700
  });
2692
2701
  });
2693
2702
  }
2694
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxFloatingNodeRegistration, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2695
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxFloatingNodeRegistration, isStandalone: true, selector: "[rdxFloatingNode]", inputs: { externalTree: { classPropertyName: "externalTree", publicName: "externalTree", isSignal: true, isRequired: false, transformFunction: null }, parentOverride: { classPropertyName: "parentOverride", publicName: "parentOverride", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideFloatingRegistration()], exportAs: ["rdxFloatingNode"], ngImport: i0 }); }
2703
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxFloatingNodeRegistration, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2704
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxFloatingNodeRegistration, isStandalone: true, selector: "[rdxFloatingNode]", inputs: { externalTree: { classPropertyName: "externalTree", publicName: "externalTree", isSignal: true, isRequired: false, transformFunction: null }, parentOverride: { classPropertyName: "parentOverride", publicName: "parentOverride", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideFloatingRegistration()], exportAs: ["rdxFloatingNode"], ngImport: i0 }); }
2696
2705
  }
2697
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxFloatingNodeRegistration, decorators: [{
2706
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxFloatingNodeRegistration, decorators: [{
2698
2707
  type: Directive,
2699
2708
  args: [{
2700
2709
  selector: '[rdxFloatingNode]',
@@ -2946,7 +2955,8 @@ function elementSize({ elementRef, injector }) {
2946
2955
  const result = signal({
2947
2956
  width: elementRef.nativeElement.offsetWidth,
2948
2957
  height: elementRef.nativeElement.offsetHeight
2949
- }, ...(ngDevMode ? [{ debugName: "result" }] : /* istanbul ignore next */ []));
2958
+ }, /* @ts-ignore */
2959
+ ...(ngDevMode ? [{ debugName: "result" }] : /* istanbul ignore next */ []));
2950
2960
  afterNextRender(() => {
2951
2961
  const resizeObserver = new ResizeObserver((entries) => {
2952
2962
  const entry = entries[0];
@@ -3329,7 +3339,8 @@ const VIEWPORT_WIDTH_TOLERANCE_PX = 20;
3329
3339
  * the popup is positioned (visibility does not affect layout). Must be called in an injection context.
3330
3340
  */
3331
3341
  function useAnchoredScrollLock(enabled, options) {
3332
- const touchOpenShouldLock = signal(false, ...(ngDevMode ? [{ debugName: "touchOpenShouldLock" }] : /* istanbul ignore next */ []));
3342
+ const touchOpenShouldLock = signal(false, /* @ts-ignore */
3343
+ ...(ngDevMode ? [{ debugName: "touchOpenShouldLock" }] : /* istanbul ignore next */ []));
3333
3344
  effect(() => {
3334
3345
  const element = options.element();
3335
3346
  if (!enabled() || !options.touchOpen() || !element) {
@@ -3496,7 +3507,8 @@ function createSignalEvent() {
3496
3507
  * Keeps hover content open while the pointer crosses the gap between a trigger and a popup.
3497
3508
  */
3498
3509
  function useGraceArea(triggerEl, containerEl, resetMs = 300) {
3499
- const isPointerInTransit = signal(false, ...(ngDevMode ? [{ debugName: "isPointerInTransit" }] : /* istanbul ignore next */ []));
3510
+ const isPointerInTransit = signal(false, /* @ts-ignore */
3511
+ ...(ngDevMode ? [{ debugName: "isPointerInTransit" }] : /* istanbul ignore next */ []));
3500
3512
  const pointerExit = createSignalEvent();
3501
3513
  let pointerGraceArea = null;
3502
3514
  let resetTimer = null;
@@ -3705,12 +3717,15 @@ function getHullPresorted(points) {
3705
3717
  */
3706
3718
  function useListHighlight(options) {
3707
3719
  const { items, isNavigable, getId, loop, injector } = options;
3708
- const highlighted = signal(null, ...(ngDevMode ? [{ debugName: "highlighted" }] : /* istanbul ignore next */ []));
3709
- const navigable = computed(() => items().filter((item) => isNavigable(item)), ...(ngDevMode ? [{ debugName: "navigable" }] : /* istanbul ignore next */ []));
3720
+ const highlighted = signal(null, /* @ts-ignore */
3721
+ ...(ngDevMode ? [{ debugName: "highlighted" }] : /* istanbul ignore next */ []));
3722
+ const navigable = computed(() => items().filter((item) => isNavigable(item)), /* @ts-ignore */
3723
+ ...(ngDevMode ? [{ debugName: "navigable" }] : /* istanbul ignore next */ []));
3710
3724
  const activeId = computed(() => {
3711
3725
  const item = highlighted();
3712
3726
  return item === null ? undefined : getId(item);
3713
- }, ...(ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []));
3727
+ }, /* @ts-ignore */
3728
+ ...(ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []));
3714
3729
  const setIfNavigable = (item) => {
3715
3730
  if (item === null || isNavigable(item)) {
3716
3731
  highlighted.set(item);
@@ -3899,7 +3914,8 @@ const TRANSITION_FALLBACK_BUFFER = 50;
3899
3914
  function useTransitionStatus(onComplete) {
3900
3915
  const injector = inject(Injector);
3901
3916
  const destroyRef = inject(DestroyRef);
3902
- const status = signal(undefined, ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
3917
+ const status = signal(undefined, /* @ts-ignore */
3918
+ ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
3903
3919
  let element;
3904
3920
  let timer;
3905
3921
  let frame;