@radix-ng/primitives 0.8.1 → 0.9.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 (179) hide show
  1. package/accordion/index.d.ts +3 -3
  2. package/accordion/src/accordion-content.directive.d.ts +1 -1
  3. package/accordion/src/accordion-header.directive.d.ts +1 -1
  4. package/accordion/src/accordion-item.directive.d.ts +1 -1
  5. package/accordion/src/accordion-root.directive.d.ts +1 -1
  6. package/accordion/src/accordion-trigger.directive.d.ts +1 -1
  7. package/alert-dialog/index.d.ts +2 -2
  8. package/avatar/index.d.ts +2 -2
  9. package/avatar/src/avatar-fallback.directive.d.ts +3 -3
  10. package/avatar/src/avatar-image.directive.d.ts +6 -6
  11. package/avatar/src/avatar-root.directive.d.ts +4 -4
  12. package/checkbox/index.d.ts +2 -0
  13. package/checkbox/src/checkbox-button.directive.d.ts +8 -0
  14. package/checkbox/src/checkbox-indicator.directive.d.ts +1 -1
  15. package/checkbox/src/checkbox-input.directive.d.ts +9 -0
  16. package/checkbox/src/checkbox.directive.d.ts +7 -5
  17. package/collapsible/index.d.ts +1 -1
  18. package/collapsible/src/collapsible-content.directive.d.ts +1 -1
  19. package/collapsible/src/collapsible-root.directive.d.ts +1 -1
  20. package/collapsible/src/collapsible-trigger.directive.d.ts +1 -1
  21. package/dropdown-menu/index.d.ts +8 -3
  22. package/dropdown-menu/src/dropdown-menu-content.directive.d.ts +12 -2
  23. package/dropdown-menu/src/dropdown-menu-item-checkbox.directive.d.ts +6 -0
  24. package/dropdown-menu/src/dropdown-menu-item-indicator.directive.d.ts +7 -0
  25. package/dropdown-menu/src/dropdown-menu-item-radio-group.directive.d.ts +12 -0
  26. package/dropdown-menu/src/dropdown-menu-item-radio.directive.d.ts +19 -0
  27. package/dropdown-menu/src/dropdown-menu-item-selectable.d.ts +14 -0
  28. package/dropdown-menu/src/dropdown-menu-item.directive.d.ts +13 -4
  29. package/dropdown-menu/src/dropdown-menu-label.directive.d.ts +1 -1
  30. package/dropdown-menu/src/dropdown-menu-separator.directive.d.ts +2 -2
  31. package/dropdown-menu/src/dropdown-menu-trigger.directive.d.ts +33 -2
  32. package/esm2022/accordion/index.mjs +4 -4
  33. package/esm2022/accordion/src/accordion-content.directive.mjs +7 -9
  34. package/esm2022/accordion/src/accordion-header.directive.mjs +5 -5
  35. package/esm2022/accordion/src/accordion-item.directive.mjs +17 -9
  36. package/esm2022/accordion/src/accordion-root.directive.mjs +5 -5
  37. package/esm2022/accordion/src/accordion-trigger.directive.mjs +5 -5
  38. package/esm2022/alert-dialog/index.mjs +3 -3
  39. package/esm2022/alert-dialog/src/alert-dialog-cancel.directive.mjs +4 -4
  40. package/esm2022/alert-dialog/src/alert-dialog-content.directive.mjs +3 -3
  41. package/esm2022/alert-dialog/src/alert-dialog-root.directive.mjs +5 -4
  42. package/esm2022/alert-dialog/src/alert-dialog-title.directive.mjs +3 -3
  43. package/esm2022/alert-dialog/src/alert-dialog-trigger.directive.mjs +4 -4
  44. package/esm2022/alert-dialog/src/alert-dialog.service.mjs +6 -9
  45. package/esm2022/avatar/index.mjs +1 -1
  46. package/esm2022/avatar/src/avatar-fallback.directive.mjs +6 -6
  47. package/esm2022/avatar/src/avatar-image.directive.mjs +6 -6
  48. package/esm2022/avatar/src/avatar-root.directive.mjs +6 -6
  49. package/esm2022/checkbox/index.mjs +3 -1
  50. package/esm2022/checkbox/src/checkbox-button.directive.mjs +33 -0
  51. package/esm2022/checkbox/src/checkbox-indicator.directive.mjs +6 -5
  52. package/esm2022/checkbox/src/checkbox-input.directive.mjs +41 -0
  53. package/esm2022/checkbox/src/checkbox.directive.mjs +18 -22
  54. package/esm2022/checkbox/src/checkbox.token.mjs +1 -1
  55. package/esm2022/collapsible/index.mjs +2 -2
  56. package/esm2022/collapsible/src/collapsible-content.directive.mjs +13 -7
  57. package/esm2022/collapsible/src/collapsible-root.directive.mjs +5 -5
  58. package/esm2022/collapsible/src/collapsible-trigger.directive.mjs +5 -5
  59. package/esm2022/dropdown-menu/index.mjs +9 -4
  60. package/esm2022/dropdown-menu/src/dropdown-menu-content.directive.mjs +36 -10
  61. package/esm2022/dropdown-menu/src/dropdown-menu-item-checkbox.directive.mjs +26 -0
  62. package/esm2022/dropdown-menu/src/dropdown-menu-item-indicator.directive.mjs +22 -0
  63. package/esm2022/dropdown-menu/src/dropdown-menu-item-radio-group.directive.mjs +37 -0
  64. package/esm2022/dropdown-menu/src/dropdown-menu-item-radio.directive.mjs +60 -0
  65. package/esm2022/dropdown-menu/src/dropdown-menu-item-selectable.mjs +40 -0
  66. package/esm2022/dropdown-menu/src/dropdown-menu-item.directive.mjs +45 -13
  67. package/esm2022/dropdown-menu/src/dropdown-menu-label.directive.mjs +5 -5
  68. package/esm2022/dropdown-menu/src/dropdown-menu-separator.directive.mjs +8 -8
  69. package/esm2022/dropdown-menu/src/dropdown-menu-trigger.directive.mjs +134 -12
  70. package/esm2022/label/index.mjs +2 -2
  71. package/esm2022/label/src/label.directive.mjs +54 -0
  72. package/esm2022/menu/index.mjs +7 -7
  73. package/esm2022/menu/src/menu-content.directive.mjs +3 -3
  74. package/esm2022/menu/src/menu-directive.mjs +3 -3
  75. package/esm2022/menu/src/menu-group.directive.mjs +3 -3
  76. package/esm2022/menu/src/menu-item.directive.mjs +8 -4
  77. package/esm2022/menu/src/menu-label.directive.mjs +3 -3
  78. package/esm2022/menu/src/menu-separator.directive.mjs +4 -4
  79. package/esm2022/menubar/index.mjs +7 -7
  80. package/esm2022/menubar/src/menubar-content.directive.mjs +3 -3
  81. package/esm2022/menubar/src/menubar-item-checkbox.directive.mjs +4 -4
  82. package/esm2022/menubar/src/menubar-item-indicator.directive.mjs +3 -3
  83. package/esm2022/menubar/src/menubar-item-radio.directive.mjs +4 -4
  84. package/esm2022/menubar/src/menubar-item.directive.mjs +4 -4
  85. package/esm2022/menubar/src/menubar-radio-group.directive.mjs +3 -3
  86. package/esm2022/menubar/src/menubar-root.directive.mjs +3 -3
  87. package/esm2022/menubar/src/menubar-separator.directive.mjs +4 -4
  88. package/esm2022/menubar/src/menubar-trigger.directive.mjs +4 -4
  89. package/esm2022/progress/src/progress-indicator.directive.mjs +19 -9
  90. package/esm2022/progress/src/progress-root.directive.mjs +63 -7
  91. package/esm2022/radio/src/radio-indicator.directive.mjs +4 -4
  92. package/esm2022/radio/src/radio-item.directive.mjs +4 -8
  93. package/esm2022/radio/src/radio-root.directive.mjs +5 -9
  94. package/esm2022/separator/src/separator.directive.mjs +3 -3
  95. package/esm2022/switch/index.mjs +29 -3
  96. package/esm2022/switch/src/switch-input.directive.mjs +12 -10
  97. package/esm2022/switch/src/switch-root.directive.mjs +47 -23
  98. package/esm2022/switch/src/switch-thumb.directive.mjs +7 -7
  99. package/esm2022/tabs/index.mjs +7 -7
  100. package/esm2022/tabs/src/tabs-content.directive.mjs +7 -5
  101. package/esm2022/tabs/src/tabs-context.service.mjs +3 -3
  102. package/esm2022/tabs/src/tabs-list.directive.mjs +5 -5
  103. package/esm2022/tabs/src/tabs-root.directive.mjs +5 -5
  104. package/esm2022/tabs/src/tabs-trigger.directive.mjs +5 -5
  105. package/esm2022/toggle/index.mjs +2 -2
  106. package/esm2022/toggle/src/toggle.directive.mjs +39 -0
  107. package/esm2022/toggle-group/src/toggle-group-button.directive.mjs +14 -13
  108. package/esm2022/toggle-group/src/toggle-group-button.token.mjs +1 -1
  109. package/esm2022/toggle-group/src/toggle-group-multi.directive.mjs +18 -34
  110. package/esm2022/toggle-group/src/toggle-group.directive.mjs +5 -25
  111. package/esm2022/toggle-group/src/toggle-group.token.mjs +1 -1
  112. package/fesm2022/radix-ng-primitives-accordion.mjs +73 -67
  113. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  114. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +49 -51
  115. package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
  116. package/fesm2022/radix-ng-primitives-avatar.mjs +15 -15
  117. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  118. package/fesm2022/radix-ng-primitives-checkbox.mjs +91 -26
  119. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  120. package/fesm2022/radix-ng-primitives-collapsible.mjs +20 -14
  121. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
  122. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +386 -42
  123. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +1 -1
  124. package/fesm2022/radix-ng-primitives-label.mjs +22 -16
  125. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  126. package/fesm2022/radix-ng-primitives-menu.mjs +26 -22
  127. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  128. package/fesm2022/radix-ng-primitives-menubar.mjs +31 -31
  129. package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
  130. package/fesm2022/radix-ng-primitives-progress.mjs +80 -14
  131. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  132. package/fesm2022/radix-ng-primitives-radio.mjs +10 -14
  133. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  134. package/fesm2022/radix-ng-primitives-separator.mjs +3 -3
  135. package/fesm2022/radix-ng-primitives-switch.mjs +94 -46
  136. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  137. package/fesm2022/radix-ng-primitives-tabs.mjs +25 -23
  138. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  139. package/fesm2022/radix-ng-primitives-toggle-group.mjs +34 -65
  140. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  141. package/fesm2022/radix-ng-primitives-toggle.mjs +18 -28
  142. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  143. package/label/index.d.ts +1 -1
  144. package/label/src/label.directive.d.ts +23 -0
  145. package/menu/index.d.ts +2 -2
  146. package/menubar/index.d.ts +2 -2
  147. package/package.json +1 -7
  148. package/progress/src/progress-indicator.directive.d.ts +12 -2
  149. package/progress/src/progress-root.directive.d.ts +38 -4
  150. package/radio/src/radio-item.directive.d.ts +1 -2
  151. package/radio/src/radio-root.directive.d.ts +1 -2
  152. package/switch/index.d.ts +11 -2
  153. package/switch/src/switch-input.directive.d.ts +1 -1
  154. package/switch/src/switch-root.directive.d.ts +26 -9
  155. package/switch/src/switch-thumb.directive.d.ts +1 -1
  156. package/tabs/index.d.ts +2 -2
  157. package/tabs/src/tabs-content.directive.d.ts +1 -1
  158. package/tabs/src/tabs-list.directive.d.ts +1 -1
  159. package/tabs/src/tabs-root.directive.d.ts +1 -1
  160. package/tabs/src/tabs-trigger.directive.d.ts +1 -1
  161. package/toggle/index.d.ts +2 -2
  162. package/toggle/src/toggle.directive.d.ts +30 -0
  163. package/toggle-group/src/toggle-group-button.directive.d.ts +9 -6
  164. package/toggle-group/src/toggle-group-multi.directive.d.ts +18 -15
  165. package/toggle-group/src/toggle-group.directive.d.ts +3 -9
  166. package/esm2022/label/src/label-root.directive.mjs +0 -48
  167. package/esm2022/roving-focus/index.mjs +0 -3
  168. package/esm2022/roving-focus/radix-ng-primitives-roving-focus.mjs +0 -5
  169. package/esm2022/roving-focus/src/roving-focus-group.directive.mjs +0 -109
  170. package/esm2022/roving-focus/src/roving-focus-item.directive.mjs +0 -86
  171. package/esm2022/toggle/src/toggle-root.directive.mjs +0 -49
  172. package/fesm2022/radix-ng-primitives-roving-focus.mjs +0 -198
  173. package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +0 -1
  174. package/label/src/label-root.directive.d.ts +0 -13
  175. package/roving-focus/README.md +0 -1
  176. package/roving-focus/index.d.ts +0 -2
  177. package/roving-focus/src/roving-focus-group.directive.d.ts +0 -53
  178. package/roving-focus/src/roving-focus-item.directive.d.ts +0 -50
  179. package/toggle/src/toggle-root.directive.d.ts +0 -32
@@ -1,116 +1,460 @@
1
1
  import * as i1 from '@angular/cdk/menu';
2
- import { CdkMenuTrigger } from '@angular/cdk/menu';
2
+ import { CdkMenuTrigger, CdkMenu, CdkTargetMenuAim, CdkMenuItem } from '@angular/cdk/menu';
3
3
  import * as i0 from '@angular/core';
4
- import { inject, input, booleanAttribute, Directive } from '@angular/core';
5
- import * as i1$1 from '@radix-ng/primitives/menu';
6
- import { RdxMenuItemDirective, RdxMenuSeparatorDirective, RdxMenuContentDirective } from '@radix-ng/primitives/menu';
4
+ import { inject, input, booleanAttribute, numberAttribute, Directive, Input, ElementRef, EventEmitter, Output } from '@angular/core';
5
+ import { Subject, startWith, pairwise } from 'rxjs';
6
+ import { outputFromObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
7
+ import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
8
+ import * as i1$1 from '@radix-ng/primitives/separator';
9
+ import { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';
7
10
 
11
+ var DropdownSide;
12
+ (function (DropdownSide) {
13
+ DropdownSide["Top"] = "top";
14
+ DropdownSide["Right"] = "right";
15
+ DropdownSide["Bottom"] = "bottom";
16
+ DropdownSide["Left"] = "left";
17
+ })(DropdownSide || (DropdownSide = {}));
18
+ var DropdownAlign;
19
+ (function (DropdownAlign) {
20
+ DropdownAlign["Start"] = "start";
21
+ DropdownAlign["Center"] = "center";
22
+ DropdownAlign["End"] = "end";
23
+ })(DropdownAlign || (DropdownAlign = {}));
24
+ const mapRdxAlignToCdkPosition = {
25
+ start: 'top',
26
+ center: 'center',
27
+ end: 'bottom'
28
+ };
29
+ const dropdownPositions = {
30
+ top: {
31
+ originX: 'start',
32
+ originY: 'top',
33
+ overlayX: 'start',
34
+ overlayY: 'bottom',
35
+ offsetX: 0,
36
+ offsetY: 0
37
+ },
38
+ right: {
39
+ originX: 'end',
40
+ originY: 'top',
41
+ overlayX: 'start',
42
+ overlayY: 'top',
43
+ offsetX: 0,
44
+ offsetY: 0
45
+ },
46
+ bottom: {
47
+ originX: 'start',
48
+ originY: 'bottom',
49
+ overlayX: 'start',
50
+ overlayY: 'top',
51
+ offsetX: 0,
52
+ offsetY: 0
53
+ },
54
+ left: {
55
+ originX: 'start',
56
+ originY: 'top',
57
+ overlayX: 'end',
58
+ overlayY: 'top',
59
+ offsetX: 0,
60
+ offsetY: 0
61
+ }
62
+ };
8
63
  class RdxDropdownMenuTriggerDirective {
64
+ set side(value) {
65
+ if (!Object.values(DropdownSide).includes(value)) {
66
+ throw new Error(`Unknown side: ${value}`);
67
+ }
68
+ this._side = value;
69
+ this.cdkMenuTrigger.menuPosition[0] = dropdownPositions[value];
70
+ }
71
+ get side() {
72
+ return this._side;
73
+ }
74
+ set align(value) {
75
+ if (!Object.values(DropdownAlign).includes(value)) {
76
+ throw new Error(`Unknown align: ${value}`);
77
+ }
78
+ this._align = value;
79
+ if (this.isVertical) {
80
+ this.defaultPosition.overlayX = this.defaultPosition.originX = value;
81
+ }
82
+ else {
83
+ this.defaultPosition.overlayY = this.defaultPosition.originY = mapRdxAlignToCdkPosition[value];
84
+ }
85
+ }
86
+ get align() {
87
+ return this._align;
88
+ }
89
+ set sideOffset(value) {
90
+ // todo need invert value for top and left
91
+ if (this.isVertical) {
92
+ this.defaultPosition.offsetY = value;
93
+ }
94
+ else {
95
+ this.defaultPosition.offsetX = value;
96
+ }
97
+ }
98
+ set alignOffset(value) {
99
+ // todo need invert value for top and left
100
+ if (this.isVertical) {
101
+ this.defaultPosition.offsetX = value;
102
+ }
103
+ else {
104
+ this.defaultPosition.offsetY = value;
105
+ }
106
+ }
107
+ get isVertical() {
108
+ return this._side === DropdownSide.Top || this._side === DropdownSide.Bottom;
109
+ }
110
+ get defaultPosition() {
111
+ return this.cdkMenuTrigger.menuPosition[0];
112
+ }
9
113
  constructor() {
10
- this.cdkTrigger = inject(CdkMenuTrigger, { host: true });
114
+ this.cdkMenuTrigger = inject(CdkMenuTrigger, { host: true });
11
115
  this.disabled = input(false, {
12
116
  transform: booleanAttribute
13
117
  });
118
+ this._side = DropdownSide.Bottom;
119
+ this._align = DropdownAlign.Start;
120
+ this.onOpenChange = outputFromObservable(this.cdkMenuTrigger?.opened);
121
+ // todo priority
122
+ this.cdkMenuTrigger.menuPosition = [
123
+ { ...dropdownPositions[DropdownSide.Bottom] }
124
+ ];
14
125
  }
15
126
  onPointerDown($event) {
16
127
  // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
17
128
  // but not when the control key is pressed (avoiding MacOS right click)
18
129
  if (!this.disabled() && $event.button === 0 && !$event.ctrlKey) {
19
130
  /* empty */
20
- if (!this.cdkTrigger.isOpen()) {
131
+ if (!this.cdkMenuTrigger.isOpen()) {
21
132
  // prevent trigger focusing when opening
22
133
  // this allows the content to be given focus without competition
23
134
  $event.preventDefault();
24
135
  }
25
136
  }
26
137
  }
27
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: RdxDropdownMenuTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
28
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.0.4", type: RdxDropdownMenuTriggerDirective, isStandalone: true, selector: "[DropdownMenuTrigger]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "pointerdown": "onPointerDown($event)" }, properties: { "attr.aria-haspopup": "'menu'", "attr.aria-expanded": "cdkTrigger.isOpen()", "attr.data-state": "cdkTrigger.isOpen() ? 'open': 'closed'", "attr.data-disabled": "disabled() ? '' : undefined", "disabled": "disabled()" } }, hostDirectives: [{ directive: i1.CdkMenuTrigger, inputs: ["cdkMenuTriggerFor", "DropdownMenuTrigger"] }], ngImport: i0 }); }
138
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
139
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.1.2", type: RdxDropdownMenuTriggerDirective, isStandalone: true, selector: "[rdxDropdownMenuTrigger]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: false, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: false, isRequired: false, transformFunction: null }, sideOffset: { classPropertyName: "sideOffset", publicName: "sideOffset", isSignal: false, isRequired: false, transformFunction: numberAttribute }, alignOffset: { classPropertyName: "alignOffset", publicName: "alignOffset", isSignal: false, isRequired: false, transformFunction: numberAttribute } }, outputs: { onOpenChange: "onOpenChange" }, host: { attributes: { "type": "button" }, listeners: { "pointerdown": "onPointerDown($event)" }, properties: { "attr.aria-haspopup": "'menu'", "attr.aria-expanded": "cdkMenuTrigger.isOpen()", "attr.data-state": "cdkMenuTrigger.isOpen() ? 'open': 'closed'", "attr.data-disabled": "disabled() ? '' : undefined", "disabled": "disabled()" } }, hostDirectives: [{ directive: i1.CdkMenuTrigger, inputs: ["cdkMenuTriggerFor", "rdxDropdownMenuTrigger"] }], ngImport: i0 }); }
29
140
  }
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: RdxDropdownMenuTriggerDirective, decorators: [{
141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuTriggerDirective, decorators: [{
31
142
  type: Directive,
32
143
  args: [{
33
- selector: '[DropdownMenuTrigger]',
144
+ selector: '[rdxDropdownMenuTrigger]',
34
145
  standalone: true,
35
146
  hostDirectives: [
36
- { directive: CdkMenuTrigger, inputs: ['cdkMenuTriggerFor: DropdownMenuTrigger'] }
147
+ {
148
+ directive: CdkMenuTrigger,
149
+ inputs: ['cdkMenuTriggerFor: rdxDropdownMenuTrigger']
150
+ }
37
151
  ],
38
152
  host: {
39
153
  type: 'button',
40
154
  '[attr.aria-haspopup]': "'menu'",
41
- '[attr.aria-expanded]': 'cdkTrigger.isOpen()',
42
- '[attr.data-state]': "cdkTrigger.isOpen() ? 'open': 'closed'",
155
+ '[attr.aria-expanded]': 'cdkMenuTrigger.isOpen()',
156
+ '[attr.data-state]': "cdkMenuTrigger.isOpen() ? 'open': 'closed'",
43
157
  '[attr.data-disabled]': "disabled() ? '' : undefined",
44
158
  '[disabled]': 'disabled()',
45
159
  '(pointerdown)': 'onPointerDown($event)'
46
160
  }
47
161
  }]
48
- }] });
162
+ }], ctorParameters: () => [], propDecorators: { side: [{
163
+ type: Input
164
+ }], align: [{
165
+ type: Input
166
+ }], sideOffset: [{
167
+ type: Input,
168
+ args: [{ transform: numberAttribute }]
169
+ }], alignOffset: [{
170
+ type: Input,
171
+ args: [{ transform: numberAttribute }]
172
+ }] } });
173
+
174
+ class RdxDropdownMenuContentDirective {
175
+ constructor() {
176
+ this.highlighted = new Subject();
177
+ this.cdkMenu = inject(CdkMenu);
178
+ this.cdkMenuTrigger = inject(CdkMenuTrigger, { host: true });
179
+ this.menuTrigger = inject(RdxDropdownMenuTriggerDirective, { optional: true });
180
+ // todo need sync with keyManager
181
+ this.highlighted.pipe(startWith(null), pairwise()).subscribe(([prev, item]) => {
182
+ if (prev) {
183
+ prev.highlighted = false;
184
+ }
185
+ if (item) {
186
+ item.highlighted = true;
187
+ }
188
+ });
189
+ }
190
+ updateActiveItem(item) {
191
+ this.cdkMenu['keyManager'].updateActiveItem(item);
192
+ }
193
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
194
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.2", type: RdxDropdownMenuContentDirective, isStandalone: true, selector: "[rdxDropdownMenuContent]", host: { properties: { "attr.data-state": "cdkMenuTrigger.isOpen() ? 'open': 'closed'", "attr.data-align": "menuTrigger!.align", "attr.data-side": "menuTrigger!.side", "attr.data-orientation": "cdkMenu.orientation" } }, hostDirectives: [{ directive: i1.CdkMenu }, { directive: i1.CdkTargetMenuAim }], ngImport: i0 }); }
195
+ }
196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuContentDirective, decorators: [{
197
+ type: Directive,
198
+ args: [{
199
+ selector: '[rdxDropdownMenuContent]',
200
+ standalone: true,
201
+ hostDirectives: [CdkMenu, CdkTargetMenuAim],
202
+ host: {
203
+ '[attr.data-state]': "cdkMenuTrigger.isOpen() ? 'open': 'closed'",
204
+ '[attr.data-align]': 'menuTrigger!.align',
205
+ '[attr.data-side]': 'menuTrigger!.side',
206
+ '[attr.data-orientation]': 'cdkMenu.orientation'
207
+ }
208
+ }]
209
+ }], ctorParameters: () => [] });
49
210
 
50
211
  class RdxDropdownMenuItemDirective {
51
212
  constructor() {
52
- this.disabled = input(false, {
53
- transform: booleanAttribute,
54
- alias: 'rdxDisabled'
213
+ this.menu = inject(RdxDropdownMenuContentDirective);
214
+ this.cdkMenuItem = inject(CdkMenuItem);
215
+ this.nativeElement = inject(ElementRef).nativeElement;
216
+ this.highlighted = false;
217
+ this.onSelect = new EventEmitter();
218
+ this.menu.highlighted.pipe(takeUntilDestroyed()).subscribe((value) => {
219
+ if (value !== this) {
220
+ this.highlighted = false;
221
+ }
55
222
  });
223
+ this.cdkMenuItem.triggered.subscribe(this.onSelect);
224
+ }
225
+ onPointerMove() {
226
+ this.nativeElement.focus({ preventScroll: true });
227
+ this.menu.updateActiveItem(this.cdkMenuItem);
56
228
  }
57
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: RdxDropdownMenuItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
58
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.0.4", type: RdxDropdownMenuItemDirective, isStandalone: true, selector: "[DropdownMenuItem]", inputs: { disabled: { classPropertyName: "disabled", publicName: "rdxDisabled", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1$1.RdxMenuItemDirective, inputs: ["rdxDisabled", "disabled"] }], ngImport: i0 }); }
229
+ onKeydown(event) {
230
+ if (this.nativeElement.tagName !== 'BUTTON' && ['Enter', ' '].includes(event.key)) {
231
+ event.preventDefault();
232
+ }
233
+ }
234
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
235
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.2", type: RdxDropdownMenuItemDirective, isStandalone: true, selector: "[rdxDropdownMenuItem]", 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": "cdkMenuItem.disabled ? \"\" : null", "attr.disabled": "cdkMenuItem.disabled ? \"\" : null" } }, hostDirectives: [{ directive: i1.CdkMenuItem, inputs: ["cdkMenuItemDisabled", "disabled"] }], ngImport: i0 }); }
59
236
  }
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: RdxDropdownMenuItemDirective, decorators: [{
237
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuItemDirective, decorators: [{
61
238
  type: Directive,
62
239
  args: [{
63
- selector: '[DropdownMenuItem]',
240
+ selector: '[rdxDropdownMenuItem]',
64
241
  standalone: true,
65
- hostDirectives: [{ directive: RdxMenuItemDirective, inputs: ['rdxDisabled: disabled '] }]
242
+ // todo hostDirectives + extends
243
+ hostDirectives: [{ directive: CdkMenuItem, inputs: ['cdkMenuItemDisabled: disabled'] }],
244
+ host: {
245
+ type: 'button',
246
+ // todo horizontal ?
247
+ '[attr.data-orientation]': '"vertical"',
248
+ '[attr.data-highlighted]': 'highlighted ? "" : null',
249
+ '[attr.data-disabled]': 'cdkMenuItem.disabled ? "" : null',
250
+ '[attr.disabled]': 'cdkMenuItem.disabled ? "" : null',
251
+ '(pointermove)': 'onPointerMove()',
252
+ '(focus)': 'menu.highlighted.next(this)',
253
+ '(keydown)': 'onKeydown($event)'
254
+ }
66
255
  }]
67
- }] });
256
+ }], ctorParameters: () => [], propDecorators: { onSelect: [{
257
+ type: Output
258
+ }] } });
68
259
 
69
- class RdxDropdownMenuSeparatorDirective {
70
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: RdxDropdownMenuSeparatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
71
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.4", type: RdxDropdownMenuSeparatorDirective, isStandalone: true, selector: "[DropdownMenuSeparator]", host: { attributes: { "role": "separator" }, properties: { "attr.aria-orientation": "'horizontal'" } }, hostDirectives: [{ directive: i1$1.RdxMenuSeparatorDirective }], ngImport: i0 }); }
260
+ /** Base class providing checked state for selectable DropdownMenuItems. */
261
+ class RdxDropdownMenuSelectable extends RdxDropdownMenuItemDirective {
262
+ constructor() {
263
+ super(...arguments);
264
+ this._checked = false;
265
+ this.onCheckedChange = new EventEmitter();
266
+ }
267
+ /** Whether the element is checked */
268
+ set checked(value) {
269
+ if (this._checked == value)
270
+ return;
271
+ this._checked = value;
272
+ this.onCheckedChange.emit(value);
273
+ }
274
+ get checked() {
275
+ return this._checked;
276
+ }
277
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuSelectable, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
278
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.1.2", type: RdxDropdownMenuSelectable, isStandalone: true, inputs: { checked: ["checked", "checked", booleanAttribute] }, outputs: { onCheckedChange: "onCheckedChange" }, host: { properties: { "attr.aria-checked": "!!checked", "attr.aria-disabled": "disabled || null", "attr.data-state": "checked ? \"checked\" : \"unchecked\"" } }, usesInheritance: true, ngImport: i0 }); }
72
279
  }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: RdxDropdownMenuSeparatorDirective, decorators: [{
280
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuSelectable, decorators: [{
74
281
  type: Directive,
75
282
  args: [{
76
- selector: '[DropdownMenuSeparator]',
77
283
  standalone: true,
78
- hostDirectives: [RdxMenuSeparatorDirective],
79
284
  host: {
80
- role: 'separator',
81
- '[attr.aria-orientation]': "'horizontal'"
285
+ '[attr.aria-checked]': '!!checked',
286
+ '[attr.aria-disabled]': 'disabled || null',
287
+ '[attr.data-state]': 'checked ? "checked" : "unchecked"'
82
288
  }
83
289
  }]
290
+ }], propDecorators: { checked: [{
291
+ type: Input,
292
+ args: [{ transform: booleanAttribute }]
293
+ }], onCheckedChange: [{
294
+ type: Output
295
+ }] } });
296
+
297
+ class RdxDropdownMenuItemCheckboxDirective extends RdxDropdownMenuSelectable {
298
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuItemCheckboxDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
299
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.2", type: RdxDropdownMenuItemCheckboxDirective, isStandalone: true, selector: "[rdxDropdownMenuItemCheckbox]", host: { attributes: { "role": "menuitemcheckbox" } }, providers: [
300
+ { provide: RdxDropdownMenuSelectable, useExisting: RdxDropdownMenuItemCheckboxDirective },
301
+ { provide: RdxDropdownMenuItemDirective, useExisting: RdxDropdownMenuSelectable }
302
+ ], usesInheritance: true, ngImport: i0 }); }
303
+ }
304
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuItemCheckboxDirective, decorators: [{
305
+ type: Directive,
306
+ args: [{
307
+ selector: '[rdxDropdownMenuItemCheckbox]',
308
+ standalone: true,
309
+ host: {
310
+ role: 'menuitemcheckbox'
311
+ },
312
+ providers: [
313
+ { provide: RdxDropdownMenuSelectable, useExisting: RdxDropdownMenuItemCheckboxDirective },
314
+ { provide: RdxDropdownMenuItemDirective, useExisting: RdxDropdownMenuSelectable }
315
+ ]
316
+ }]
84
317
  }] });
85
318
 
86
- class RdxDropdownMenuContentDirective {
87
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: RdxDropdownMenuContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
88
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.4", type: RdxDropdownMenuContentDirective, isStandalone: true, selector: "[DropdownMenuContent]", hostDirectives: [{ directive: i1$1.RdxMenuContentDirective }], ngImport: i0 }); }
319
+ class RdxDropdownMenuItemIndicatorDirective {
320
+ constructor() {
321
+ this.item = inject(RdxDropdownMenuSelectable);
322
+ }
323
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuItemIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
324
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.2", type: RdxDropdownMenuItemIndicatorDirective, isStandalone: true, selector: "[rdxDropdownMenuItemIndicator]", host: { properties: { "style.display": "item.checked ? 'block' : 'none'", "attr.data-state": "item.checked ? 'checked' : 'unchecked'" } }, ngImport: i0 }); }
89
325
  }
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: RdxDropdownMenuContentDirective, decorators: [{
326
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuItemIndicatorDirective, decorators: [{
91
327
  type: Directive,
92
328
  args: [{
93
- selector: '[DropdownMenuContent]',
329
+ selector: '[rdxDropdownMenuItemIndicator]',
94
330
  standalone: true,
95
- hostDirectives: [RdxMenuContentDirective]
331
+ host: {
332
+ '[style.display]': "item.checked ? 'block' : 'none'",
333
+ '[attr.data-state]': "item.checked ? 'checked' : 'unchecked'"
334
+ }
96
335
  }]
97
336
  }] });
98
337
 
338
+ class RdxDropdownMenuItemRadioGroupDirective {
339
+ constructor() {
340
+ this.selectionDispatcher = inject(UniqueSelectionDispatcher);
341
+ this._value = null;
342
+ this.valueChange = new EventEmitter();
343
+ }
344
+ set value(id) {
345
+ this._value = id;
346
+ }
347
+ get value() {
348
+ return this._value;
349
+ }
350
+ ngAfterContentInit() {
351
+ this.selectionDispatcher.notify(this.value, '');
352
+ }
353
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuItemRadioGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
354
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.2", type: RdxDropdownMenuItemRadioGroupDirective, isStandalone: true, selector: "[rdxDropdownMenuItemRadioGroup]", inputs: { value: "value" }, outputs: { valueChange: "valueChange" }, host: { attributes: { "role": "group" } }, providers: [{ provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }], ngImport: i0 }); }
355
+ }
356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuItemRadioGroupDirective, decorators: [{
357
+ type: Directive,
358
+ args: [{
359
+ selector: '[rdxDropdownMenuItemRadioGroup]',
360
+ standalone: true,
361
+ host: {
362
+ role: 'group'
363
+ },
364
+ providers: [{ provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }]
365
+ }]
366
+ }], propDecorators: { value: [{
367
+ type: Input
368
+ }], valueChange: [{
369
+ type: Output
370
+ }] } });
371
+
372
+ /** Counter used to set a unique id and name for a selectable item */
373
+ let nextId = 0;
374
+ class RdxDropdownMenuItemRadioDirective extends RdxDropdownMenuSelectable {
375
+ get value() {
376
+ return this._value || this.id;
377
+ }
378
+ set value(value) {
379
+ this._value = value;
380
+ }
381
+ constructor() {
382
+ super();
383
+ /** The unique selection dispatcher for this radio's `RdxDropdownMenuItemRadioGroupDirective`. */
384
+ this.selectionDispatcher = inject(UniqueSelectionDispatcher);
385
+ this.group = inject(RdxDropdownMenuItemRadioGroupDirective);
386
+ /** An ID to identify this radio item to the `UniqueSelectionDispatcher`. */
387
+ this.id = `${nextId++}`;
388
+ this.cdkMenuItem.triggered.subscribe(() => {
389
+ if (!this.cdkMenuItem.disabled) {
390
+ this.selectionDispatcher.notify(this.value, '');
391
+ this.group.valueChange.emit(this.value);
392
+ }
393
+ });
394
+ }
395
+ ngAfterContentInit() {
396
+ this.removeDispatcherListener = this.selectionDispatcher.listen((id) => {
397
+ this.checked = this.value === id;
398
+ });
399
+ }
400
+ ngOnDestroy() {
401
+ this.removeDispatcherListener();
402
+ }
403
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuItemRadioDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
404
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.2", type: RdxDropdownMenuItemRadioDirective, isStandalone: true, selector: "[rdxDropdownMenuItemRadio]", inputs: { value: "value" }, host: { attributes: { "role": "menuitemradio" } }, providers: [
405
+ { provide: RdxDropdownMenuSelectable, useExisting: RdxDropdownMenuItemRadioDirective },
406
+ { provide: RdxDropdownMenuItemDirective, useExisting: RdxDropdownMenuSelectable }
407
+ ], usesInheritance: true, ngImport: i0 }); }
408
+ }
409
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuItemRadioDirective, decorators: [{
410
+ type: Directive,
411
+ args: [{
412
+ selector: '[rdxDropdownMenuItemRadio]',
413
+ standalone: true,
414
+ host: {
415
+ role: 'menuitemradio'
416
+ },
417
+ providers: [
418
+ { provide: RdxDropdownMenuSelectable, useExisting: RdxDropdownMenuItemRadioDirective },
419
+ { provide: RdxDropdownMenuItemDirective, useExisting: RdxDropdownMenuSelectable }
420
+ ]
421
+ }]
422
+ }], ctorParameters: () => [], propDecorators: { value: [{
423
+ type: Input
424
+ }] } });
425
+
99
426
  class RdxDropdownMenuLabelDirective {
100
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: RdxDropdownMenuLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
101
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.4", type: RdxDropdownMenuLabelDirective, isStandalone: true, selector: "div[DropdownMenuLabel]", ngImport: i0 }); }
427
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
428
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.2", type: RdxDropdownMenuLabelDirective, isStandalone: true, selector: "[rdxDropdownMenuLabel]", ngImport: i0 }); }
102
429
  }
103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: RdxDropdownMenuLabelDirective, decorators: [{
430
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuLabelDirective, decorators: [{
104
431
  type: Directive,
105
432
  args: [{
106
- selector: 'div[DropdownMenuLabel]',
433
+ selector: '[rdxDropdownMenuLabel]',
107
434
  standalone: true
108
435
  }]
109
436
  }] });
110
437
 
438
+ class RdxDropdownMenuSeparatorDirective {
439
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuSeparatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
440
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.2", type: RdxDropdownMenuSeparatorDirective, isStandalone: true, selector: "[rdxDropdownMenuSeparator]", host: { attributes: { "role": "separator" }, properties: { "attr.aria-orientation": "'horizontal'" } }, hostDirectives: [{ directive: i1$1.RdxSeparatorRootDirective }], ngImport: i0 }); }
441
+ }
442
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxDropdownMenuSeparatorDirective, decorators: [{
443
+ type: Directive,
444
+ args: [{
445
+ selector: '[rdxDropdownMenuSeparator]',
446
+ standalone: true,
447
+ hostDirectives: [RdxSeparatorRootDirective],
448
+ host: {
449
+ role: 'separator',
450
+ '[attr.aria-orientation]': "'horizontal'"
451
+ }
452
+ }]
453
+ }] });
454
+
111
455
  /**
112
456
  * Generated bundle index. Do not edit.
113
457
  */
114
458
 
115
- export { RdxDropdownMenuContentDirective, RdxDropdownMenuItemDirective, RdxDropdownMenuLabelDirective, RdxDropdownMenuSeparatorDirective, RdxDropdownMenuTriggerDirective };
459
+ export { DropdownAlign, DropdownSide, RdxDropdownMenuContentDirective, RdxDropdownMenuItemCheckboxDirective, RdxDropdownMenuItemDirective, RdxDropdownMenuItemIndicatorDirective, RdxDropdownMenuItemRadioDirective, RdxDropdownMenuItemRadioGroupDirective, RdxDropdownMenuLabelDirective, RdxDropdownMenuSelectable, RdxDropdownMenuSeparatorDirective, RdxDropdownMenuTriggerDirective, mapRdxAlignToCdkPosition };
116
460
  //# sourceMappingURL=radix-ng-primitives-dropdown-menu.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-dropdown-menu.mjs","sources":["../../../packages/primitives/dropdown-menu/src/dropdown-menu-trigger.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-item.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-separator.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-content.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-label.directive.ts","../../../packages/primitives/dropdown-menu/radix-ng-primitives-dropdown-menu.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport { CdkMenuTrigger } from '@angular/cdk/menu';\nimport { booleanAttribute, Directive, inject, input, Input } from '@angular/core';\n\n@Directive({\n selector: '[DropdownMenuTrigger]',\n standalone: true,\n hostDirectives: [\n { directive: CdkMenuTrigger, inputs: ['cdkMenuTriggerFor: DropdownMenuTrigger'] }\n ],\n host: {\n type: 'button',\n '[attr.aria-haspopup]': \"'menu'\",\n '[attr.aria-expanded]': 'cdkTrigger.isOpen()',\n '[attr.data-state]': \"cdkTrigger.isOpen() ? 'open': 'closed'\",\n '[attr.data-disabled]': \"disabled() ? '' : undefined\",\n '[disabled]': 'disabled()',\n\n '(pointerdown)': 'onPointerDown($event)'\n }\n})\nexport class RdxDropdownMenuTriggerDirective {\n protected readonly cdkTrigger = inject(CdkMenuTrigger, { host: true });\n\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n onPointerDown($event: MouseEvent) {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (!this.disabled() && $event.button === 0 && !$event.ctrlKey) {\n /* empty */\n if (!this.cdkTrigger.isOpen()) {\n // prevent trigger focusing when opening\n // this allows the content to be given focus without competition\n $event.preventDefault();\n }\n }\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input } from '@angular/core';\n\nimport { RdxMenuItemDirective } from '@radix-ng/primitives/menu';\n\n@Directive({\n selector: '[DropdownMenuItem]',\n standalone: true,\n hostDirectives: [{ directive: RdxMenuItemDirective, inputs: ['rdxDisabled: disabled '] }]\n})\nexport class RdxDropdownMenuItemDirective {\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute,\n alias: 'rdxDisabled'\n });\n}\n","import { Directive } from '@angular/core';\n\nimport { RdxMenuSeparatorDirective } from '@radix-ng/primitives/menu';\n\n@Directive({\n selector: '[DropdownMenuSeparator]',\n standalone: true,\n hostDirectives: [RdxMenuSeparatorDirective],\n host: {\n role: 'separator',\n '[attr.aria-orientation]': \"'horizontal'\"\n }\n})\nexport class RdxDropdownMenuSeparatorDirective {}\n","import { Directive } from '@angular/core';\n\nimport { RdxMenuContentDirective } from '@radix-ng/primitives/menu';\n\n@Directive({\n selector: '[DropdownMenuContent]',\n standalone: true,\n hostDirectives: [RdxMenuContentDirective]\n})\nexport class RdxDropdownMenuContentDirective {}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: 'div[DropdownMenuLabel]',\n standalone: true\n})\nexport class RdxDropdownMenuLabelDirective {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;MAqBa,+BAA+B,CAAA;AAjB5C,IAAA,WAAA,GAAA;QAkBuB,IAAU,CAAA,UAAA,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AAE9D,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,EAAE;AACpD,YAAA,SAAS,EAAE,gBAAgB;AAC9B,SAAA,CAAC,CAAC;AAcN,KAAA;AAZG,IAAA,aAAa,CAAC,MAAkB,EAAA;;;AAG5B,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,MAAM,CAAC,MAAM,K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AAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,UAAU,EAAE,IAAI;oBAChB,cAAc,EAAE,CAAC,uBAAuB,CAAC;AAC5C,iBAAA,CAAA;;;MCFY,6BAA6B,CAAA;8GAA7B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAA7B,6BAA6B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAA7B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAJzC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,wBAAwB;AAClC,oBAAA,UAAU,EAAE,IAAI;AACnB,iBAAA,CAAA;;;ACLD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-dropdown-menu.mjs","sources":["../../../packages/primitives/dropdown-menu/src/dropdown-menu-trigger.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-content.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-item.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-item-selectable.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-item-checkbox.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-item-indicator.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-item-radio-group.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-item-radio.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-label.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-separator.directive.ts","../../../packages/primitives/dropdown-menu/radix-ng-primitives-dropdown-menu.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport { CdkMenuTrigger } from '@angular/cdk/menu';\nimport { ConnectedPosition, VerticalConnectionPos } from '@angular/cdk/overlay';\nimport { booleanAttribute, Directive, inject, Input, input, numberAttribute } from '@angular/core';\nimport { outputFromObservable } from '@angular/core/rxjs-interop';\n\nexport enum DropdownSide {\n Top = 'top',\n Right = 'right',\n Bottom = 'bottom',\n Left = 'left'\n}\n\nexport enum DropdownAlign {\n Start = 'start',\n Center = 'center',\n End = 'end'\n}\n\nexport const mapRdxAlignToCdkPosition = {\n start: 'top',\n center: 'center',\n end: 'bottom'\n};\n\nconst dropdownPositions: Record<DropdownSide, ConnectedPosition> = {\n top: {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetX: 0,\n offsetY: 0\n },\n right: {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: 0,\n offsetY: 0\n },\n bottom: {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: 0,\n offsetY: 0\n },\n left: {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: 0,\n offsetY: 0\n }\n};\n\n@Directive({\n selector: '[rdxDropdownMenuTrigger]',\n standalone: true,\n hostDirectives: [\n {\n directive: CdkMenuTrigger,\n inputs: ['cdkMenuTriggerFor: rdxDropdownMenuTrigger']\n }\n ],\n host: {\n type: 'button',\n '[attr.aria-haspopup]': \"'menu'\",\n '[attr.aria-expanded]': 'cdkMenuTrigger.isOpen()',\n '[attr.data-state]': \"cdkMenuTrigger.isOpen() ? 'open': 'closed'\",\n '[attr.data-disabled]': \"disabled() ? '' : undefined\",\n '[disabled]': 'disabled()',\n\n '(pointerdown)': 'onPointerDown($event)'\n }\n})\nexport class RdxDropdownMenuTriggerDirective {\n protected readonly cdkMenuTrigger = inject(CdkMenuTrigger, { host: true });\n\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n @Input()\n set side(value: DropdownSide) {\n if (!Object.values(DropdownSide).includes(value)) {\n throw new Error(`Unknown side: ${value}`);\n }\n\n this._side = value;\n\n this.cdkMenuTrigger.menuPosition[0] = dropdownPositions[value];\n }\n\n get side() {\n return this._side;\n }\n\n private _side: DropdownSide = DropdownSide.Bottom;\n\n @Input()\n set align(value: DropdownAlign) {\n if (!Object.values(DropdownAlign).includes(value)) {\n throw new Error(`Unknown align: ${value}`);\n }\n\n this._align = value;\n\n if (this.isVertical) {\n this.defaultPosition.overlayX = this.defaultPosition.originX = value;\n } else {\n this.defaultPosition.overlayY = this.defaultPosition.originY = mapRdxAlignToCdkPosition[\n value\n ] as VerticalConnectionPos;\n }\n }\n\n get align() {\n return this._align;\n }\n\n private _align: DropdownAlign = DropdownAlign.Start;\n\n @Input({ transform: numberAttribute })\n set sideOffset(value: number) {\n // todo need invert value for top and left\n if (this.isVertical) {\n this.defaultPosition.offsetY = value;\n } else {\n this.defaultPosition.offsetX = value;\n }\n }\n\n @Input({ transform: numberAttribute })\n set alignOffset(value: number) {\n // todo need invert value for top and left\n if (this.isVertical) {\n this.defaultPosition.offsetX = value;\n } else {\n this.defaultPosition.offsetY = value;\n }\n }\n\n get isVertical(): boolean {\n return this._side === DropdownSide.Top || this._side === DropdownSide.Bottom;\n }\n\n get defaultPosition(): ConnectedPosition {\n return this.cdkMenuTrigger.menuPosition[0];\n }\n\n onOpenChange = outputFromObservable(this.cdkMenuTrigger?.opened);\n\n constructor() {\n // todo priority\n this.cdkMenuTrigger.menuPosition = [\n { ...dropdownPositions[DropdownSide.Bottom] }];\n }\n\n onPointerDown($event: MouseEvent) {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (!this.disabled() && $event.button === 0 && !$event.ctrlKey) {\n /* empty */\n if (!this.cdkMenuTrigger.isOpen()) {\n // prevent trigger focusing when opening\n // this allows the content to be given focus without competition\n $event.preventDefault();\n }\n }\n }\n}\n","import { CdkMenu, CdkMenuItem, CdkMenuTrigger, CdkTargetMenuAim } from '@angular/cdk/menu';\nimport { Directive, inject } from '@angular/core';\nimport { pairwise, startWith, Subject } from 'rxjs';\nimport { RdxDropdownMenuItemDirective } from './dropdown-menu-item.directive';\nimport { RdxDropdownMenuTriggerDirective } from './dropdown-menu-trigger.directive';\n\n@Directive({\n selector: '[rdxDropdownMenuContent]',\n standalone: true,\n hostDirectives: [CdkMenu, CdkTargetMenuAim],\n host: {\n '[attr.data-state]': \"cdkMenuTrigger.isOpen() ? 'open': 'closed'\",\n '[attr.data-align]': 'menuTrigger!.align',\n '[attr.data-side]': 'menuTrigger!.side',\n '[attr.data-orientation]': 'cdkMenu.orientation'\n }\n})\nexport class RdxDropdownMenuContentDirective {\n readonly highlighted = new Subject<RdxDropdownMenuItemDirective>();\n readonly cdkMenu = inject(CdkMenu);\n protected readonly cdkMenuTrigger = inject(CdkMenuTrigger, { host: true });\n protected readonly menuTrigger = inject(RdxDropdownMenuTriggerDirective, { optional: true });\n\n constructor() {\n // todo need sync with keyManager\n this.highlighted.pipe(startWith(null), pairwise()).subscribe(([prev, item]) => {\n if (prev) {\n prev.highlighted = false;\n }\n\n if (item) {\n item.highlighted = true;\n }\n });\n }\n\n updateActiveItem(item: CdkMenuItem) {\n this.cdkMenu['keyManager'].updateActiveItem(item);\n }\n}\n","import { CdkMenuItem } from '@angular/cdk/menu';\nimport { Directive, ElementRef, EventEmitter, inject, Output } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { RdxDropdownMenuContentDirective } from './dropdown-menu-content.directive';\n\n@Directive({\n selector: '[rdxDropdownMenuItem]',\n standalone: true,\n // todo hostDirectives + extends\n hostDirectives: [{ directive: CdkMenuItem, inputs: ['cdkMenuItemDisabled: disabled'] }],\n host: {\n type: 'button',\n // todo horizontal ?\n '[attr.data-orientation]': '\"vertical\"',\n '[attr.data-highlighted]': 'highlighted ? \"\" : null',\n '[attr.data-disabled]': 'cdkMenuItem.disabled ? \"\" : null',\n '[attr.disabled]': 'cdkMenuItem.disabled ? \"\" : null',\n '(pointermove)': 'onPointerMove()',\n '(focus)': 'menu.highlighted.next(this)',\n '(keydown)': 'onKeydown($event)'\n }\n})\nexport class RdxDropdownMenuItemDirective {\n protected readonly menu = inject(RdxDropdownMenuContentDirective);\n protected readonly cdkMenuItem = inject(CdkMenuItem);\n protected readonly nativeElement = inject(ElementRef).nativeElement;\n\n highlighted = false;\n\n @Output() readonly onSelect = new EventEmitter<void>();\n\n constructor() {\n this.menu.highlighted.pipe(takeUntilDestroyed()).subscribe((value) => {\n if (value !== this) {\n this.highlighted = false;\n }\n });\n\n this.cdkMenuItem.triggered.subscribe(this.onSelect);\n }\n\n protected onPointerMove() {\n this.nativeElement.focus({ preventScroll: true });\n this.menu.updateActiveItem(this.cdkMenuItem);\n }\n\n protected onKeydown(event: KeyboardEvent) {\n if (this.nativeElement.tagName !== 'BUTTON' && ['Enter', ' '].includes(event.key)) {\n event.preventDefault();\n }\n }\n}\n","import { booleanAttribute, Directive, EventEmitter, Input, Output } from '@angular/core';\nimport { RdxDropdownMenuItemDirective } from './dropdown-menu-item.directive';\n\n/** Base class providing checked state for selectable DropdownMenuItems. */\n@Directive({\n standalone: true,\n host: {\n '[attr.aria-checked]': '!!checked',\n '[attr.aria-disabled]': 'disabled || null',\n '[attr.data-state]': 'checked ? \"checked\" : \"unchecked\"'\n }\n})\nexport abstract class RdxDropdownMenuSelectable extends RdxDropdownMenuItemDirective {\n /** Whether the element is checked */\n @Input({ transform: booleanAttribute })\n set checked(value: boolean) {\n if (this._checked == value) return;\n\n this._checked = value;\n\n this.onCheckedChange.emit(value);\n }\n\n get checked() {\n return this._checked;\n }\n\n private _checked = false;\n\n @Output() readonly onCheckedChange = new EventEmitter<boolean>();\n}\n","import { Directive } from '@angular/core';\nimport { RdxDropdownMenuSelectable } from './dropdown-menu-item-selectable';\nimport { RdxDropdownMenuItemDirective } from './dropdown-menu-item.directive';\n\n@Directive({\n selector: '[rdxDropdownMenuItemCheckbox]',\n standalone: true,\n host: {\n role: 'menuitemcheckbox'\n },\n providers: [\n { provide: RdxDropdownMenuSelectable, useExisting: RdxDropdownMenuItemCheckboxDirective },\n { provide: RdxDropdownMenuItemDirective, useExisting: RdxDropdownMenuSelectable }\n ]\n})\nexport class RdxDropdownMenuItemCheckboxDirective extends RdxDropdownMenuSelectable {}\n","import { Directive, inject } from '@angular/core';\nimport { RdxDropdownMenuSelectable } from './dropdown-menu-item-selectable';\n\n@Directive({\n selector: '[rdxDropdownMenuItemIndicator]',\n standalone: true,\n host: {\n '[style.display]': \"item.checked ? 'block' : 'none'\",\n '[attr.data-state]': \"item.checked ? 'checked' : 'unchecked'\"\n }\n})\nexport class RdxDropdownMenuItemIndicatorDirective {\n item = inject(RdxDropdownMenuSelectable);\n}\n","import { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport { AfterContentInit, Directive, EventEmitter, inject, Input, Output } from '@angular/core';\n\n@Directive({\n selector: '[rdxDropdownMenuItemRadioGroup]',\n standalone: true,\n host: {\n role: 'group'\n },\n providers: [{ provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }]\n})\nexport class RdxDropdownMenuItemRadioGroupDirective<T> implements AfterContentInit {\n private readonly selectionDispatcher = inject(UniqueSelectionDispatcher);\n\n @Input()\n set value(id: T | null) {\n this._value = id;\n }\n\n get value(): T | null {\n return this._value;\n }\n\n private _value: T | null = null;\n\n @Output() readonly valueChange = new EventEmitter();\n\n ngAfterContentInit(): void {\n this.selectionDispatcher.notify(this.value as string, '');\n }\n}\n","import { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport { AfterContentInit, Directive, inject, Input, OnDestroy } from '@angular/core';\nimport { RdxDropdownMenuItemRadioGroupDirective } from './dropdown-menu-item-radio-group.directive';\nimport { RdxDropdownMenuSelectable } from './dropdown-menu-item-selectable';\nimport { RdxDropdownMenuItemDirective } from './dropdown-menu-item.directive';\n\n/** Counter used to set a unique id and name for a selectable item */\nlet nextId = 0;\n\n@Directive({\n selector: '[rdxDropdownMenuItemRadio]',\n standalone: true,\n host: {\n role: 'menuitemradio'\n },\n providers: [\n { provide: RdxDropdownMenuSelectable, useExisting: RdxDropdownMenuItemRadioDirective },\n { provide: RdxDropdownMenuItemDirective, useExisting: RdxDropdownMenuSelectable }\n ]\n})\nexport class RdxDropdownMenuItemRadioDirective\n extends RdxDropdownMenuSelectable\n implements AfterContentInit, OnDestroy\n{\n /** The unique selection dispatcher for this radio's `RdxDropdownMenuItemRadioGroupDirective`. */\n private readonly selectionDispatcher = inject(UniqueSelectionDispatcher);\n\n private readonly group = inject(RdxDropdownMenuItemRadioGroupDirective);\n\n @Input()\n get value() {\n return this._value || this.id;\n }\n\n set value(value: string) {\n this._value = value;\n }\n\n private _value: string | undefined;\n\n /** An ID to identify this radio item to the `UniqueSelectionDispatcher`. */\n private id = `${nextId++}`;\n\n private removeDispatcherListener!: () => void;\n\n constructor() {\n super();\n\n this.cdkMenuItem.triggered.subscribe(() => {\n if (!this.cdkMenuItem.disabled) {\n this.selectionDispatcher.notify(this.value, '');\n\n this.group.valueChange.emit(this.value);\n }\n });\n }\n\n ngAfterContentInit() {\n this.removeDispatcherListener = this.selectionDispatcher.listen((id: string) => {\n this.checked = this.value === id;\n });\n }\n\n ngOnDestroy() {\n this.removeDispatcherListener();\n }\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[rdxDropdownMenuLabel]',\n standalone: true\n})\nexport class RdxDropdownMenuLabelDirective {}\n","import { Directive } from '@angular/core';\nimport { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';\n\n@Directive({\n selector: '[rdxDropdownMenuSeparator]',\n standalone: true,\n hostDirectives: [RdxSeparatorRootDirective],\n host: {\n role: 'separator',\n '[attr.aria-orientation]': \"'horizontal'\"\n }\n})\nexport class RdxDropdownMenuSeparatorDirective {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;IAMY,aAKX;AALD,CAAA,UAAY,YAAY,EAAA;AACpB,IAAA,YAA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