@radix-ng/primitives 0.51.0 → 1.0.0-beta.0

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 (178) hide show
  1. package/fesm2022/radix-ng-primitives-accordion.mjs +105 -38
  2. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  3. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +221 -129
  4. package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
  5. package/fesm2022/radix-ng-primitives-arrow.mjs +20 -4
  6. package/fesm2022/radix-ng-primitives-arrow.mjs.map +1 -1
  7. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
  8. package/fesm2022/radix-ng-primitives-avatar.mjs +54 -61
  9. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  10. package/fesm2022/radix-ng-primitives-button.mjs +123 -0
  11. package/fesm2022/radix-ng-primitives-button.mjs.map +1 -0
  12. package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
  13. package/fesm2022/radix-ng-primitives-checkbox.mjs +378 -54
  14. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  15. package/fesm2022/radix-ng-primitives-collapsible.mjs +182 -81
  16. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
  17. package/fesm2022/radix-ng-primitives-collection.mjs +40 -57
  18. package/fesm2022/radix-ng-primitives-collection.mjs.map +1 -1
  19. package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
  20. package/fesm2022/radix-ng-primitives-context-menu.mjs +140 -424
  21. package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
  22. package/fesm2022/radix-ng-primitives-core.mjs +735 -744
  23. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  24. package/fesm2022/radix-ng-primitives-cropper.mjs +1 -0
  25. package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
  26. package/fesm2022/radix-ng-primitives-date-field.mjs +51 -45
  27. package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
  28. package/fesm2022/radix-ng-primitives-dialog.mjs +655 -327
  29. package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
  30. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +70 -46
  31. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
  32. package/fesm2022/radix-ng-primitives-drawer.mjs +1059 -0
  33. package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -0
  34. package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
  35. package/fesm2022/radix-ng-primitives-field.mjs +363 -0
  36. package/fesm2022/radix-ng-primitives-field.mjs.map +1 -0
  37. package/fesm2022/radix-ng-primitives-fieldset.mjs +79 -0
  38. package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -0
  39. package/fesm2022/radix-ng-primitives-focus-scope.mjs +23 -8
  40. package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
  41. package/fesm2022/radix-ng-primitives-input.mjs +172 -0
  42. package/fesm2022/radix-ng-primitives-input.mjs.map +1 -0
  43. package/fesm2022/radix-ng-primitives-label.mjs +6 -6
  44. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  45. package/fesm2022/radix-ng-primitives-menu.mjs +1480 -344
  46. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  47. package/fesm2022/radix-ng-primitives-menubar.mjs +290 -162
  48. package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
  49. package/fesm2022/radix-ng-primitives-meter.mjs +271 -0
  50. package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -0
  51. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +1052 -1553
  52. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  53. package/fesm2022/radix-ng-primitives-number-field.mjs +1102 -367
  54. package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
  55. package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
  56. package/fesm2022/radix-ng-primitives-popover.mjs +978 -989
  57. package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
  58. package/fesm2022/radix-ng-primitives-popper.mjs +91 -41
  59. package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
  60. package/fesm2022/radix-ng-primitives-portal.mjs +34 -10
  61. package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
  62. package/fesm2022/radix-ng-primitives-presence.mjs +134 -246
  63. package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -1
  64. package/fesm2022/radix-ng-primitives-preview-card.mjs +997 -0
  65. package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -0
  66. package/fesm2022/radix-ng-primitives-progress.mjs +223 -84
  67. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  68. package/fesm2022/radix-ng-primitives-radio.mjs +191 -51
  69. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  70. package/fesm2022/radix-ng-primitives-roving-focus.mjs +96 -50
  71. package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
  72. package/fesm2022/radix-ng-primitives-select.mjs +791 -509
  73. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  74. package/fesm2022/radix-ng-primitives-separator.mjs +12 -35
  75. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  76. package/fesm2022/radix-ng-primitives-slider.mjs +969 -717
  77. package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
  78. package/fesm2022/radix-ng-primitives-stepper.mjs +15 -19
  79. package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
  80. package/fesm2022/radix-ng-primitives-switch.mjs +125 -113
  81. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  82. package/fesm2022/radix-ng-primitives-tabs.mjs +381 -108
  83. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  84. package/fesm2022/radix-ng-primitives-time-field.mjs +55 -46
  85. package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
  86. package/fesm2022/radix-ng-primitives-toggle-group.mjs +121 -247
  87. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  88. package/fesm2022/radix-ng-primitives-toggle.mjs +98 -61
  89. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  90. package/fesm2022/radix-ng-primitives-toolbar.mjs +303 -92
  91. package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
  92. package/fesm2022/radix-ng-primitives-tooltip.mjs +690 -1071
  93. package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
  94. package/fesm2022/radix-ng-primitives-visually-hidden.mjs +25 -66
  95. package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
  96. package/meter/README.md +3 -0
  97. package/navigation-menu/README.md +2 -1
  98. package/package.json +31 -18
  99. package/portal/README.md +2 -0
  100. package/preview-card/README.md +3 -0
  101. package/schematics/collection.json +1 -0
  102. package/schematics/ng-add/index.d.ts +3 -2
  103. package/schematics/ng-add/index.js +62 -31
  104. package/schematics/ng-add/index.js.map +1 -1
  105. package/schematics/ng-add/package-config.d.ts +4 -2
  106. package/schematics/ng-add/package-config.js +10 -2
  107. package/schematics/ng-add/package-config.js.map +1 -1
  108. package/schematics/ng-add/schema.d.ts +3 -0
  109. package/schematics/ng-add/schema.js +3 -0
  110. package/schematics/ng-add/schema.js.map +1 -0
  111. package/schematics/ng-add/schema.json +14 -0
  112. package/select/README.md +2 -0
  113. package/types/radix-ng-primitives-accordion.d.ts +48 -14
  114. package/types/radix-ng-primitives-alert-dialog.d.ts +95 -38
  115. package/types/radix-ng-primitives-arrow.d.ts +1 -1
  116. package/types/radix-ng-primitives-aspect-ratio.d.ts +1 -1
  117. package/types/radix-ng-primitives-avatar.d.ts +7 -11
  118. package/types/radix-ng-primitives-button.d.ts +73 -0
  119. package/types/radix-ng-primitives-calendar.d.ts +1 -2
  120. package/types/radix-ng-primitives-checkbox.d.ts +201 -32
  121. package/types/radix-ng-primitives-collapsible.d.ts +112 -39
  122. package/types/radix-ng-primitives-collection.d.ts +38 -34
  123. package/types/radix-ng-primitives-config.d.ts +1 -1
  124. package/types/radix-ng-primitives-context-menu.d.ts +60 -116
  125. package/types/radix-ng-primitives-core.d.ts +307 -236
  126. package/types/radix-ng-primitives-cropper.d.ts +2 -2
  127. package/types/radix-ng-primitives-date-field.d.ts +38 -23
  128. package/types/radix-ng-primitives-dialog.d.ts +282 -165
  129. package/types/radix-ng-primitives-dismissable-layer.d.ts +15 -7
  130. package/types/radix-ng-primitives-drawer.d.ts +448 -0
  131. package/types/radix-ng-primitives-editable.d.ts +1 -1
  132. package/types/radix-ng-primitives-field.d.ts +373 -0
  133. package/types/radix-ng-primitives-fieldset.d.ts +48 -0
  134. package/types/radix-ng-primitives-focus-scope.d.ts +13 -5
  135. package/types/radix-ng-primitives-input.d.ts +87 -0
  136. package/types/radix-ng-primitives-label.d.ts +0 -1
  137. package/types/radix-ng-primitives-menu.d.ts +572 -99
  138. package/types/radix-ng-primitives-menubar.d.ts +60 -50
  139. package/types/radix-ng-primitives-meter.d.ts +193 -0
  140. package/types/radix-ng-primitives-navigation-menu.d.ts +422 -340
  141. package/types/radix-ng-primitives-number-field.d.ts +405 -145
  142. package/types/radix-ng-primitives-pagination.d.ts +2 -2
  143. package/types/radix-ng-primitives-popover.d.ts +365 -351
  144. package/types/radix-ng-primitives-popper.d.ts +49 -9
  145. package/types/radix-ng-primitives-portal.d.ts +14 -6
  146. package/types/radix-ng-primitives-presence.d.ts +28 -76
  147. package/types/radix-ng-primitives-preview-card.d.ts +359 -0
  148. package/types/radix-ng-primitives-progress.d.ts +174 -48
  149. package/types/radix-ng-primitives-radio.d.ts +55 -25
  150. package/types/radix-ng-primitives-roving-focus.d.ts +30 -21
  151. package/types/radix-ng-primitives-select.d.ts +475 -177
  152. package/types/radix-ng-primitives-separator.d.ts +7 -32
  153. package/types/radix-ng-primitives-slider.d.ts +315 -201
  154. package/types/radix-ng-primitives-stepper.d.ts +5 -7
  155. package/types/radix-ng-primitives-switch.d.ts +86 -71
  156. package/types/radix-ng-primitives-tabs.d.ts +213 -79
  157. package/types/radix-ng-primitives-time-field.d.ts +42 -27
  158. package/types/radix-ng-primitives-toggle-group.d.ts +85 -164
  159. package/types/radix-ng-primitives-toggle.d.ts +43 -53
  160. package/types/radix-ng-primitives-toolbar.d.ts +163 -38
  161. package/types/radix-ng-primitives-tooltip.d.ts +347 -384
  162. package/types/radix-ng-primitives-visually-hidden.d.ts +19 -19
  163. package/dropdown-menu/README.md +0 -1
  164. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +0 -581
  165. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +0 -1
  166. package/fesm2022/radix-ng-primitives-hover-card.mjs +0 -1238
  167. package/fesm2022/radix-ng-primitives-hover-card.mjs.map +0 -1
  168. package/fesm2022/radix-ng-primitives-select2.mjs +0 -897
  169. package/fesm2022/radix-ng-primitives-select2.mjs.map +0 -1
  170. package/fesm2022/radix-ng-primitives-tooltip2.mjs +0 -735
  171. package/fesm2022/radix-ng-primitives-tooltip2.mjs.map +0 -1
  172. package/hover-card/README.md +0 -3
  173. package/select2/README.md +0 -3
  174. package/tooltip2/README.md +0 -3
  175. package/types/radix-ng-primitives-dropdown-menu.d.ts +0 -171
  176. package/types/radix-ng-primitives-hover-card.d.ts +0 -471
  177. package/types/radix-ng-primitives-select2.d.ts +0 -511
  178. package/types/radix-ng-primitives-tooltip2.d.ts +0 -325
@@ -1,457 +1,173 @@
1
1
  import * as i0 from '@angular/core';
2
- import { booleanAttribute, numberAttribute, Input, Directive, inject, ElementRef, EventEmitter, Output, NgModule } from '@angular/core';
3
- import { CdkContextMenuTrigger, MENU_TRIGGER, MenuStack, MENU_STACK, CdkMenu, CdkMenuItem, CDK_MENU } from '@angular/cdk/menu';
4
- import { outputFromObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
- import { Subject, startWith, pairwise } from 'rxjs';
6
- import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
7
- import * as i1 from '@radix-ng/primitives/separator';
8
- import { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';
2
+ import { inject, Directive, input, booleanAttribute, numberAttribute, DestroyRef, NgModule } from '@angular/core';
3
+ import { createContext } from '@radix-ng/primitives/core';
4
+ import * as i1 from '@radix-ng/primitives/menu';
5
+ import { RdxMenuRoot } from '@radix-ng/primitives/menu';
6
+ import { RdxPopper } from '@radix-ng/primitives/popper';
9
7
 
10
- var ContextMenuSide;
11
- (function (ContextMenuSide) {
12
- ContextMenuSide["Top"] = "top";
13
- ContextMenuSide["Right"] = "right";
14
- ContextMenuSide["Bottom"] = "bottom";
15
- ContextMenuSide["Left"] = "left";
16
- })(ContextMenuSide || (ContextMenuSide = {}));
17
- const ContextMenuPositions = {
18
- top: {
19
- originX: 'start',
20
- originY: 'top',
21
- overlayX: 'start',
22
- overlayY: 'bottom',
23
- offsetX: 0,
24
- offsetY: 0
25
- },
26
- right: {
27
- originX: 'end',
28
- originY: 'top',
29
- overlayX: 'start',
30
- overlayY: 'top',
31
- offsetX: 0,
32
- offsetY: 0
33
- },
34
- bottom: {
35
- originX: 'start',
36
- originY: 'bottom',
37
- overlayX: 'start',
38
- overlayY: 'top',
39
- offsetX: 0,
40
- offsetY: 0
41
- },
42
- left: {
43
- originX: 'start',
44
- originY: 'top',
45
- overlayX: 'end',
46
- overlayY: 'top',
47
- offsetX: 0,
48
- offsetY: 0
49
- }
8
+ const [injectRdxContextMenuRootContext, provideRdxContextMenuRootContext] = createContext('RdxContextMenuRootContext');
9
+ const contextFactory = () => {
10
+ const root = inject(RdxContextMenuRoot);
11
+ return {
12
+ isOpen: root.menuRoot.open,
13
+ disabled: root.menuRoot.disabled,
14
+ openAt: (clientX, clientY, autoFocus) => root.openAt(clientX, clientY, autoFocus),
15
+ close: () => root.menuRoot.close()
16
+ };
50
17
  };
51
- class RdxContextMenuTriggerDirective extends CdkContextMenuTrigger {
52
- constructor() {
53
- super(...arguments);
54
- this.menuPosition = [{ ...ContextMenuPositions[ContextMenuSide.Bottom] }];
55
- this.disabled = false;
56
- this.onOpenChange = outputFromObservable(this.opened);
57
- }
58
- set rdxContextMenuTrigger(value) {
59
- this.menuTemplateRef = value;
60
- }
61
- set alignOffset(value) {
62
- this.defaultPosition.offsetX = value;
63
- }
64
- get defaultPosition() {
65
- return this.menuPosition[0];
66
- }
67
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuTriggerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
68
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.2.9", type: RdxContextMenuTriggerDirective, isStandalone: true, selector: "[rdxContextMenuTrigger]", inputs: { rdxContextMenuTrigger: "rdxContextMenuTrigger", alignOffset: ["alignOffset", "alignOffset", numberAttribute], disabled: ["disabled", "disabled", booleanAttribute] }, outputs: { onOpenChange: "onOpenChange" }, host: { listeners: { "contextmenu": "_openOnContextMenu($event)" }, properties: { "attr.data-state": "isOpen() ? 'open': 'closed'", "attr.data-disabled": "disabled ? '' : null" } }, providers: [
69
- { provide: MENU_TRIGGER, useExisting: RdxContextMenuTriggerDirective },
70
- { provide: MENU_STACK, useClass: MenuStack }
71
- ], usesInheritance: true, ngImport: i0 }); }
72
- }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuTriggerDirective, decorators: [{
74
- type: Directive,
75
- args: [{
76
- selector: '[rdxContextMenuTrigger]',
77
- standalone: true,
78
- host: {
79
- '[attr.data-state]': "isOpen() ? 'open': 'closed'",
80
- '[attr.data-disabled]': "disabled ? '' : null",
81
- '(contextmenu)': '_openOnContextMenu($event)'
82
- },
83
- providers: [
84
- { provide: MENU_TRIGGER, useExisting: RdxContextMenuTriggerDirective },
85
- { provide: MENU_STACK, useClass: MenuStack }
86
- ]
87
- }]
88
- }], propDecorators: { rdxContextMenuTrigger: [{
89
- type: Input
90
- }], alignOffset: [{
91
- type: Input,
92
- args: [{ transform: numberAttribute }]
93
- }], disabled: [{
94
- type: Input,
95
- args: [{ transform: booleanAttribute }]
96
- }], onOpenChange: [{ type: i0.Output, args: ["onOpenChange"] }] } });
97
-
98
- class RdxContextMenuContentDirective extends CdkMenu {
18
+ /**
19
+ * Groups all parts of a context menu. Composes the Menu primitive but, instead of anchoring the
20
+ * popup to a trigger element, anchors it to the pointer position captured by `rdxContextMenuTrigger`.
21
+ *
22
+ * Reuse the Menu popup parts inside it — `rdxMenuPositioner`, `rdxMenuPopup`, `rdxMenuItem`,
23
+ * `rdxMenuCheckboxItem`, `rdxMenuRadioGroup`, `rdxMenuSubTrigger`, `rdxMenuSeparator`, … all behave
24
+ * identically here.
25
+ */
26
+ class RdxContextMenuRoot {
99
27
  constructor() {
100
- super();
101
- this.highlighted = new Subject();
102
- this.menuTrigger = inject(RdxContextMenuTriggerDirective, { optional: true });
103
- this.onEscapeKeyDown = () => undefined;
104
- this.closeOnEscape = true;
105
- this.highlighted.pipe(startWith(null), pairwise(), takeUntilDestroyed()).subscribe(([prev, item]) => {
106
- if (prev) {
107
- prev.highlighted = false;
108
- }
109
- if (item) {
110
- item.highlighted = true;
111
- }
112
- });
113
- }
114
- updateActiveItem(item) {
115
- this.keyManager.updateActiveItem(item);
116
- }
117
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
118
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxContextMenuContentDirective, isStandalone: true, selector: "[rdxContextMenuContent]", inputs: { onEscapeKeyDown: "onEscapeKeyDown", closeOnEscape: "closeOnEscape" }, host: { properties: { "attr.role": "'menu'", "attr.data-state": "menuTrigger?.isOpen() ? 'open': 'closed'", "attr.data-orientation": "orientation" } }, providers: [
119
- {
120
- provide: CdkMenu,
121
- useExisting: RdxContextMenuContentDirective
122
- }
123
- ], usesInheritance: true, ngImport: i0 }); }
28
+ this.menuRoot = inject(RdxMenuRoot);
29
+ this.popper = inject(RdxPopper);
30
+ }
31
+ /**
32
+ * Open the menu with the popup anchored at the given viewport coordinates.
33
+ *
34
+ * `autoFocus` defaults to `'popup'` so a right-click opens with the popup focused but no item
35
+ * highlighted (matching Base UI's pointer behavior). Pass `'first'` for keyboard opening.
36
+ */
37
+ openAt(clientX, clientY, autoFocus = 'popup') {
38
+ if (this.menuRoot.disabled()) {
39
+ return;
40
+ }
41
+ const anchor = {
42
+ getBoundingClientRect: () => ({
43
+ width: 0,
44
+ height: 0,
45
+ x: clientX,
46
+ y: clientY,
47
+ top: clientY,
48
+ left: clientX,
49
+ right: clientX,
50
+ bottom: clientY,
51
+ toJSON: () => ({})
52
+ })
53
+ };
54
+ this.popper.anchorOverride.set(anchor);
55
+ // Move focus into the popup so keyboard navigation and outside-dismiss work immediately.
56
+ this.menuRoot.show(autoFocus);
57
+ }
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
59
+ 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 }); }
124
60
  }
125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuContentDirective, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuRoot, decorators: [{
126
62
  type: Directive,
127
63
  args: [{
128
- selector: '[rdxContextMenuContent]',
129
- standalone: true,
130
- host: {
131
- '[attr.role]': "'menu'",
132
- '[attr.data-state]': "menuTrigger?.isOpen() ? 'open': 'closed'",
133
- '[attr.data-orientation]': 'orientation'
134
- },
135
- providers: [
64
+ selector: '[rdxContextMenuRoot]',
65
+ exportAs: 'rdxContextMenuRoot',
66
+ hostDirectives: [
136
67
  {
137
- provide: CdkMenu,
138
- useExisting: RdxContextMenuContentDirective
68
+ directive: RdxMenuRoot,
69
+ inputs: ['open', 'modal', 'loopFocus', 'highlightItemOnHover'],
70
+ outputs: ['openChange', 'onOpenChange', 'onOpenChangeComplete']
139
71
  }
140
- ]
72
+ ],
73
+ providers: [provideRdxContextMenuRootContext(contextFactory)]
141
74
  }]
142
- }], ctorParameters: () => [], propDecorators: { onEscapeKeyDown: [{
143
- type: Input
144
- }], closeOnEscape: [{
145
- type: Input
146
- }] } });
75
+ }] });
147
76
 
148
- class RdxContextMenuItemDirective extends CdkMenuItem {
77
+ /**
78
+ * An area that opens the context menu on right click (or a touch long-press).
79
+ *
80
+ * Apply it to the element that should respond to the context-menu gesture; the popup is positioned
81
+ * at the pointer, not against this element.
82
+ */
83
+ class RdxContextMenuTrigger {
149
84
  constructor() {
150
- super();
151
- this.menu = inject(RdxContextMenuContentDirective);
152
- this.nativeElement = inject(ElementRef).nativeElement;
153
- this.highlighted = false;
154
- this.disabled = false;
155
- this.onSelect = new EventEmitter();
156
- this.menu.highlighted.pipe(takeUntilDestroyed()).subscribe((value) => {
157
- if (value !== this) {
158
- this.highlighted = false;
159
- }
160
- });
161
- this.triggered.subscribe(this.onSelect);
162
- }
163
- onPointerMove() {
164
- this.nativeElement.focus({ preventScroll: true });
165
- this.menu.updateActiveItem(this);
166
- }
167
- onKeydown(event) {
168
- if (this.nativeElement.tagName !== 'BUTTON' && ['Enter', ' '].includes(event.key)) {
169
- event.preventDefault();
85
+ this.rootContext = injectRdxContextMenuRootContext();
86
+ /** Whether the trigger is disabled. */
87
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
88
+ /** How long (ms) a touch must be held before the menu opens. */
89
+ this.longPressDelay = input(500, { ...(ngDevMode ? { debugName: "longPressDelay" } : /* istanbul ignore next */ {}), transform: numberAttribute });
90
+ this.lastPointerDownTime = 0;
91
+ inject(DestroyRef).onDestroy(() => this.cancelLongPress());
92
+ }
93
+ onContextMenu(event) {
94
+ if (this.disabled()) {
95
+ return;
170
96
  }
171
- if (event.key === 'Escape') {
172
- if (!this.menu.closeOnEscape) {
173
- event.stopPropagation();
174
- }
175
- else {
176
- this.menu.onEscapeKeyDown(event);
177
- }
97
+ // Suppress the native context menu and open ours at the pointer.
98
+ event.preventDefault();
99
+ this.cancelLongPress();
100
+ // A keyboard-initiated context menu (e.g. the Menu key / Shift+F10) is not preceded by a
101
+ // pointerdown, so it opens with the first item highlighted; a pointer opens the popup
102
+ // without highlighting an item.
103
+ const fromKeyboard = event.timeStamp - this.lastPointerDownTime > 300;
104
+ this.rootContext.openAt(event.clientX, event.clientY, fromKeyboard ? 'first' : 'popup');
105
+ }
106
+ onPointerDown(event) {
107
+ this.lastPointerDownTime = event.timeStamp;
108
+ if (this.disabled() || event.pointerType !== 'touch') {
109
+ return;
178
110
  }
179
- }
180
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
181
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.2.9", type: RdxContextMenuItemDirective, isStandalone: true, selector: "[rdxContextMenuItem]", inputs: { disabled: ["disabled", "disabled", booleanAttribute] }, outputs: { onSelect: "onSelect" }, host: { attributes: { "type": "button" }, listeners: { "pointermove": "onPointerMove()", "focus": "menu.highlighted.next(this)", "keydown": "onKeydown($event)" }, properties: { "attr.data-orientation": "\"vertical\"", "attr.data-highlighted": "highlighted ? \"\" : null", "attr.data-disabled": "disabled ? \"\" : null", "attr.disabled": "disabled ? \"\" : null" } }, providers: [
182
- { provide: CdkMenuItem, useExisting: RdxContextMenuItemDirective },
183
- { provide: CDK_MENU, useExisting: RdxContextMenuContentDirective }
184
- ], usesInheritance: true, ngImport: i0 }); }
185
- }
186
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuItemDirective, decorators: [{
187
- type: Directive,
188
- args: [{
189
- selector: '[rdxContextMenuItem]',
190
- standalone: true,
191
- host: {
192
- type: 'button',
193
- '[attr.data-orientation]': '"vertical"',
194
- '[attr.data-highlighted]': 'highlighted ? "" : null',
195
- '[attr.data-disabled]': 'disabled ? "" : null',
196
- '[attr.disabled]': 'disabled ? "" : null',
197
- '(pointermove)': 'onPointerMove()',
198
- '(focus)': 'menu.highlighted.next(this)',
199
- '(keydown)': 'onKeydown($event)'
200
- },
201
- providers: [
202
- { provide: CdkMenuItem, useExisting: RdxContextMenuItemDirective },
203
- { provide: CDK_MENU, useExisting: RdxContextMenuContentDirective }
204
- ]
205
- }]
206
- }], ctorParameters: () => [], propDecorators: { disabled: [{
207
- type: Input,
208
- args: [{ transform: booleanAttribute }]
209
- }], onSelect: [{
210
- type: Output
211
- }] } });
212
-
213
- /** Base class providing checked state for selectable ContextMenuItems. */
214
- class RdxContextMenuSelectable extends RdxContextMenuItemDirective {
215
- constructor() {
216
- super(...arguments);
217
- /** Whether the element is checked */
218
- this.checked = false;
219
- this.checkedChange = new EventEmitter();
220
- }
221
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuSelectable, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
222
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.2.9", type: RdxContextMenuSelectable, isStandalone: true, inputs: { checked: ["checked", "checked", booleanAttribute] }, outputs: { checkedChange: "checkedChange" }, host: { properties: { "attr.aria-checked": "!!checked", "attr.aria-disabled": "disabled || null", "attr.data-state": "checked ? \"checked\" : \"unchecked\"" } }, usesInheritance: true, ngImport: i0 }); }
223
- }
224
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuSelectable, decorators: [{
225
- type: Directive,
226
- args: [{
227
- standalone: true,
228
- host: {
229
- '[attr.aria-checked]': '!!checked',
230
- '[attr.aria-disabled]': 'disabled || null',
231
- '[attr.data-state]': 'checked ? "checked" : "unchecked"'
232
- }
233
- }]
234
- }], propDecorators: { checked: [{
235
- type: Input,
236
- args: [{ transform: booleanAttribute }]
237
- }], checkedChange: [{
238
- type: Output
239
- }] } });
240
-
241
- class RdxContextMenuItemCheckboxDirective extends RdxContextMenuSelectable {
242
- trigger(options) {
243
- if (!this.disabled) {
244
- this.checked = !this.checked;
245
- this.checkedChange.emit(this.checked);
111
+ const { clientX, clientY } = event;
112
+ this.longPressOrigin = { x: clientX, y: clientY };
113
+ this.cancelLongPress();
114
+ this.longPressTimer = setTimeout(() => {
115
+ this.longPressTimer = undefined;
116
+ this.rootContext.openAt(clientX, clientY);
117
+ }, this.longPressDelay());
118
+ }
119
+ onPointerMove(event) {
120
+ // A finger that drifts more than ~10px is a scroll/drag, not a long-press.
121
+ if (!this.longPressOrigin) {
122
+ return;
123
+ }
124
+ const dx = event.clientX - this.longPressOrigin.x;
125
+ const dy = event.clientY - this.longPressOrigin.y;
126
+ if (Math.hypot(dx, dy) > 10) {
127
+ this.cancelLongPress();
246
128
  }
247
- super.trigger(options);
248
- }
249
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuItemCheckboxDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
250
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxContextMenuItemCheckboxDirective, isStandalone: true, selector: "[rdxContextMenuItemCheckbox]", host: { attributes: { "role": "menuitemcheckbox" } }, providers: [
251
- { provide: RdxContextMenuSelectable, useExisting: RdxContextMenuItemCheckboxDirective },
252
- { provide: RdxContextMenuItemDirective, useExisting: RdxContextMenuSelectable },
253
- { provide: CdkMenuItem, useExisting: RdxContextMenuItemDirective },
254
- { provide: CDK_MENU, useExisting: RdxContextMenuContentDirective }
255
- ], usesInheritance: true, ngImport: i0 }); }
256
- }
257
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuItemCheckboxDirective, decorators: [{
258
- type: Directive,
259
- args: [{
260
- selector: '[rdxContextMenuItemCheckbox]',
261
- standalone: true,
262
- host: {
263
- role: 'menuitemcheckbox'
264
- },
265
- providers: [
266
- { provide: RdxContextMenuSelectable, useExisting: RdxContextMenuItemCheckboxDirective },
267
- { provide: RdxContextMenuItemDirective, useExisting: RdxContextMenuSelectable },
268
- { provide: CdkMenuItem, useExisting: RdxContextMenuItemDirective },
269
- { provide: CDK_MENU, useExisting: RdxContextMenuContentDirective }
270
- ]
271
- }]
272
- }] });
273
-
274
- class RdxContextMenuItemIndicatorDirective {
275
- constructor() {
276
- this.item = inject(RdxContextMenuSelectable);
277
- }
278
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuItemIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
279
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxContextMenuItemIndicatorDirective, isStandalone: true, selector: "[rdxContextMenuItemIndicator]", host: { properties: { "style.display": "item.checked ? 'block' : 'none'", "attr.data-state": "item.checked ? 'checked' : 'unchecked'" } }, ngImport: i0 }); }
280
- }
281
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuItemIndicatorDirective, decorators: [{
282
- type: Directive,
283
- args: [{
284
- selector: '[rdxContextMenuItemIndicator]',
285
- standalone: true,
286
- host: {
287
- '[style.display]': "item.checked ? 'block' : 'none'",
288
- '[attr.data-state]': "item.checked ? 'checked' : 'unchecked'"
289
- }
290
- }]
291
- }] });
292
-
293
- class RdxContextMenuItemRadioGroupDirective {
294
- constructor() {
295
- this.selectionDispatcher = inject(UniqueSelectionDispatcher);
296
- this._value = null;
297
- this.valueChange = new EventEmitter();
298
- }
299
- set value(value) {
300
- this._value = value;
301
- }
302
- get value() {
303
- return this._value;
304
- }
305
- ngAfterContentInit() {
306
- this.selectionDispatcher.notify(this.value, '');
307
- }
308
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuItemRadioGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
309
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxContextMenuItemRadioGroupDirective, isStandalone: true, selector: "[rdxContextMenuItemRadioGroup]", inputs: { value: "value" }, outputs: { valueChange: "valueChange" }, host: { attributes: { "role": "group" } }, providers: [{ provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }], ngImport: i0 }); }
310
- }
311
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuItemRadioGroupDirective, decorators: [{
312
- type: Directive,
313
- args: [{
314
- selector: '[rdxContextMenuItemRadioGroup]',
315
- standalone: true,
316
- host: {
317
- role: 'group'
318
- },
319
- providers: [{ provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }]
320
- }]
321
- }], propDecorators: { value: [{
322
- type: Input
323
- }], valueChange: [{
324
- type: Output
325
- }] } });
326
-
327
- /** Counter used to set a unique id and name for a selectable item */
328
- let nextId = 0;
329
- class RdxContextMenuItemRadioDirective extends RdxContextMenuSelectable {
330
- get value() {
331
- return this._value || this.id;
332
- }
333
- set value(value) {
334
- this._value = value;
335
- }
336
- constructor() {
337
- super();
338
- /** The unique selection dispatcher for this radio's `RdxContextMenuItemRadioGroupDirective`. */
339
- this.selectionDispatcher = inject(UniqueSelectionDispatcher);
340
- this.group = inject(RdxContextMenuItemRadioGroupDirective);
341
- /** An ID to identify this radio item to the `UniqueSelectionDispatcher`. */
342
- this.id = `${nextId++}`;
343
- this.triggered.subscribe(() => {
344
- if (!this.disabled) {
345
- this.selectionDispatcher.notify(this.value, '');
346
- this.group.valueChange.emit(this.value);
347
- }
348
- });
349
- }
350
- ngAfterContentInit() {
351
- this.removeDispatcherListener = this.selectionDispatcher.listen((id) => {
352
- this.checked = this.value === id;
353
- });
354
129
  }
355
- ngOnDestroy() {
356
- super.ngOnDestroy();
357
- this.removeDispatcherListener();
130
+ cancelLongPress() {
131
+ clearTimeout(this.longPressTimer);
132
+ this.longPressTimer = undefined;
133
+ this.longPressOrigin = undefined;
358
134
  }
359
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuItemRadioDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
360
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxContextMenuItemRadioDirective, isStandalone: true, selector: "[rdxContextMenuItemRadio]", inputs: { value: "value" }, host: { attributes: { "role": "menuitemradio" } }, providers: [
361
- { provide: RdxContextMenuSelectable, useExisting: RdxContextMenuItemRadioDirective },
362
- { provide: RdxContextMenuItemDirective, useExisting: RdxContextMenuSelectable },
363
- { provide: CdkMenuItem, useExisting: RdxContextMenuItemDirective },
364
- { provide: CDK_MENU, useExisting: RdxContextMenuContentDirective }
365
- ], usesInheritance: true, ngImport: i0 }); }
366
- }
367
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuItemRadioDirective, decorators: [{
368
- type: Directive,
369
- args: [{
370
- selector: '[rdxContextMenuItemRadio]',
371
- standalone: true,
372
- host: {
373
- role: 'menuitemradio'
374
- },
375
- providers: [
376
- { provide: RdxContextMenuSelectable, useExisting: RdxContextMenuItemRadioDirective },
377
- { provide: RdxContextMenuItemDirective, useExisting: RdxContextMenuSelectable },
378
- { provide: CdkMenuItem, useExisting: RdxContextMenuItemDirective },
379
- { provide: CDK_MENU, useExisting: RdxContextMenuContentDirective }
380
- ]
381
- }]
382
- }], ctorParameters: () => [], propDecorators: { value: [{
383
- type: Input
384
- }] } });
385
-
386
- class RdxContextMenuLabelDirective {
387
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
388
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxContextMenuLabelDirective, isStandalone: true, selector: "[rdxContextMenuLabel]", ngImport: i0 }); }
135
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
136
+ 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 }); }
389
137
  }
390
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuLabelDirective, decorators: [{
138
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuTrigger, decorators: [{
391
139
  type: Directive,
392
140
  args: [{
393
- selector: '[rdxContextMenuLabel]',
394
- standalone: true
395
- }]
396
- }] });
397
-
398
- class RdxContextMenuSeparatorDirective {
399
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuSeparatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
400
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxContextMenuSeparatorDirective, isStandalone: true, selector: "[rdxContextMenuSeparator]", host: { attributes: { "role": "separator" }, properties: { "attr.aria-orientation": "'horizontal'" } }, hostDirectives: [{ directive: i1.RdxSeparatorRootDirective }], ngImport: i0 }); }
401
- }
402
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuSeparatorDirective, decorators: [{
403
- type: Directive,
404
- args: [{
405
- selector: '[rdxContextMenuSeparator]',
406
- standalone: true,
407
- hostDirectives: [RdxSeparatorRootDirective],
141
+ selector: '[rdxContextMenuTrigger]',
142
+ exportAs: 'rdxContextMenuTrigger',
408
143
  host: {
409
- role: 'separator',
410
- '[attr.aria-orientation]': "'horizontal'"
144
+ '[attr.data-state]': 'rootContext.isOpen() ? "open" : "closed"',
145
+ '[attr.data-disabled]': 'disabled() ? "" : undefined',
146
+ '(contextmenu)': 'onContextMenu($event)',
147
+ '(pointerdown)': 'onPointerDown($event)',
148
+ '(pointermove)': 'onPointerMove($event)',
149
+ '(pointerup)': 'cancelLongPress()',
150
+ '(pointercancel)': 'cancelLongPress()',
151
+ '(pointerleave)': 'cancelLongPress()'
411
152
  }
412
153
  }]
413
- }] });
154
+ }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], longPressDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "longPressDelay", required: false }] }] } });
414
155
 
415
- const _imports = [
416
- RdxContextMenuContentDirective,
417
- RdxContextMenuSelectable,
418
- RdxContextMenuItemCheckboxDirective,
419
- RdxContextMenuItemDirective,
420
- RdxContextMenuItemRadioGroupDirective,
421
- RdxContextMenuItemIndicatorDirective,
422
- RdxContextMenuItemRadioDirective,
423
- RdxContextMenuLabelDirective,
424
- RdxContextMenuSeparatorDirective,
425
- RdxContextMenuTriggerDirective
426
- ];
156
+ /**
157
+ * Context-menu-specific parts. The popup, items, checkbox/radio, submenus, separators, etc. come
158
+ * from `@radix-ng/primitives/menu` (`RdxMenuModule`) and behave identically inside a context menu.
159
+ */
160
+ const contextMenuImports = [RdxContextMenuRoot, RdxContextMenuTrigger];
427
161
  class RdxContextMenuModule {
428
162
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
429
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuModule, imports: [RdxContextMenuContentDirective,
430
- RdxContextMenuSelectable,
431
- RdxContextMenuItemCheckboxDirective,
432
- RdxContextMenuItemDirective,
433
- RdxContextMenuItemRadioGroupDirective,
434
- RdxContextMenuItemIndicatorDirective,
435
- RdxContextMenuItemRadioDirective,
436
- RdxContextMenuLabelDirective,
437
- RdxContextMenuSeparatorDirective,
438
- RdxContextMenuTriggerDirective], exports: [RdxContextMenuContentDirective,
439
- RdxContextMenuSelectable,
440
- RdxContextMenuItemCheckboxDirective,
441
- RdxContextMenuItemDirective,
442
- RdxContextMenuItemRadioGroupDirective,
443
- RdxContextMenuItemIndicatorDirective,
444
- RdxContextMenuItemRadioDirective,
445
- RdxContextMenuLabelDirective,
446
- RdxContextMenuSeparatorDirective,
447
- RdxContextMenuTriggerDirective] }); }
163
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuModule, imports: [RdxContextMenuRoot, RdxContextMenuTrigger], exports: [RdxContextMenuRoot, RdxContextMenuTrigger] }); }
448
164
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuModule }); }
449
165
  }
450
166
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxContextMenuModule, decorators: [{
451
167
  type: NgModule,
452
168
  args: [{
453
- imports: [..._imports],
454
- exports: [..._imports]
169
+ imports: [...contextMenuImports],
170
+ exports: [...contextMenuImports]
455
171
  }]
456
172
  }] });
457
173
 
@@ -459,5 +175,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
459
175
  * Generated bundle index. Do not edit.
460
176
  */
461
177
 
462
- export { ContextMenuSide, RdxContextMenuContentDirective, RdxContextMenuItemCheckboxDirective, RdxContextMenuItemDirective, RdxContextMenuItemIndicatorDirective, RdxContextMenuItemRadioDirective, RdxContextMenuItemRadioGroupDirective, RdxContextMenuLabelDirective, RdxContextMenuModule, RdxContextMenuSelectable, RdxContextMenuSeparatorDirective, RdxContextMenuTriggerDirective };
178
+ export { RdxContextMenuModule, RdxContextMenuRoot, RdxContextMenuTrigger, injectRdxContextMenuRootContext, provideRdxContextMenuRootContext };
463
179
  //# sourceMappingURL=radix-ng-primitives-context-menu.mjs.map