@frame-ui-ng/components 0.1.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 (249) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +31 -0
  3. package/accordion/src/styles/_vars.css +25 -0
  4. package/accordion/src/styles/accordion.css +87 -0
  5. package/alert/src/styles/_vars.css +28 -0
  6. package/alert/src/styles/alert.css +77 -0
  7. package/avatar/src/styles/_vars.css +34 -0
  8. package/avatar/src/styles/avatar.css +209 -0
  9. package/badge/src/styles/_vars.css +16 -0
  10. package/badge/src/styles/badge.css +125 -0
  11. package/breadcrumb/src/styles/_vars.css +16 -0
  12. package/breadcrumb/src/styles/breadcrumb.css +98 -0
  13. package/button/src/styles/_vars.css +20 -0
  14. package/button/src/styles/button-icon.css +18 -0
  15. package/button/src/styles/button-label.css +3 -0
  16. package/button/src/styles/button.css +243 -0
  17. package/button-group/src/styles/button-group.css +69 -0
  18. package/calendar/src/styles/_vars.css +29 -0
  19. package/calendar/src/styles/calendar.css +226 -0
  20. package/card/src/styles/_vars.css +17 -0
  21. package/card/src/styles/card.css +142 -0
  22. package/carousel/src/styles/_vars.css +7 -0
  23. package/carousel/src/styles/carousel.css +89 -0
  24. package/checkbox/src/styles/_vars.css +22 -0
  25. package/checkbox/src/styles/checkbox.css +95 -0
  26. package/collapsible/src/styles/_vars.css +13 -0
  27. package/collapsible/src/styles/collapsible.css +42 -0
  28. package/combobox/src/styles/_vars.css +60 -0
  29. package/combobox/src/styles/combobox.css +285 -0
  30. package/command/src/styles/_vars.css +37 -0
  31. package/command/src/styles/command.css +171 -0
  32. package/context-menu/src/styles/context-menu.css +5 -0
  33. package/date-picker/src/styles/_vars.css +29 -0
  34. package/date-picker/src/styles/date-picker.css +177 -0
  35. package/dropdown-menu/src/styles/_vars.css +34 -0
  36. package/dropdown-menu/src/styles/dropdown-menu-item.css +87 -0
  37. package/dropdown-menu/src/styles/dropdown-menu-motion.css +42 -0
  38. package/dropdown-menu/src/styles/dropdown-menu-panel.css +26 -0
  39. package/dropdown-menu/src/styles/dropdown-menu.css +4 -0
  40. package/empty/src/styles/_vars.css +23 -0
  41. package/empty/src/styles/empty.css +108 -0
  42. package/fesm2022/frame-ui-ng-components-accordion.mjs +268 -0
  43. package/fesm2022/frame-ui-ng-components-accordion.mjs.map +1 -0
  44. package/fesm2022/frame-ui-ng-components-alert.mjs +102 -0
  45. package/fesm2022/frame-ui-ng-components-alert.mjs.map +1 -0
  46. package/fesm2022/frame-ui-ng-components-avatar.mjs +197 -0
  47. package/fesm2022/frame-ui-ng-components-avatar.mjs.map +1 -0
  48. package/fesm2022/frame-ui-ng-components-badge.mjs +120 -0
  49. package/fesm2022/frame-ui-ng-components-badge.mjs.map +1 -0
  50. package/fesm2022/frame-ui-ng-components-breadcrumb.mjs +156 -0
  51. package/fesm2022/frame-ui-ng-components-breadcrumb.mjs.map +1 -0
  52. package/fesm2022/frame-ui-ng-components-button-group.mjs +44 -0
  53. package/fesm2022/frame-ui-ng-components-button-group.mjs.map +1 -0
  54. package/fesm2022/frame-ui-ng-components-button.mjs +150 -0
  55. package/fesm2022/frame-ui-ng-components-button.mjs.map +1 -0
  56. package/fesm2022/frame-ui-ng-components-calendar.mjs +559 -0
  57. package/fesm2022/frame-ui-ng-components-calendar.mjs.map +1 -0
  58. package/fesm2022/frame-ui-ng-components-card.mjs +169 -0
  59. package/fesm2022/frame-ui-ng-components-card.mjs.map +1 -0
  60. package/fesm2022/frame-ui-ng-components-carousel.mjs +454 -0
  61. package/fesm2022/frame-ui-ng-components-carousel.mjs.map +1 -0
  62. package/fesm2022/frame-ui-ng-components-checkbox.mjs +83 -0
  63. package/fesm2022/frame-ui-ng-components-checkbox.mjs.map +1 -0
  64. package/fesm2022/frame-ui-ng-components-collapsible.mjs +191 -0
  65. package/fesm2022/frame-ui-ng-components-collapsible.mjs.map +1 -0
  66. package/fesm2022/frame-ui-ng-components-combobox.mjs +859 -0
  67. package/fesm2022/frame-ui-ng-components-combobox.mjs.map +1 -0
  68. package/fesm2022/frame-ui-ng-components-command.mjs +658 -0
  69. package/fesm2022/frame-ui-ng-components-command.mjs.map +1 -0
  70. package/fesm2022/frame-ui-ng-components-context-menu.mjs +579 -0
  71. package/fesm2022/frame-ui-ng-components-context-menu.mjs.map +1 -0
  72. package/fesm2022/frame-ui-ng-components-date-picker.mjs +512 -0
  73. package/fesm2022/frame-ui-ng-components-date-picker.mjs.map +1 -0
  74. package/fesm2022/frame-ui-ng-components-dropdown-menu.mjs +647 -0
  75. package/fesm2022/frame-ui-ng-components-dropdown-menu.mjs.map +1 -0
  76. package/fesm2022/frame-ui-ng-components-empty.mjs +134 -0
  77. package/fesm2022/frame-ui-ng-components-empty.mjs.map +1 -0
  78. package/fesm2022/frame-ui-ng-components-field.mjs +210 -0
  79. package/fesm2022/frame-ui-ng-components-field.mjs.map +1 -0
  80. package/fesm2022/frame-ui-ng-components-forms.mjs +89 -0
  81. package/fesm2022/frame-ui-ng-components-forms.mjs.map +1 -0
  82. package/fesm2022/frame-ui-ng-components-hover-card.mjs +412 -0
  83. package/fesm2022/frame-ui-ng-components-hover-card.mjs.map +1 -0
  84. package/fesm2022/frame-ui-ng-components-input-otp.mjs +327 -0
  85. package/fesm2022/frame-ui-ng-components-input-otp.mjs.map +1 -0
  86. package/fesm2022/frame-ui-ng-components-input.mjs +250 -0
  87. package/fesm2022/frame-ui-ng-components-input.mjs.map +1 -0
  88. package/fesm2022/frame-ui-ng-components-item.mjs +207 -0
  89. package/fesm2022/frame-ui-ng-components-item.mjs.map +1 -0
  90. package/fesm2022/frame-ui-ng-components-menubar.mjs +371 -0
  91. package/fesm2022/frame-ui-ng-components-menubar.mjs.map +1 -0
  92. package/fesm2022/frame-ui-ng-components-modal.mjs +525 -0
  93. package/fesm2022/frame-ui-ng-components-modal.mjs.map +1 -0
  94. package/fesm2022/frame-ui-ng-components-navigation-menu.mjs +322 -0
  95. package/fesm2022/frame-ui-ng-components-navigation-menu.mjs.map +1 -0
  96. package/fesm2022/frame-ui-ng-components-pagination.mjs +327 -0
  97. package/fesm2022/frame-ui-ng-components-pagination.mjs.map +1 -0
  98. package/fesm2022/frame-ui-ng-components-popover.mjs +454 -0
  99. package/fesm2022/frame-ui-ng-components-popover.mjs.map +1 -0
  100. package/fesm2022/frame-ui-ng-components-progress.mjs +96 -0
  101. package/fesm2022/frame-ui-ng-components-progress.mjs.map +1 -0
  102. package/fesm2022/frame-ui-ng-components-radio-group.mjs +124 -0
  103. package/fesm2022/frame-ui-ng-components-radio-group.mjs.map +1 -0
  104. package/fesm2022/frame-ui-ng-components-resizable.mjs +325 -0
  105. package/fesm2022/frame-ui-ng-components-resizable.mjs.map +1 -0
  106. package/fesm2022/frame-ui-ng-components-select.mjs +434 -0
  107. package/fesm2022/frame-ui-ng-components-select.mjs.map +1 -0
  108. package/fesm2022/frame-ui-ng-components-separator.mjs +51 -0
  109. package/fesm2022/frame-ui-ng-components-separator.mjs.map +1 -0
  110. package/fesm2022/frame-ui-ng-components-sheet.mjs +514 -0
  111. package/fesm2022/frame-ui-ng-components-sheet.mjs.map +1 -0
  112. package/fesm2022/frame-ui-ng-components-sidebar.mjs +628 -0
  113. package/fesm2022/frame-ui-ng-components-sidebar.mjs.map +1 -0
  114. package/fesm2022/frame-ui-ng-components-skeleton.mjs +46 -0
  115. package/fesm2022/frame-ui-ng-components-skeleton.mjs.map +1 -0
  116. package/fesm2022/frame-ui-ng-components-slider.mjs +279 -0
  117. package/fesm2022/frame-ui-ng-components-slider.mjs.map +1 -0
  118. package/fesm2022/frame-ui-ng-components-spinner.mjs +51 -0
  119. package/fesm2022/frame-ui-ng-components-spinner.mjs.map +1 -0
  120. package/fesm2022/frame-ui-ng-components-switch.mjs +130 -0
  121. package/fesm2022/frame-ui-ng-components-switch.mjs.map +1 -0
  122. package/fesm2022/frame-ui-ng-components-table.mjs +594 -0
  123. package/fesm2022/frame-ui-ng-components-table.mjs.map +1 -0
  124. package/fesm2022/frame-ui-ng-components-tabs.mjs +208 -0
  125. package/fesm2022/frame-ui-ng-components-tabs.mjs.map +1 -0
  126. package/fesm2022/frame-ui-ng-components-textarea.mjs +40 -0
  127. package/fesm2022/frame-ui-ng-components-textarea.mjs.map +1 -0
  128. package/fesm2022/frame-ui-ng-components-toast.mjs +346 -0
  129. package/fesm2022/frame-ui-ng-components-toast.mjs.map +1 -0
  130. package/fesm2022/frame-ui-ng-components-toggle.mjs +127 -0
  131. package/fesm2022/frame-ui-ng-components-toggle.mjs.map +1 -0
  132. package/fesm2022/frame-ui-ng-components-tooltip.mjs +425 -0
  133. package/fesm2022/frame-ui-ng-components-tooltip.mjs.map +1 -0
  134. package/fesm2022/frame-ui-ng-components-virtual-scroll.mjs +321 -0
  135. package/fesm2022/frame-ui-ng-components-virtual-scroll.mjs.map +1 -0
  136. package/fesm2022/frame-ui-ng-components.mjs +10278 -0
  137. package/fesm2022/frame-ui-ng-components.mjs.map +1 -0
  138. package/field/src/styles/_vars.css +20 -0
  139. package/field/src/styles/field.css +165 -0
  140. package/hover-card/src/styles/_vars.css +21 -0
  141. package/hover-card/src/styles/hover-card.css +76 -0
  142. package/input/src/styles/_vars.css +65 -0
  143. package/input/src/styles/input-group.css +112 -0
  144. package/input/src/styles/input.css +163 -0
  145. package/input-otp/src/styles/_vars.css +21 -0
  146. package/input-otp/src/styles/input-otp.css +116 -0
  147. package/item/src/styles/_vars.css +34 -0
  148. package/item/src/styles/item.css +187 -0
  149. package/menubar/src/styles/_vars.css +22 -0
  150. package/menubar/src/styles/menubar.css +70 -0
  151. package/modal/src/styles/_vars.css +18 -0
  152. package/modal/src/styles/modal.css +179 -0
  153. package/navigation-menu/src/styles/_vars.css +45 -0
  154. package/navigation-menu/src/styles/navigation-menu.css +245 -0
  155. package/package.json +243 -0
  156. package/pagination/src/styles/_vars.css +22 -0
  157. package/pagination/src/styles/pagination.css +138 -0
  158. package/popover/src/styles/_vars.css +24 -0
  159. package/popover/src/styles/popover.css +101 -0
  160. package/progress/src/styles/_vars.css +15 -0
  161. package/progress/src/styles/progress.css +64 -0
  162. package/radio-group/src/styles/_vars.css +29 -0
  163. package/radio-group/src/styles/radio-group.css +137 -0
  164. package/resizable/src/styles/_vars.css +20 -0
  165. package/resizable/src/styles/resizable.css +130 -0
  166. package/select/src/styles/_vars.css +28 -0
  167. package/select/src/styles/select-content.css +19 -0
  168. package/select/src/styles/select-feedback.css +6 -0
  169. package/select/src/styles/select-item.css +69 -0
  170. package/select/src/styles/select-trigger.css +95 -0
  171. package/select/src/styles/select.css +5 -0
  172. package/separator/src/styles/_vars.css +9 -0
  173. package/separator/src/styles/separator.css +25 -0
  174. package/sheet/src/styles/_vars.css +18 -0
  175. package/sheet/src/styles/sheet.css +215 -0
  176. package/sidebar/src/styles/_vars.css +24 -0
  177. package/sidebar/src/styles/sidebar.css +531 -0
  178. package/skeleton/src/styles/_vars.css +8 -0
  179. package/skeleton/src/styles/skeleton.css +40 -0
  180. package/slider/src/styles/_vars.css +17 -0
  181. package/slider/src/styles/slider.css +147 -0
  182. package/spinner/src/styles/_vars.css +9 -0
  183. package/spinner/src/styles/spinner.css +62 -0
  184. package/src/styles/components.css +47 -0
  185. package/styles/components.css +47 -0
  186. package/styles.css +49 -0
  187. package/switch/src/styles/_vars.css +34 -0
  188. package/switch/src/styles/switch.css +131 -0
  189. package/table/src/styles/_vars.css +25 -0
  190. package/table/src/styles/table.css +245 -0
  191. package/tabs/src/styles/_vars.css +23 -0
  192. package/tabs/src/styles/tabs.css +164 -0
  193. package/textarea/src/styles/_vars.css +20 -0
  194. package/textarea/src/styles/textarea.css +60 -0
  195. package/toast/src/styles/_vars.css +47 -0
  196. package/toast/src/styles/toast.css +314 -0
  197. package/toggle/src/styles/_vars.css +24 -0
  198. package/toggle/src/styles/toggle.css +110 -0
  199. package/tooltip/src/styles/_vars.css +21 -0
  200. package/tooltip/src/styles/tooltip.css +103 -0
  201. package/types/frame-ui-ng-components-accordion.d.ts +75 -0
  202. package/types/frame-ui-ng-components-alert.d.ts +30 -0
  203. package/types/frame-ui-ng-components-avatar.d.ts +65 -0
  204. package/types/frame-ui-ng-components-badge.d.ts +35 -0
  205. package/types/frame-ui-ng-components-breadcrumb.d.ts +40 -0
  206. package/types/frame-ui-ng-components-button-group.d.ts +18 -0
  207. package/types/frame-ui-ng-components-button.d.ts +50 -0
  208. package/types/frame-ui-ng-components-calendar.d.ts +101 -0
  209. package/types/frame-ui-ng-components-card.d.ts +51 -0
  210. package/types/frame-ui-ng-components-carousel.d.ts +117 -0
  211. package/types/frame-ui-ng-components-checkbox.d.ts +25 -0
  212. package/types/frame-ui-ng-components-collapsible.d.ts +55 -0
  213. package/types/frame-ui-ng-components-combobox.d.ts +201 -0
  214. package/types/frame-ui-ng-components-command.d.ts +198 -0
  215. package/types/frame-ui-ng-components-context-menu.d.ts +149 -0
  216. package/types/frame-ui-ng-components-date-picker.d.ts +95 -0
  217. package/types/frame-ui-ng-components-dropdown-menu.d.ts +182 -0
  218. package/types/frame-ui-ng-components-empty.d.ts +44 -0
  219. package/types/frame-ui-ng-components-field.d.ts +60 -0
  220. package/types/frame-ui-ng-components-forms.d.ts +39 -0
  221. package/types/frame-ui-ng-components-hover-card.d.ts +94 -0
  222. package/types/frame-ui-ng-components-input-otp.d.ts +70 -0
  223. package/types/frame-ui-ng-components-input.d.ts +67 -0
  224. package/types/frame-ui-ng-components-item.d.ts +62 -0
  225. package/types/frame-ui-ng-components-menubar.d.ts +76 -0
  226. package/types/frame-ui-ng-components-modal.d.ts +148 -0
  227. package/types/frame-ui-ng-components-navigation-menu.d.ts +74 -0
  228. package/types/frame-ui-ng-components-pagination.d.ts +79 -0
  229. package/types/frame-ui-ng-components-popover.d.ts +95 -0
  230. package/types/frame-ui-ng-components-progress.d.ts +24 -0
  231. package/types/frame-ui-ng-components-radio-group.d.ts +40 -0
  232. package/types/frame-ui-ng-components-resizable.d.ts +61 -0
  233. package/types/frame-ui-ng-components-select.d.ts +114 -0
  234. package/types/frame-ui-ng-components-separator.d.ts +19 -0
  235. package/types/frame-ui-ng-components-sheet.d.ts +146 -0
  236. package/types/frame-ui-ng-components-sidebar.d.ts +163 -0
  237. package/types/frame-ui-ng-components-skeleton.d.ts +18 -0
  238. package/types/frame-ui-ng-components-slider.d.ts +56 -0
  239. package/types/frame-ui-ng-components-spinner.d.ts +23 -0
  240. package/types/frame-ui-ng-components-switch.d.ts +38 -0
  241. package/types/frame-ui-ng-components-table.d.ts +125 -0
  242. package/types/frame-ui-ng-components-tabs.d.ts +62 -0
  243. package/types/frame-ui-ng-components-textarea.d.ts +14 -0
  244. package/types/frame-ui-ng-components-toast.d.ts +74 -0
  245. package/types/frame-ui-ng-components-toggle.d.ts +45 -0
  246. package/types/frame-ui-ng-components-tooltip.d.ts +99 -0
  247. package/types/frame-ui-ng-components-virtual-scroll.d.ts +106 -0
  248. package/types/frame-ui-ng-components.d.ts +2746 -0
  249. package/virtual-scroll/src/styles/virtual-scroll.css +54 -0
@@ -0,0 +1,579 @@
1
+ import * as i1 from '@angular/cdk/menu';
2
+ import { CdkMenu, CdkTargetMenuAim, CdkMenuItem, CdkMenuItemCheckbox, CdkMenuGroup, CdkMenuItemRadio, CdkMenuTrigger, CdkContextMenuTrigger } from '@angular/cdk/menu';
3
+ import * as i0 from '@angular/core';
4
+ import { InjectionToken, inject, TemplateRef, input, booleanAttribute, Directive, effect, signal, DestroyRef, ElementRef, output, NgModule } from '@angular/core';
5
+ import { buildConnectedPositions, FR_DROPDOWN_MENU_CONTENT, FrDropdownMenuTree, FR_DROPDOWN_MENU_PARENT, defaultPositions } from '@frame-ui-ng/components/dropdown-menu';
6
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
7
+
8
+ const FR_CONTEXT_MENU_CONTENT = new InjectionToken('FrContextMenuContent');
9
+ class FrContextMenuContent {
10
+ templateRef = inject((TemplateRef));
11
+ align = input('start', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
12
+ alignOffset = input(0, ...(ngDevMode ? [{ debugName: "alignOffset" }] : /* istanbul ignore next */ []));
13
+ debugVisible = input(false, { ...(ngDevMode ? { debugName: "debugVisible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
14
+ side = input('right', ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
15
+ sideOffset = input(4, ...(ngDevMode ? [{ debugName: "sideOffset" }] : /* istanbul ignore next */ []));
16
+ isDebugVisible() {
17
+ return this.debugVisible();
18
+ }
19
+ getPositions(isSubmenu) {
20
+ return buildConnectedPositions({
21
+ align: this.align(),
22
+ alignOffset: this.alignOffset(),
23
+ isSubmenu,
24
+ side: this.side(),
25
+ sideOffset: this.sideOffset(),
26
+ });
27
+ }
28
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
29
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrContextMenuContent, isStandalone: true, selector: "ng-template[frContextMenuContent], ng-template[frContextMenuSubContent]", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, alignOffset: { classPropertyName: "alignOffset", publicName: "alignOffset", isSignal: true, isRequired: false, transformFunction: null }, debugVisible: { classPropertyName: "debugVisible", publicName: "debugVisible", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, sideOffset: { classPropertyName: "sideOffset", publicName: "sideOffset", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
30
+ {
31
+ provide: FR_CONTEXT_MENU_CONTENT,
32
+ useExisting: FrContextMenuContent,
33
+ },
34
+ {
35
+ provide: FR_DROPDOWN_MENU_CONTENT,
36
+ useExisting: FrContextMenuContent,
37
+ },
38
+ ], exportAs: ["frContextMenuContent"], ngImport: i0 });
39
+ }
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuContent, decorators: [{
41
+ type: Directive,
42
+ args: [{
43
+ selector: 'ng-template[frContextMenuContent], ng-template[frContextMenuSubContent]',
44
+ exportAs: 'frContextMenuContent',
45
+ providers: [
46
+ {
47
+ provide: FR_CONTEXT_MENU_CONTENT,
48
+ useExisting: FrContextMenuContent,
49
+ },
50
+ {
51
+ provide: FR_DROPDOWN_MENU_CONTENT,
52
+ useExisting: FrContextMenuContent,
53
+ },
54
+ ],
55
+ }]
56
+ }], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], alignOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignOffset", required: false }] }], debugVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "debugVisible", required: false }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], sideOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "sideOffset", required: false }] }] } });
57
+ class FrContextMenuPanel {
58
+ side = inject(FR_CONTEXT_MENU_CONTENT).side;
59
+ tree = inject(FrDropdownMenuTree);
60
+ parent = inject(FR_DROPDOWN_MENU_PARENT);
61
+ handleMouseEnter() {
62
+ this.tree.enterInteractiveArea();
63
+ }
64
+ handleMouseLeave() {
65
+ this.tree.leaveInteractiveArea(this.parent.closeDelay());
66
+ }
67
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuPanel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
68
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrContextMenuPanel, isStandalone: true, selector: "[frContextMenuPanel]", host: { attributes: { "tabindex": "-1" }, listeners: { "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()" }, properties: { "attr.data-side": "side()" }, classAttribute: "frame-context-menu__content frame-dropdown-menu__content" }, hostDirectives: [{ directive: i1.CdkMenu }, { directive: i1.CdkTargetMenuAim }], ngImport: i0 });
69
+ }
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuPanel, decorators: [{
71
+ type: Directive,
72
+ args: [{
73
+ selector: '[frContextMenuPanel]',
74
+ hostDirectives: [CdkMenu, CdkTargetMenuAim],
75
+ host: {
76
+ class: 'frame-context-menu__content frame-dropdown-menu__content',
77
+ '[attr.data-side]': 'side()',
78
+ tabindex: '-1',
79
+ '(mouseenter)': 'handleMouseEnter()',
80
+ '(mouseleave)': 'handleMouseLeave()',
81
+ },
82
+ }]
83
+ }] });
84
+
85
+ class FrContextMenuItem {
86
+ inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
87
+ variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
88
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
89
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrContextMenuItem, isStandalone: true, selector: "[frContextMenuItem]", inputs: { inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-inset": "inset() ? \"\" : null", "attr.data-variant": "variant()" }, classAttribute: "frame-context-menu__item frame-dropdown-menu__item" }, hostDirectives: [{ directive: i1.CdkMenuItem }], ngImport: i0 });
90
+ }
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuItem, decorators: [{
92
+ type: Directive,
93
+ args: [{
94
+ selector: '[frContextMenuItem]',
95
+ hostDirectives: [CdkMenuItem],
96
+ host: {
97
+ class: 'frame-context-menu__item frame-dropdown-menu__item',
98
+ '[attr.data-inset]': 'inset() ? "" : null',
99
+ '[attr.data-variant]': 'variant()',
100
+ },
101
+ }]
102
+ }], propDecorators: { inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
103
+ class FrContextMenuCheckboxItem {
104
+ checkboxItem = inject(CdkMenuItemCheckbox);
105
+ checked = input(false, { ...(ngDevMode ? { debugName: "checked" } : /* istanbul ignore next */ {}), alias: 'checked',
106
+ transform: booleanAttribute });
107
+ inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
108
+ variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
109
+ constructor() {
110
+ effect(() => {
111
+ this.checkboxItem.checked = this.checked();
112
+ });
113
+ }
114
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuCheckboxItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
115
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrContextMenuCheckboxItem, isStandalone: true, selector: "button[frContextMenuCheckboxItem]", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-checked": "checkboxItem.checked ? \"\" : null", "attr.data-inset": "inset() ? \"\" : null", "attr.data-variant": "variant()" }, classAttribute: "frame-context-menu__item frame-context-menu__checkbox-item frame-dropdown-menu__item frame-dropdown-menu__checkbox-item" }, hostDirectives: [{ directive: i1.CdkMenuItemCheckbox }], ngImport: i0 });
116
+ }
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuCheckboxItem, decorators: [{
118
+ type: Directive,
119
+ args: [{
120
+ selector: 'button[frContextMenuCheckboxItem]',
121
+ hostDirectives: [CdkMenuItemCheckbox],
122
+ host: {
123
+ class: 'frame-context-menu__item frame-context-menu__checkbox-item frame-dropdown-menu__item frame-dropdown-menu__checkbox-item',
124
+ '[attr.data-checked]': 'checkboxItem.checked ? "" : null',
125
+ '[attr.data-inset]': 'inset() ? "" : null',
126
+ '[attr.data-variant]': 'variant()',
127
+ },
128
+ }]
129
+ }], ctorParameters: () => [], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
130
+ class FrContextMenuRadioGroup {
131
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
132
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrContextMenuRadioGroup, isStandalone: true, selector: "[frContextMenuRadioGroup]", host: { classAttribute: "frame-context-menu__radio-group frame-dropdown-menu__radio-group" }, hostDirectives: [{ directive: i1.CdkMenuGroup }], ngImport: i0 });
133
+ }
134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuRadioGroup, decorators: [{
135
+ type: Directive,
136
+ args: [{
137
+ selector: '[frContextMenuRadioGroup]',
138
+ hostDirectives: [CdkMenuGroup],
139
+ host: {
140
+ class: 'frame-context-menu__radio-group frame-dropdown-menu__radio-group',
141
+ },
142
+ }]
143
+ }] });
144
+ class FrContextMenuRadioItem {
145
+ radioItem = inject(CdkMenuItemRadio);
146
+ checked = input(false, { ...(ngDevMode ? { debugName: "checked" } : /* istanbul ignore next */ {}), alias: 'checked',
147
+ transform: booleanAttribute });
148
+ inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
149
+ variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
150
+ constructor() {
151
+ effect(() => {
152
+ this.radioItem.checked = this.checked();
153
+ });
154
+ }
155
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuRadioItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
156
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrContextMenuRadioItem, isStandalone: true, selector: "button[frContextMenuRadioItem]", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-checked": "radioItem.checked ? \"\" : null", "attr.data-inset": "inset() ? \"\" : null", "attr.data-variant": "variant()" }, classAttribute: "frame-context-menu__item frame-context-menu__radio-item frame-dropdown-menu__item frame-dropdown-menu__radio-item" }, hostDirectives: [{ directive: i1.CdkMenuItemRadio }], ngImport: i0 });
157
+ }
158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuRadioItem, decorators: [{
159
+ type: Directive,
160
+ args: [{
161
+ selector: 'button[frContextMenuRadioItem]',
162
+ hostDirectives: [CdkMenuItemRadio],
163
+ host: {
164
+ class: 'frame-context-menu__item frame-context-menu__radio-item frame-dropdown-menu__item frame-dropdown-menu__radio-item',
165
+ '[attr.data-checked]': 'radioItem.checked ? "" : null',
166
+ '[attr.data-inset]': 'inset() ? "" : null',
167
+ '[attr.data-variant]': 'variant()',
168
+ },
169
+ }]
170
+ }], ctorParameters: () => [], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
171
+ class FrContextMenuLabel {
172
+ inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
173
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
174
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrContextMenuLabel, isStandalone: true, selector: "[frContextMenuLabel]", inputs: { inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-inset": "inset() ? \"\" : null" }, classAttribute: "frame-context-menu__label frame-dropdown-menu__label" }, ngImport: i0 });
175
+ }
176
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuLabel, decorators: [{
177
+ type: Directive,
178
+ args: [{
179
+ selector: '[frContextMenuLabel]',
180
+ host: {
181
+ class: 'frame-context-menu__label frame-dropdown-menu__label',
182
+ '[attr.data-inset]': 'inset() ? "" : null',
183
+ },
184
+ }]
185
+ }], propDecorators: { inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }] } });
186
+ class FrContextMenuSeparator {
187
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
188
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrContextMenuSeparator, isStandalone: true, selector: "[frContextMenuSeparator]", host: { attributes: { "role": "separator" }, classAttribute: "frame-context-menu__separator frame-dropdown-menu__separator" }, ngImport: i0 });
189
+ }
190
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuSeparator, decorators: [{
191
+ type: Directive,
192
+ args: [{
193
+ selector: '[frContextMenuSeparator]',
194
+ host: {
195
+ class: 'frame-context-menu__separator frame-dropdown-menu__separator',
196
+ role: 'separator',
197
+ },
198
+ }]
199
+ }] });
200
+ class FrContextMenuShortcut {
201
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuShortcut, deps: [], target: i0.ɵɵFactoryTarget.Directive });
202
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrContextMenuShortcut, isStandalone: true, selector: "[frContextMenuShortcut]", host: { classAttribute: "frame-context-menu__shortcut frame-dropdown-menu__shortcut" }, ngImport: i0 });
203
+ }
204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuShortcut, decorators: [{
205
+ type: Directive,
206
+ args: [{
207
+ selector: '[frContextMenuShortcut]',
208
+ host: {
209
+ class: 'frame-context-menu__shortcut frame-dropdown-menu__shortcut',
210
+ },
211
+ }]
212
+ }] });
213
+ class FrContextMenuItemIndicator {
214
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuItemIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
215
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrContextMenuItemIndicator, isStandalone: true, selector: "[frContextMenuItemIndicator]", host: { attributes: { "aria-hidden": "true" }, classAttribute: "frame-context-menu__indicator frame-dropdown-menu__indicator" }, ngImport: i0 });
216
+ }
217
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuItemIndicator, decorators: [{
218
+ type: Directive,
219
+ args: [{
220
+ selector: '[frContextMenuItemIndicator]',
221
+ host: {
222
+ class: 'frame-context-menu__indicator frame-dropdown-menu__indicator',
223
+ 'aria-hidden': 'true',
224
+ },
225
+ }]
226
+ }] });
227
+
228
+ class FrContextMenu {
229
+ closeDelay = input(140, ...(ngDevMode ? [{ debugName: "closeDelay" }] : /* istanbul ignore next */ []));
230
+ triggerMode = input('both', ...(ngDevMode ? [{ debugName: "triggerMode" }] : /* istanbul ignore next */ []));
231
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenu, deps: [], target: i0.ɵɵFactoryTarget.Directive });
232
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrContextMenu, isStandalone: true, selector: "[frContextMenu]", inputs: { closeDelay: { classPropertyName: "closeDelay", publicName: "closeDelay", isSignal: true, isRequired: false, transformFunction: null }, triggerMode: { classPropertyName: "triggerMode", publicName: "triggerMode", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "frame-context-menu-root" }, providers: [
233
+ FrDropdownMenuTree,
234
+ {
235
+ provide: FR_DROPDOWN_MENU_PARENT,
236
+ useExisting: FrContextMenu,
237
+ },
238
+ ], ngImport: i0 });
239
+ }
240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenu, decorators: [{
241
+ type: Directive,
242
+ args: [{
243
+ selector: '[frContextMenu]',
244
+ providers: [
245
+ FrDropdownMenuTree,
246
+ {
247
+ provide: FR_DROPDOWN_MENU_PARENT,
248
+ useExisting: FrContextMenu,
249
+ },
250
+ ],
251
+ host: {
252
+ class: 'frame-context-menu-root',
253
+ },
254
+ }]
255
+ }], propDecorators: { closeDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeDelay", required: false }] }], triggerMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerMode", required: false }] }] } });
256
+ class FrContextMenuSub {
257
+ parent = inject(FR_DROPDOWN_MENU_PARENT, { skipSelf: true });
258
+ closeDelayInput = input(null, { ...(ngDevMode ? { debugName: "closeDelayInput" } : /* istanbul ignore next */ {}), alias: 'closeDelay' });
259
+ triggerModeInput = input(null, { ...(ngDevMode ? { debugName: "triggerModeInput" } : /* istanbul ignore next */ {}), alias: 'triggerMode' });
260
+ closeDelay = signal(this.parent.closeDelay(), ...(ngDevMode ? [{ debugName: "closeDelay" }] : /* istanbul ignore next */ []));
261
+ triggerMode = signal(this.parent.triggerMode(), ...(ngDevMode ? [{ debugName: "triggerMode" }] : /* istanbul ignore next */ []));
262
+ constructor() {
263
+ effect(() => {
264
+ this.closeDelay.set(this.closeDelayInput() ?? this.parent.closeDelay());
265
+ this.triggerMode.set(this.triggerModeInput() ?? this.parent.triggerMode());
266
+ });
267
+ }
268
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuSub, deps: [], target: i0.ɵɵFactoryTarget.Directive });
269
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrContextMenuSub, isStandalone: true, selector: "[frContextMenuSub]", inputs: { closeDelayInput: { classPropertyName: "closeDelayInput", publicName: "closeDelay", isSignal: true, isRequired: false, transformFunction: null }, triggerModeInput: { classPropertyName: "triggerModeInput", publicName: "triggerMode", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "frame-context-menu-sub frame-dropdown-menu-sub" }, providers: [
270
+ {
271
+ provide: FR_DROPDOWN_MENU_PARENT,
272
+ useExisting: FrContextMenuSub,
273
+ },
274
+ ], ngImport: i0 });
275
+ }
276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuSub, decorators: [{
277
+ type: Directive,
278
+ args: [{
279
+ selector: '[frContextMenuSub]',
280
+ providers: [
281
+ {
282
+ provide: FR_DROPDOWN_MENU_PARENT,
283
+ useExisting: FrContextMenuSub,
284
+ },
285
+ ],
286
+ host: {
287
+ class: 'frame-context-menu-sub frame-dropdown-menu-sub',
288
+ },
289
+ }]
290
+ }], ctorParameters: () => [], propDecorators: { closeDelayInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeDelay", required: false }] }], triggerModeInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerMode", required: false }] }] } });
291
+
292
+ class FrContextMenuSubTrigger {
293
+ cdkMenuTrigger = inject(CdkMenuTrigger);
294
+ destroyRef = inject(DestroyRef);
295
+ tree = inject(FrDropdownMenuTree);
296
+ parent = inject(FR_DROPDOWN_MENU_PARENT);
297
+ menuContent = input(null, { ...(ngDevMode ? { debugName: "menuContent" } : /* istanbul ignore next */ {}), alias: 'frContextMenuSubTrigger' });
298
+ inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
299
+ triggerModeInput = input(null, { ...(ngDevMode ? { debugName: "triggerModeInput" } : /* istanbul ignore next */ {}), alias: 'triggerMode' });
300
+ variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
301
+ isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
302
+ constructor() {
303
+ this.tree.register(this);
304
+ effect(() => {
305
+ const content = this.menuContent();
306
+ this.cdkMenuTrigger.menuTemplateRef = content?.templateRef ?? null;
307
+ this.cdkMenuTrigger.menuPosition = this.resolvePositions();
308
+ if (content?.isDebugVisible() && !this.cdkMenuTrigger.isOpen()) {
309
+ queueMicrotask(() => {
310
+ if (!this.cdkMenuTrigger.isOpen()) {
311
+ this.cdkMenuTrigger.open();
312
+ }
313
+ });
314
+ }
315
+ });
316
+ this.cdkMenuTrigger.opened.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
317
+ this.tree.cancelClose();
318
+ this.isOpen.set(true);
319
+ });
320
+ this.cdkMenuTrigger.closed.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
321
+ if (this.menuContent()?.isDebugVisible()) {
322
+ queueMicrotask(() => {
323
+ if (!this.cdkMenuTrigger.isOpen()) {
324
+ this.cdkMenuTrigger.open();
325
+ }
326
+ });
327
+ return;
328
+ }
329
+ this.isOpen.set(false);
330
+ });
331
+ }
332
+ close() {
333
+ if (this.menuContent()?.isDebugVisible()) {
334
+ return;
335
+ }
336
+ if (this.cdkMenuTrigger.isOpen()) {
337
+ this.cdkMenuTrigger.close();
338
+ }
339
+ }
340
+ ngOnDestroy() {
341
+ this.tree.unregister(this);
342
+ }
343
+ handleMouseEnter() {
344
+ this.tree.enterInteractiveArea();
345
+ if (this.triggerMode === 'hover' || this.triggerMode === 'both') {
346
+ this.tree.cancelClose();
347
+ if (!this.cdkMenuTrigger.isOpen()) {
348
+ this.cdkMenuTrigger.open();
349
+ }
350
+ }
351
+ }
352
+ handleMouseLeave() {
353
+ if (this.menuContent()?.isDebugVisible()) {
354
+ return;
355
+ }
356
+ if (this.triggerMode === 'hover' || this.triggerMode === 'both') {
357
+ this.tree.leaveInteractiveArea(this.parent.closeDelay());
358
+ }
359
+ }
360
+ get triggerMode() {
361
+ return this.triggerModeInput() ?? this.parent.triggerMode();
362
+ }
363
+ resolvePositions() {
364
+ return this.menuContent()?.getPositions(true) ?? defaultPositions(true);
365
+ }
366
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuSubTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
367
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrContextMenuSubTrigger, isStandalone: true, selector: "[frContextMenuSubTrigger]", inputs: { menuContent: { classPropertyName: "menuContent", publicName: "frContextMenuSubTrigger", isSignal: true, isRequired: false, transformFunction: null }, inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null }, triggerModeInput: { classPropertyName: "triggerModeInput", publicName: "triggerMode", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()" }, properties: { "attr.data-inset": "inset() ? \"\" : null", "attr.data-state": "isOpen() ? \"open\" : \"closed\"", "attr.data-variant": "variant()" }, classAttribute: "frame-context-menu__item frame-context-menu__sub-trigger frame-dropdown-menu__item frame-dropdown-menu__sub-trigger" }, hostDirectives: [{ directive: i1.CdkMenuItem }, { directive: i1.CdkMenuTrigger }], ngImport: i0 });
368
+ }
369
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuSubTrigger, decorators: [{
370
+ type: Directive,
371
+ args: [{
372
+ selector: '[frContextMenuSubTrigger]',
373
+ hostDirectives: [CdkMenuItem, CdkMenuTrigger],
374
+ host: {
375
+ class: 'frame-context-menu__item frame-context-menu__sub-trigger frame-dropdown-menu__item frame-dropdown-menu__sub-trigger',
376
+ '[attr.data-inset]': 'inset() ? "" : null',
377
+ '[attr.data-state]': 'isOpen() ? "open" : "closed"',
378
+ '[attr.data-variant]': 'variant()',
379
+ '(mouseenter)': 'handleMouseEnter()',
380
+ '(mouseleave)': 'handleMouseLeave()',
381
+ },
382
+ }]
383
+ }], ctorParameters: () => [], propDecorators: { menuContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "frContextMenuSubTrigger", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], triggerModeInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerMode", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
384
+
385
+ class FrContextMenuTrigger {
386
+ static CUSTOM_PROPERTY_PREFIX = '--frame-dropdown-menu-';
387
+ cdkContextMenuTrigger = inject(CdkContextMenuTrigger);
388
+ destroyRef = inject(DestroyRef);
389
+ elementRef = inject(ElementRef);
390
+ longPressTimeoutId = null;
391
+ menuContent = input(null, { ...(ngDevMode ? { debugName: "menuContent" } : /* istanbul ignore next */ {}), alias: 'frContextMenuTrigger' });
392
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
393
+ longPressDelay = input(520, ...(ngDevMode ? [{ debugName: "longPressDelay" }] : /* istanbul ignore next */ []));
394
+ opened = output();
395
+ closed = output();
396
+ isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
397
+ constructor() {
398
+ effect(() => {
399
+ const content = this.menuContent();
400
+ this.cdkContextMenuTrigger.menuTemplateRef = content?.templateRef ?? null;
401
+ this.cdkContextMenuTrigger.menuPosition = this.resolvePositions();
402
+ this.cdkContextMenuTrigger.disabled = this.disabled();
403
+ if (content?.isDebugVisible() && !this.cdkContextMenuTrigger.isOpen()) {
404
+ queueMicrotask(() => {
405
+ if (!this.cdkContextMenuTrigger.isOpen()) {
406
+ this.openAtCenter();
407
+ }
408
+ });
409
+ }
410
+ });
411
+ this.cdkContextMenuTrigger.opened.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
412
+ this.isOpen.set(true);
413
+ this.opened.emit();
414
+ queueMicrotask(() => {
415
+ this.syncCustomPropertiesToOverlay();
416
+ });
417
+ });
418
+ this.cdkContextMenuTrigger.closed.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
419
+ if (this.menuContent()?.isDebugVisible()) {
420
+ queueMicrotask(() => {
421
+ if (!this.cdkContextMenuTrigger.isOpen()) {
422
+ this.openAtCenter();
423
+ }
424
+ });
425
+ return;
426
+ }
427
+ this.isOpen.set(false);
428
+ this.closed.emit();
429
+ });
430
+ }
431
+ openAt(coordinates) {
432
+ if (this.disabled() || !this.menuContent()) {
433
+ return;
434
+ }
435
+ this.cdkContextMenuTrigger.open(coordinates);
436
+ }
437
+ close() {
438
+ this.cdkContextMenuTrigger.close();
439
+ }
440
+ handlePointerDown(event) {
441
+ if (this.disabled() || (event.pointerType !== 'touch' && event.pointerType !== 'pen')) {
442
+ return;
443
+ }
444
+ this.clearLongPress();
445
+ this.longPressTimeoutId = setTimeout(() => {
446
+ event.preventDefault();
447
+ this.openAt({ x: event.clientX, y: event.clientY });
448
+ }, this.longPressDelay());
449
+ }
450
+ clearLongPress() {
451
+ if (this.longPressTimeoutId === null) {
452
+ return;
453
+ }
454
+ clearTimeout(this.longPressTimeoutId);
455
+ this.longPressTimeoutId = null;
456
+ }
457
+ resolvePositions() {
458
+ return this.menuContent()?.getPositions(false) ?? defaultPositions(false);
459
+ }
460
+ openAtCenter() {
461
+ const rect = this.elementRef.nativeElement.getBoundingClientRect();
462
+ this.openAt({
463
+ x: rect.left + rect.width / 2,
464
+ y: rect.top + rect.height / 2,
465
+ });
466
+ }
467
+ syncCustomPropertiesToOverlay() {
468
+ const overlayRef = this.cdkContextMenuTrigger.overlayRef;
469
+ const overlayElement = overlayRef?.overlayElement ?? null;
470
+ if (!overlayElement) {
471
+ return;
472
+ }
473
+ const menuPanel = overlayElement.querySelector('.frame-dropdown-menu__content') ?? overlayElement;
474
+ const sourceStyles = getComputedStyle(this.elementRef.nativeElement);
475
+ for (let index = 0; index < sourceStyles.length; index += 1) {
476
+ const propertyName = sourceStyles.item(index);
477
+ if (!propertyName.startsWith(FrContextMenuTrigger.CUSTOM_PROPERTY_PREFIX)) {
478
+ continue;
479
+ }
480
+ const propertyValue = sourceStyles.getPropertyValue(propertyName);
481
+ overlayElement.style.setProperty(propertyName, propertyValue);
482
+ menuPanel.style.setProperty(propertyName, propertyValue);
483
+ }
484
+ }
485
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
486
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrContextMenuTrigger, isStandalone: true, selector: "[frContextMenuTrigger]", inputs: { menuContent: { classPropertyName: "menuContent", publicName: "frContextMenuTrigger", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, longPressDelay: { classPropertyName: "longPressDelay", publicName: "longPressDelay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed" }, host: { listeners: { "pointerdown": "handlePointerDown($event)", "pointerup": "clearLongPress()", "pointercancel": "clearLongPress()", "pointerleave": "clearLongPress()" }, properties: { "attr.data-state": "isOpen() ? \"open\" : \"closed\"", "attr.data-disabled": "disabled() ? \"\" : null" }, classAttribute: "frame-context-menu__trigger" }, hostDirectives: [{ directive: i1.CdkContextMenuTrigger }], ngImport: i0 });
487
+ }
488
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuTrigger, decorators: [{
489
+ type: Directive,
490
+ args: [{
491
+ selector: '[frContextMenuTrigger]',
492
+ hostDirectives: [CdkContextMenuTrigger],
493
+ host: {
494
+ class: 'frame-context-menu__trigger',
495
+ '[attr.data-state]': 'isOpen() ? "open" : "closed"',
496
+ '[attr.data-disabled]': 'disabled() ? "" : null',
497
+ '(pointerdown)': 'handlePointerDown($event)',
498
+ '(pointerup)': 'clearLongPress()',
499
+ '(pointercancel)': 'clearLongPress()',
500
+ '(pointerleave)': 'clearLongPress()',
501
+ },
502
+ }]
503
+ }], ctorParameters: () => [], propDecorators: { menuContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "frContextMenuTrigger", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], longPressDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "longPressDelay", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
504
+
505
+ class FrContextMenuModule {
506
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
507
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuModule, imports: [FrContextMenu,
508
+ FrContextMenuCheckboxItem,
509
+ FrContextMenuContent,
510
+ FrContextMenuItem,
511
+ FrContextMenuItemIndicator,
512
+ FrContextMenuLabel,
513
+ FrContextMenuPanel,
514
+ FrContextMenuRadioGroup,
515
+ FrContextMenuRadioItem,
516
+ FrContextMenuSeparator,
517
+ FrContextMenuShortcut,
518
+ FrContextMenuSub,
519
+ FrContextMenuSubTrigger,
520
+ FrContextMenuTrigger], exports: [FrContextMenu,
521
+ FrContextMenuCheckboxItem,
522
+ FrContextMenuContent,
523
+ FrContextMenuItem,
524
+ FrContextMenuItemIndicator,
525
+ FrContextMenuLabel,
526
+ FrContextMenuPanel,
527
+ FrContextMenuRadioGroup,
528
+ FrContextMenuRadioItem,
529
+ FrContextMenuSeparator,
530
+ FrContextMenuShortcut,
531
+ FrContextMenuSub,
532
+ FrContextMenuSubTrigger,
533
+ FrContextMenuTrigger] });
534
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuModule });
535
+ }
536
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrContextMenuModule, decorators: [{
537
+ type: NgModule,
538
+ args: [{
539
+ imports: [
540
+ FrContextMenu,
541
+ FrContextMenuCheckboxItem,
542
+ FrContextMenuContent,
543
+ FrContextMenuItem,
544
+ FrContextMenuItemIndicator,
545
+ FrContextMenuLabel,
546
+ FrContextMenuPanel,
547
+ FrContextMenuRadioGroup,
548
+ FrContextMenuRadioItem,
549
+ FrContextMenuSeparator,
550
+ FrContextMenuShortcut,
551
+ FrContextMenuSub,
552
+ FrContextMenuSubTrigger,
553
+ FrContextMenuTrigger,
554
+ ],
555
+ exports: [
556
+ FrContextMenu,
557
+ FrContextMenuCheckboxItem,
558
+ FrContextMenuContent,
559
+ FrContextMenuItem,
560
+ FrContextMenuItemIndicator,
561
+ FrContextMenuLabel,
562
+ FrContextMenuPanel,
563
+ FrContextMenuRadioGroup,
564
+ FrContextMenuRadioItem,
565
+ FrContextMenuSeparator,
566
+ FrContextMenuShortcut,
567
+ FrContextMenuSub,
568
+ FrContextMenuSubTrigger,
569
+ FrContextMenuTrigger,
570
+ ],
571
+ }]
572
+ }] });
573
+
574
+ /**
575
+ * Generated bundle index. Do not edit.
576
+ */
577
+
578
+ export { FR_CONTEXT_MENU_CONTENT, FrContextMenu, FrContextMenuCheckboxItem, FrContextMenuContent, FrContextMenuItem, FrContextMenuItemIndicator, FrContextMenuLabel, FrContextMenuModule, FrContextMenuPanel, FrContextMenuRadioGroup, FrContextMenuRadioItem, FrContextMenuSeparator, FrContextMenuShortcut, FrContextMenuSub, FrContextMenuSubTrigger, FrContextMenuTrigger };
579
+ //# sourceMappingURL=frame-ui-ng-components-context-menu.mjs.map