yukit-web 0.10.6 → 0.10.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/fesm2022/yukit-web-chart.mjs +807 -552
  2. package/fesm2022/yukit-web-chart.mjs.map +1 -1
  3. package/fesm2022/yukit-web-helm-accordion.mjs +271 -100
  4. package/fesm2022/yukit-web-helm-accordion.mjs.map +1 -1
  5. package/fesm2022/yukit-web-helm-alert-dialog.mjs +675 -243
  6. package/fesm2022/yukit-web-helm-alert-dialog.mjs.map +1 -1
  7. package/fesm2022/yukit-web-helm-alert.mjs +199 -91
  8. package/fesm2022/yukit-web-helm-alert.mjs.map +1 -1
  9. package/fesm2022/yukit-web-helm-aspect-ratio.mjs +77 -43
  10. package/fesm2022/yukit-web-helm-aspect-ratio.mjs.map +1 -1
  11. package/fesm2022/yukit-web-helm-attachment.mjs +552 -205
  12. package/fesm2022/yukit-web-helm-attachment.mjs.map +1 -1
  13. package/fesm2022/yukit-web-helm-autocomplete.mjs +913 -288
  14. package/fesm2022/yukit-web-helm-autocomplete.mjs.map +1 -1
  15. package/fesm2022/yukit-web-helm-avatar.mjs +298 -137
  16. package/fesm2022/yukit-web-helm-avatar.mjs.map +1 -1
  17. package/fesm2022/yukit-web-helm-badge.mjs +78 -44
  18. package/fesm2022/yukit-web-helm-badge.mjs.map +1 -1
  19. package/fesm2022/yukit-web-helm-breadcrumb.mjs +466 -183
  20. package/fesm2022/yukit-web-helm-breadcrumb.mjs.map +1 -1
  21. package/fesm2022/yukit-web-helm-bubble.mjs +297 -118
  22. package/fesm2022/yukit-web-helm-bubble.mjs.map +1 -1
  23. package/fesm2022/yukit-web-helm-button-group.mjs +179 -83
  24. package/fesm2022/yukit-web-helm-button-group.mjs.map +1 -1
  25. package/fesm2022/yukit-web-helm-button.mjs +137 -67
  26. package/fesm2022/yukit-web-helm-button.mjs.map +1 -1
  27. package/fesm2022/yukit-web-helm-calendar.mjs +957 -230
  28. package/fesm2022/yukit-web-helm-calendar.mjs.map +1 -1
  29. package/fesm2022/yukit-web-helm-card.mjs +318 -136
  30. package/fesm2022/yukit-web-helm-card.mjs.map +1 -1
  31. package/fesm2022/yukit-web-helm-carousel.mjs +563 -233
  32. package/fesm2022/yukit-web-helm-carousel.mjs.map +1 -1
  33. package/fesm2022/yukit-web-helm-checkbox.mjs +367 -101
  34. package/fesm2022/yukit-web-helm-checkbox.mjs.map +1 -1
  35. package/fesm2022/yukit-web-helm-collapsible.mjs +155 -61
  36. package/fesm2022/yukit-web-helm-collapsible.mjs.map +1 -1
  37. package/fesm2022/yukit-web-helm-combobox.mjs +1572 -481
  38. package/fesm2022/yukit-web-helm-combobox.mjs.map +1 -1
  39. package/fesm2022/yukit-web-helm-command.mjs +752 -260
  40. package/fesm2022/yukit-web-helm-command.mjs.map +1 -1
  41. package/fesm2022/yukit-web-helm-context-menu.mjs +161 -63
  42. package/fesm2022/yukit-web-helm-context-menu.mjs.map +1 -1
  43. package/fesm2022/yukit-web-helm-date-picker.mjs +2322 -932
  44. package/fesm2022/yukit-web-helm-date-picker.mjs.map +1 -1
  45. package/fesm2022/yukit-web-helm-dialog.mjs +625 -240
  46. package/fesm2022/yukit-web-helm-dialog.mjs.map +1 -1
  47. package/fesm2022/yukit-web-helm-drawer.mjs +539 -222
  48. package/fesm2022/yukit-web-helm-drawer.mjs.map +1 -1
  49. package/fesm2022/yukit-web-helm-dropdown-menu.mjs +1295 -493
  50. package/fesm2022/yukit-web-helm-dropdown-menu.mjs.map +1 -1
  51. package/fesm2022/yukit-web-helm-empty.mjs +280 -121
  52. package/fesm2022/yukit-web-helm-empty.mjs.map +1 -1
  53. package/fesm2022/yukit-web-helm-field.mjs +670 -301
  54. package/fesm2022/yukit-web-helm-field.mjs.map +1 -1
  55. package/fesm2022/yukit-web-helm-hover-card.mjs +198 -99
  56. package/fesm2022/yukit-web-helm-hover-card.mjs.map +1 -1
  57. package/fesm2022/yukit-web-helm-input-group.mjs +357 -165
  58. package/fesm2022/yukit-web-helm-input-group.mjs.map +1 -1
  59. package/fesm2022/yukit-web-helm-input-otp.mjs +306 -114
  60. package/fesm2022/yukit-web-helm-input-otp.mjs.map +1 -1
  61. package/fesm2022/yukit-web-helm-input.mjs +62 -30
  62. package/fesm2022/yukit-web-helm-input.mjs.map +1 -1
  63. package/fesm2022/yukit-web-helm-item.mjs +545 -227
  64. package/fesm2022/yukit-web-helm-item.mjs.map +1 -1
  65. package/fesm2022/yukit-web-helm-kbd.mjs +85 -44
  66. package/fesm2022/yukit-web-helm-kbd.mjs.map +1 -1
  67. package/fesm2022/yukit-web-helm-label.mjs +60 -28
  68. package/fesm2022/yukit-web-helm-label.mjs.map +1 -1
  69. package/fesm2022/yukit-web-helm-marker.mjs +165 -74
  70. package/fesm2022/yukit-web-helm-marker.mjs.map +1 -1
  71. package/fesm2022/yukit-web-helm-menubar.mjs +207 -82
  72. package/fesm2022/yukit-web-helm-menubar.mjs.map +1 -1
  73. package/fesm2022/yukit-web-helm-message.mjs +277 -112
  74. package/fesm2022/yukit-web-helm-message.mjs.map +1 -1
  75. package/fesm2022/yukit-web-helm-native-select.mjs +363 -129
  76. package/fesm2022/yukit-web-helm-native-select.mjs.map +1 -1
  77. package/fesm2022/yukit-web-helm-navigation-menu.mjs +398 -166
  78. package/fesm2022/yukit-web-helm-navigation-menu.mjs.map +1 -1
  79. package/fesm2022/yukit-web-helm-pagination.mjs +1444 -460
  80. package/fesm2022/yukit-web-helm-pagination.mjs.map +1 -1
  81. package/fesm2022/yukit-web-helm-popover.mjs +358 -133
  82. package/fesm2022/yukit-web-helm-popover.mjs.map +1 -1
  83. package/fesm2022/yukit-web-helm-progress.mjs +126 -58
  84. package/fesm2022/yukit-web-helm-progress.mjs.map +1 -1
  85. package/fesm2022/yukit-web-helm-radio-group.mjs +420 -144
  86. package/fesm2022/yukit-web-helm-radio-group.mjs.map +1 -1
  87. package/fesm2022/yukit-web-helm-resizable.mjs +210 -91
  88. package/fesm2022/yukit-web-helm-resizable.mjs.map +1 -1
  89. package/fesm2022/yukit-web-helm-scroll-area.mjs +64 -34
  90. package/fesm2022/yukit-web-helm-scroll-area.mjs.map +1 -1
  91. package/fesm2022/yukit-web-helm-select.mjs +1059 -351
  92. package/fesm2022/yukit-web-helm-select.mjs.map +1 -1
  93. package/fesm2022/yukit-web-helm-separator.mjs +61 -31
  94. package/fesm2022/yukit-web-helm-separator.mjs.map +1 -1
  95. package/fesm2022/yukit-web-helm-sheet.mjs +590 -231
  96. package/fesm2022/yukit-web-helm-sheet.mjs.map +1 -1
  97. package/fesm2022/yukit-web-helm-sidebar.mjs +1781 -757
  98. package/fesm2022/yukit-web-helm-sidebar.mjs.map +1 -1
  99. package/fesm2022/yukit-web-helm-skeleton.mjs +45 -27
  100. package/fesm2022/yukit-web-helm-skeleton.mjs.map +1 -1
  101. package/fesm2022/yukit-web-helm-slider.mjs +139 -59
  102. package/fesm2022/yukit-web-helm-slider.mjs.map +1 -1
  103. package/fesm2022/yukit-web-helm-sonner.mjs +350 -62
  104. package/fesm2022/yukit-web-helm-sonner.mjs.map +1 -1
  105. package/fesm2022/yukit-web-helm-spinner.mjs +118 -44
  106. package/fesm2022/yukit-web-helm-spinner.mjs.map +1 -1
  107. package/fesm2022/yukit-web-helm-switch.mjs +326 -94
  108. package/fesm2022/yukit-web-helm-switch.mjs.map +1 -1
  109. package/fesm2022/yukit-web-helm-table.mjs +374 -177
  110. package/fesm2022/yukit-web-helm-table.mjs.map +1 -1
  111. package/fesm2022/yukit-web-helm-tabs.mjs +549 -173
  112. package/fesm2022/yukit-web-helm-tabs.mjs.map +1 -1
  113. package/fesm2022/yukit-web-helm-textarea.mjs +62 -30
  114. package/fesm2022/yukit-web-helm-textarea.mjs.map +1 -1
  115. package/fesm2022/yukit-web-helm-toggle-group.mjs +291 -89
  116. package/fesm2022/yukit-web-helm-toggle-group.mjs.map +1 -1
  117. package/fesm2022/yukit-web-helm-toggle.mjs +132 -57
  118. package/fesm2022/yukit-web-helm-toggle.mjs.map +1 -1
  119. package/fesm2022/yukit-web-helm-tooltip.mjs +84 -54
  120. package/fesm2022/yukit-web-helm-tooltip.mjs.map +1 -1
  121. package/fesm2022/yukit-web-helm-typography.mjs +461 -202
  122. package/fesm2022/yukit-web-helm-typography.mjs.map +1 -1
  123. package/fesm2022/yukit-web-helm-utils.mjs +131 -253
  124. package/fesm2022/yukit-web-helm-utils.mjs.map +1 -1
  125. package/fesm2022/yukit-web.mjs +24457 -9670
  126. package/fesm2022/yukit-web.mjs.map +1 -1
  127. package/package.json +9 -9
  128. package/types/yukit-web-chart.d.ts +184 -125
  129. package/types/yukit-web-helm-accordion.d.ts +49 -28
  130. package/types/yukit-web-helm-alert-dialog.d.ts +127 -73
  131. package/types/yukit-web-helm-alert.d.ts +30 -32
  132. package/types/yukit-web-helm-aspect-ratio.d.ts +17 -15
  133. package/types/yukit-web-helm-attachment.d.ts +97 -69
  134. package/types/yukit-web-helm-autocomplete.d.ts +205 -79
  135. package/types/yukit-web-helm-avatar.d.ts +44 -39
  136. package/types/yukit-web-helm-badge.d.ts +18 -17
  137. package/types/yukit-web-helm-breadcrumb.d.ts +69 -45
  138. package/types/yukit-web-helm-bubble.d.ts +54 -40
  139. package/types/yukit-web-helm-button-group.d.ts +29 -22
  140. package/types/yukit-web-helm-button.d.ts +41 -31
  141. package/types/yukit-web-helm-calendar.d.ts +157 -85
  142. package/types/yukit-web-helm-card.d.ts +38 -42
  143. package/types/yukit-web-helm-carousel.d.ts +105 -73
  144. package/types/yukit-web-helm-checkbox.d.ts +117 -58
  145. package/types/yukit-web-helm-collapsible.d.ts +34 -19
  146. package/types/yukit-web-helm-combobox.d.ts +355 -150
  147. package/types/yukit-web-helm-command.d.ts +140 -73
  148. package/types/yukit-web-helm-context-menu.d.ts +48 -27
  149. package/types/yukit-web-helm-date-picker.d.ts +852 -556
  150. package/types/yukit-web-helm-dialog.d.ts +106 -78
  151. package/types/yukit-web-helm-drawer.d.ts +90 -61
  152. package/types/yukit-web-helm-dropdown-menu.d.ts +278 -158
  153. package/types/yukit-web-helm-empty.d.ts +38 -42
  154. package/types/yukit-web-helm-field.d.ts +122 -91
  155. package/types/yukit-web-helm-hover-card.d.ts +39 -27
  156. package/types/yukit-web-helm-input-group.d.ts +63 -41
  157. package/types/yukit-web-helm-input-otp.d.ts +38 -35
  158. package/types/yukit-web-helm-input.d.ts +19 -12
  159. package/types/yukit-web-helm-item.d.ts +90 -82
  160. package/types/yukit-web-helm-kbd.d.ts +10 -15
  161. package/types/yukit-web-helm-label.d.ts +14 -11
  162. package/types/yukit-web-helm-marker.d.ts +26 -27
  163. package/types/yukit-web-helm-menubar.d.ts +61 -32
  164. package/types/yukit-web-helm-message.d.ts +34 -38
  165. package/types/yukit-web-helm-native-select.d.ts +102 -61
  166. package/types/yukit-web-helm-navigation-menu.d.ts +76 -42
  167. package/types/yukit-web-helm-pagination.d.ts +344 -166
  168. package/types/yukit-web-helm-popover.d.ts +62 -42
  169. package/types/yukit-web-helm-progress.d.ts +27 -20
  170. package/types/yukit-web-helm-radio-group.d.ts +121 -63
  171. package/types/yukit-web-helm-resizable.d.ts +46 -24
  172. package/types/yukit-web-helm-scroll-area.d.ts +6 -10
  173. package/types/yukit-web-helm-select.d.ts +231 -114
  174. package/types/yukit-web-helm-separator.d.ts +15 -12
  175. package/types/yukit-web-helm-sheet.d.ts +94 -65
  176. package/types/yukit-web-helm-sidebar.d.ts +322 -232
  177. package/types/yukit-web-helm-skeleton.d.ts +6 -10
  178. package/types/yukit-web-helm-slider.d.ts +33 -13
  179. package/types/yukit-web-helm-sonner.d.ts +112 -51
  180. package/types/yukit-web-helm-spinner.d.ts +24 -17
  181. package/types/yukit-web-helm-switch.d.ts +89 -51
  182. package/types/yukit-web-helm-table.d.ts +38 -42
  183. package/types/yukit-web-helm-tabs.d.ts +116 -60
  184. package/types/yukit-web-helm-textarea.d.ts +19 -12
  185. package/types/yukit-web-helm-toggle-group.d.ts +81 -32
  186. package/types/yukit-web-helm-toggle.d.ts +39 -21
  187. package/types/yukit-web-helm-tooltip.d.ts +21 -16
  188. package/types/yukit-web-helm-typography.d.ts +62 -77
  189. package/types/yukit-web-helm-utils.d.ts +8 -11
  190. package/types/yukit-web.d.ts +5092 -2351
@@ -1,508 +1,1310 @@
1
- import * as i1 from '@angular/cdk/menu';
2
- import { CdkMenu, CdkMenuItem, CdkMenuItemCheckbox, CdkMenuItemSelectable, CdkMenuGroup, CdkMenuItemRadio, CdkMenuTrigger } from '@angular/cdk/menu';
3
- import * as i0 from '@angular/core';
4
- import { inject, ElementRef, signal, input, numberAttribute, Directive, booleanAttribute, ChangeDetectionStrategy, Component, HOST_TAG_NAME, InjectionToken, computed, effect, forwardRef } from '@angular/core';
5
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
- import { MENU_SIDE, deriveMenuSideFromTransformOrigin, createMenuPosition } from '@spartan-ng/brain/core';
7
- import { classes } from 'yukit-web/helm/utils';
8
- import { InputModalityDetector } from '@angular/cdk/a11y';
9
- import { NgIcon, provideIcons } from '@ng-icons/core';
10
- import { lucideCheck, lucideChevronRight } from '@ng-icons/lucide';
11
-
12
- class HlmDropdownMenu {
13
- constructor() {
14
- this._host = inject(CdkMenu);
15
- this._elementRef = inject((ElementRef));
16
- // The trigger provides its configured side; CDK parents this content's injector under the trigger's.
17
- this._menuSide = inject(MENU_SIDE, { optional: true });
18
- this._state = signal('open', ...(ngDevMode ? [{ debugName: "_state" }] : /* istanbul ignore next */ []));
19
- this._side = signal(this._menuSide?.side() ?? 'bottom', ...(ngDevMode ? [{ debugName: "_side" }] : /* istanbul ignore next */ []));
20
- this.sideOffset = input(1, { ...(ngDevMode ? { debugName: "sideOffset" } : /* istanbul ignore next */ {}), transform: numberAttribute });
21
- classes(() => 'motion-safe:data-open:animate-in motion-safe:data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-100 my-[--spacing(var(--side-offset))] overflow-x-hidden overflow-y-auto outline-none');
22
- this.setSideFromTransformOrigin();
23
- // this is a best effort, but does not seem to work currently
24
- // TODO: figure out a way for us to know the host is about to be closed. might not be possible with CDK
25
- this._host.closed.pipe(takeUntilDestroyed()).subscribe(() => this._state.set('closed'));
26
- }
27
- setSideFromTransformOrigin() {
28
- const side = this._menuSide?.side() ?? 'bottom';
29
- // CDK sets transform-origin on this element synchronously on attach; read it next tick and derive side
30
- setTimeout(() => {
31
- this._side.set(deriveMenuSideFromTransformOrigin(this._elementRef.nativeElement.style.transformOrigin, side));
32
- });
33
- }
34
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenu, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
35
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: HlmDropdownMenu, isStandalone: true, selector: "[hlmDropdownMenu],hlm-dropdown-menu", inputs: { sideOffset: { classPropertyName: "sideOffset", publicName: "sideOffset", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "dropdown-menu" }, properties: { "attr.data-state": "_state()", "attr.data-side": "_side()", "style.--side-offset": "sideOffset()" } }, hostDirectives: [{ directive: i1.CdkMenu }], ngImport: i0 }); }
36
- }
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenu, decorators: [{
38
- type: Directive,
39
- args: [{
40
- selector: '[hlmDropdownMenu],hlm-dropdown-menu',
41
- hostDirectives: [CdkMenu],
42
- host: {
43
- 'data-slot': 'dropdown-menu',
44
- '[attr.data-state]': '_state()',
45
- '[attr.data-side]': '_side()',
46
- '[style.--side-offset]': 'sideOffset()',
47
- },
48
- }]
49
- }], ctorParameters: () => [], propDecorators: { sideOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "sideOffset", required: false }] }] } });
50
-
51
- /**
52
- * @internal
53
- * Moves DOM focus to the hovered menu item. CDK menus only move focus with the keyboard, so on a pointer
54
- * the highlight would otherwise stay on the last keyboard-focused item (leaving two rows highlighted) and,
55
- * when a submenu closes, focus would fall to <body>, the menu stack would report no focus, and the whole
56
- * dropdown would collapse. Following the pointer with focus (Radix/shadcn behaviour) keeps a single
57
- * highlight and keeps focus inside the menu stack. setActiveMenuItem also syncs the key manager so keyboard
58
- * navigation continues from the hovered item.
59
- *
60
- * Applied as a host directive on every dropdown item type (item, checkbox, radio, sub-trigger).
61
- */
62
- class HlmDropdownMenuFocusOnHover {
63
- constructor() {
64
- this._cdkMenuItem = inject(CdkMenuItem, { self: true });
65
- this._parentMenu = inject(CdkMenu, { optional: true });
66
- this._inputModality = inject(InputModalityDetector);
67
- }
68
- _focusOnHover() {
69
- // Only skip synthetic hovers from touch taps; every real hover (mouse, or keyboard-then-hover,
70
- // which leaves the modality as 'keyboard') should move focus to keep a single highlight.
71
- if (this._inputModality.mostRecentModality === 'touch' || this._cdkMenuItem.disabled) {
72
- return;
73
- }
74
- this._parentMenu?.setActiveMenuItem(this._cdkMenuItem);
75
- }
76
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuFocusOnHover, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
77
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: HlmDropdownMenuFocusOnHover, isStandalone: true, selector: "[hlmDropdownMenuFocusOnHover]", host: { listeners: { "mouseenter": "_focusOnHover()" } }, ngImport: i0 }); }
78
- }
79
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuFocusOnHover, decorators: [{
80
- type: Directive,
81
- args: [{
82
- selector: '[hlmDropdownMenuFocusOnHover]',
83
- host: {
84
- '(mouseenter)': '_focusOnHover()',
85
- },
86
- }]
87
- }] });
88
-
89
- /** @internal. Use HlmDropdownMenuCheckbox instead. */
90
- class HlmDropdownMenuCheckboxCdk extends CdkMenuItemCheckbox {
91
- constructor() {
92
- super(...arguments);
93
- this.keepOpen = input(true, { ...(ngDevMode ? { debugName: "keepOpen" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
94
- }
95
- trigger(options) {
96
- super.trigger({ ...options, keepOpen: this.keepOpen() });
97
- }
98
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuCheckboxCdk, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
99
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: HlmDropdownMenuCheckboxCdk, isStandalone: true, selector: "[hlmDropdownMenuCheckboxCdk]", inputs: { keepOpen: { classPropertyName: "keepOpen", publicName: "keepOpen", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
100
- { provide: CdkMenuItemCheckbox, useExisting: HlmDropdownMenuCheckboxCdk },
101
- { provide: CdkMenuItemSelectable, useExisting: HlmDropdownMenuCheckboxCdk },
102
- { provide: CdkMenuItem, useExisting: CdkMenuItemSelectable },
103
- ], usesInheritance: true, ngImport: i0 }); }
104
- }
105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuCheckboxCdk, decorators: [{
106
- type: Directive,
107
- args: [{
108
- selector: '[hlmDropdownMenuCheckboxCdk]',
109
- providers: [
110
- { provide: CdkMenuItemCheckbox, useExisting: HlmDropdownMenuCheckboxCdk },
111
- { provide: CdkMenuItemSelectable, useExisting: HlmDropdownMenuCheckboxCdk },
112
- { provide: CdkMenuItem, useExisting: CdkMenuItemSelectable },
113
- ],
114
- }]
115
- }], propDecorators: { keepOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepOpen", required: false }] }] } });
116
- class HlmDropdownMenuCheckbox {
117
- constructor() {
118
- this._cdkMenuItem = inject(HlmDropdownMenuCheckboxCdk);
119
- this.inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
120
- classes(() => "hover:bg-accent focus:bg-accent hover:text-accent-foreground focus:text-accent-foreground hover:**:text-accent-foreground focus:**:text-accent-foreground gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm data-inset:ps-7 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] group/dropdown-menu-checkbox relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0");
121
- }
122
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
123
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: HlmDropdownMenuCheckbox, isStandalone: true, selector: "[hlmDropdownMenuCheckbox],[hlmDropdownMenuCheckboxItem]", inputs: { inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "dropdown-menu-checkbox-item" }, properties: { "attr.data-disabled": "_cdkMenuItem.disabled ? \"\" : null", "attr.data-checked": "_cdkMenuItem.checked ? \"\" : null", "attr.data-inset": "inset() ? \"\" : null" } }, hostDirectives: [{ directive: HlmDropdownMenuCheckboxCdk, inputs: ["cdkMenuItemDisabled", "disabled", "cdkMenuItemChecked", "checked", "keepOpen", "keepOpen"], outputs: ["cdkMenuItemTriggered", "triggered"] }, { directive: HlmDropdownMenuFocusOnHover }], ngImport: i0 }); }
124
- }
125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuCheckbox, decorators: [{
126
- type: Directive,
127
- args: [{
128
- selector: '[hlmDropdownMenuCheckbox],[hlmDropdownMenuCheckboxItem]',
129
- hostDirectives: [
130
- {
131
- directive: HlmDropdownMenuCheckboxCdk,
132
- inputs: ['cdkMenuItemDisabled: disabled', 'cdkMenuItemChecked: checked', 'keepOpen'],
133
- outputs: ['cdkMenuItemTriggered: triggered'],
134
- },
135
- HlmDropdownMenuFocusOnHover,
136
- ],
137
- host: {
138
- 'data-slot': 'dropdown-menu-checkbox-item',
139
- '[attr.data-disabled]': '_cdkMenuItem.disabled ? "" : null',
140
- '[attr.data-checked]': '_cdkMenuItem.checked ? "" : null',
141
- '[attr.data-inset]': 'inset() ? "" : null',
142
- },
143
- }]
144
- }], ctorParameters: () => [], propDecorators: { inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }] } });
145
-
146
- class HlmDropdownMenuCheckboxIndicator {
147
- constructor() {
148
- classes(() => 'absolute end-2 flex items-center justify-center [&_ng-icon]:text-[length:--spacing(4)] pointer-events-none opacity-0 group-data-checked/dropdown-menu-checkbox:opacity-100');
149
- }
150
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuCheckboxIndicator, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
151
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: HlmDropdownMenuCheckboxIndicator, isStandalone: true, selector: "hlm-dropdown-menu-checkbox-indicator", host: { attributes: { "data-slot": "dropdown-menu-checkbox-item-indicator" } }, providers: [provideIcons({ lucideCheck })], ngImport: i0, template: `
152
- <ng-icon name="lucideCheck" />
153
- `, isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
154
- }
155
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuCheckboxIndicator, decorators: [{
156
- type: Component,
157
- args: [{
158
- selector: 'hlm-dropdown-menu-checkbox-indicator',
159
- imports: [NgIcon],
160
- providers: [provideIcons({ lucideCheck })],
161
- changeDetection: ChangeDetectionStrategy.OnPush,
162
- host: { 'data-slot': 'dropdown-menu-checkbox-item-indicator' },
163
- template: `
1
+ import * as i1 from "@angular/cdk/menu";
2
+ import { CdkMenu, CdkMenuGroup, CdkMenuItem, CdkMenuItemCheckbox, CdkMenuItemRadio, CdkMenuItemSelectable, CdkMenuTrigger } from "@angular/cdk/menu";
3
+ import * as i0 from "@angular/core";
4
+ import { ChangeDetectionStrategy, Component, Directive, ElementRef, HOST_TAG_NAME, InjectionToken, booleanAttribute, computed, effect, forwardRef, inject, input, numberAttribute, signal } from "@angular/core";
5
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
6
+ import { MENU_SIDE, createMenuPosition, deriveMenuSideFromTransformOrigin } from "@spartan-ng/brain/core";
7
+ import { classes } from "yukit-web/helm/utils";
8
+ import { InputModalityDetector } from "@angular/cdk/a11y";
9
+ import { NgIcon, provideIcons } from "@ng-icons/core";
10
+ import { lucideCheck, lucideChevronRight } from "@ng-icons/lucide";
11
+ var HlmDropdownMenu = class HlmDropdownMenu {
12
+ constructor() {
13
+ this._host = inject(CdkMenu);
14
+ this._elementRef = inject(ElementRef);
15
+ this._menuSide = inject(MENU_SIDE, { optional: true });
16
+ this._state = signal("open", ...ngDevMode ? [{ debugName: "_state" }] : /* istanbul ignore next */ []);
17
+ this._side = signal(this._menuSide?.side() ?? "bottom", ...ngDevMode ? [{ debugName: "_side" }] : /* istanbul ignore next */ []);
18
+ this.sideOffset = input(1, {
19
+ ...ngDevMode ? { debugName: "sideOffset" } : /* istanbul ignore next */ {},
20
+ transform: numberAttribute
21
+ });
22
+ classes(() => "motion-safe:data-open:animate-in motion-safe:data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-100 my-[--spacing(var(--side-offset))] overflow-x-hidden overflow-y-auto outline-none");
23
+ this.setSideFromTransformOrigin();
24
+ this._host.closed.pipe(takeUntilDestroyed()).subscribe(() => this._state.set("closed"));
25
+ }
26
+ setSideFromTransformOrigin() {
27
+ const side = this._menuSide?.side() ?? "bottom";
28
+ setTimeout(() => {
29
+ this._side.set(deriveMenuSideFromTransformOrigin(this._elementRef.nativeElement.style.transformOrigin, side));
30
+ });
31
+ }
32
+ static {
33
+ this.ɵfac = i0.ɵɵngDeclareFactory({
34
+ minVersion: "12.0.0",
35
+ version: "22.2.4",
36
+ ngImport: i0,
37
+ type: HlmDropdownMenu,
38
+ deps: [],
39
+ target: i0.ɵɵFactoryTarget.Directive
40
+ });
41
+ }
42
+ static {
43
+ this.ɵdir = i0.ɵɵngDeclareDirective({
44
+ minVersion: "17.1.0",
45
+ version: "22.2.4",
46
+ type: HlmDropdownMenu,
47
+ isStandalone: true,
48
+ selector: "[hlmDropdownMenu],hlm-dropdown-menu",
49
+ inputs: { sideOffset: {
50
+ classPropertyName: "sideOffset",
51
+ publicName: "sideOffset",
52
+ isSignal: true,
53
+ isRequired: false,
54
+ transformFunction: null
55
+ } },
56
+ host: {
57
+ attributes: { "data-slot": "dropdown-menu" },
58
+ properties: {
59
+ "attr.data-state": "_state()",
60
+ "attr.data-side": "_side()",
61
+ "style.--side-offset": "sideOffset()"
62
+ }
63
+ },
64
+ hostDirectives: [{ directive: i1.CdkMenu }],
65
+ ngImport: i0
66
+ });
67
+ }
68
+ };
69
+ i0.ɵɵngDeclareClassMetadata({
70
+ minVersion: "12.0.0",
71
+ version: "22.2.4",
72
+ ngImport: i0,
73
+ type: HlmDropdownMenu,
74
+ decorators: [{
75
+ type: Directive,
76
+ args: [{
77
+ selector: "[hlmDropdownMenu],hlm-dropdown-menu",
78
+ hostDirectives: [CdkMenu],
79
+ host: {
80
+ "data-slot": "dropdown-menu",
81
+ "[attr.data-state]": "_state()",
82
+ "[attr.data-side]": "_side()",
83
+ "[style.--side-offset]": "sideOffset()"
84
+ }
85
+ }]
86
+ }],
87
+ ctorParameters: () => [],
88
+ propDecorators: { sideOffset: [{
89
+ type: i0.Input,
90
+ args: [{
91
+ isSignal: true,
92
+ alias: "sideOffset",
93
+ required: false
94
+ }]
95
+ }] }
96
+ });
97
+ var HlmDropdownMenuFocusOnHover = class HlmDropdownMenuFocusOnHover {
98
+ constructor() {
99
+ this._cdkMenuItem = inject(CdkMenuItem, { self: true });
100
+ this._parentMenu = inject(CdkMenu, { optional: true });
101
+ this._inputModality = inject(InputModalityDetector);
102
+ }
103
+ _focusOnHover() {
104
+ if (this._inputModality.mostRecentModality === "touch" || this._cdkMenuItem.disabled) return;
105
+ this._parentMenu?.setActiveMenuItem(this._cdkMenuItem);
106
+ }
107
+ static {
108
+ this.ɵfac = i0.ɵɵngDeclareFactory({
109
+ minVersion: "12.0.0",
110
+ version: "22.2.4",
111
+ ngImport: i0,
112
+ type: HlmDropdownMenuFocusOnHover,
113
+ deps: [],
114
+ target: i0.ɵɵFactoryTarget.Directive
115
+ });
116
+ }
117
+ static {
118
+ this.ɵdir = i0.ɵɵngDeclareDirective({
119
+ minVersion: "14.0.0",
120
+ version: "22.2.4",
121
+ type: HlmDropdownMenuFocusOnHover,
122
+ isStandalone: true,
123
+ selector: "[hlmDropdownMenuFocusOnHover]",
124
+ host: { listeners: { "mouseenter": "_focusOnHover()" } },
125
+ ngImport: i0
126
+ });
127
+ }
128
+ };
129
+ i0.ɵɵngDeclareClassMetadata({
130
+ minVersion: "12.0.0",
131
+ version: "22.2.4",
132
+ ngImport: i0,
133
+ type: HlmDropdownMenuFocusOnHover,
134
+ decorators: [{
135
+ type: Directive,
136
+ args: [{
137
+ selector: "[hlmDropdownMenuFocusOnHover]",
138
+ host: { "(mouseenter)": "_focusOnHover()" }
139
+ }]
140
+ }]
141
+ });
142
+ var HlmDropdownMenuCheckboxCdk = class HlmDropdownMenuCheckboxCdk extends CdkMenuItemCheckbox {
143
+ constructor() {
144
+ super(...arguments);
145
+ this.keepOpen = input(true, {
146
+ ...ngDevMode ? { debugName: "keepOpen" } : /* istanbul ignore next */ {},
147
+ transform: booleanAttribute
148
+ });
149
+ }
150
+ trigger(options) {
151
+ super.trigger({
152
+ ...options,
153
+ keepOpen: this.keepOpen()
154
+ });
155
+ }
156
+ static {
157
+ this.ɵfac = i0.ɵɵngDeclareFactory({
158
+ minVersion: "12.0.0",
159
+ version: "22.2.4",
160
+ ngImport: i0,
161
+ type: HlmDropdownMenuCheckboxCdk,
162
+ deps: null,
163
+ target: i0.ɵɵFactoryTarget.Directive
164
+ });
165
+ }
166
+ static {
167
+ this.ɵdir = i0.ɵɵngDeclareDirective({
168
+ minVersion: "17.1.0",
169
+ version: "22.2.4",
170
+ type: HlmDropdownMenuCheckboxCdk,
171
+ isStandalone: true,
172
+ selector: "[hlmDropdownMenuCheckboxCdk]",
173
+ inputs: { keepOpen: {
174
+ classPropertyName: "keepOpen",
175
+ publicName: "keepOpen",
176
+ isSignal: true,
177
+ isRequired: false,
178
+ transformFunction: null
179
+ } },
180
+ providers: [
181
+ {
182
+ provide: CdkMenuItemCheckbox,
183
+ useExisting: HlmDropdownMenuCheckboxCdk
184
+ },
185
+ {
186
+ provide: CdkMenuItemSelectable,
187
+ useExisting: HlmDropdownMenuCheckboxCdk
188
+ },
189
+ {
190
+ provide: CdkMenuItem,
191
+ useExisting: CdkMenuItemSelectable
192
+ }
193
+ ],
194
+ usesInheritance: true,
195
+ ngImport: i0
196
+ });
197
+ }
198
+ };
199
+ i0.ɵɵngDeclareClassMetadata({
200
+ minVersion: "12.0.0",
201
+ version: "22.2.4",
202
+ ngImport: i0,
203
+ type: HlmDropdownMenuCheckboxCdk,
204
+ decorators: [{
205
+ type: Directive,
206
+ args: [{
207
+ selector: "[hlmDropdownMenuCheckboxCdk]",
208
+ providers: [
209
+ {
210
+ provide: CdkMenuItemCheckbox,
211
+ useExisting: HlmDropdownMenuCheckboxCdk
212
+ },
213
+ {
214
+ provide: CdkMenuItemSelectable,
215
+ useExisting: HlmDropdownMenuCheckboxCdk
216
+ },
217
+ {
218
+ provide: CdkMenuItem,
219
+ useExisting: CdkMenuItemSelectable
220
+ }
221
+ ]
222
+ }]
223
+ }],
224
+ propDecorators: { keepOpen: [{
225
+ type: i0.Input,
226
+ args: [{
227
+ isSignal: true,
228
+ alias: "keepOpen",
229
+ required: false
230
+ }]
231
+ }] }
232
+ });
233
+ var HlmDropdownMenuCheckbox = class HlmDropdownMenuCheckbox {
234
+ constructor() {
235
+ this._cdkMenuItem = inject(HlmDropdownMenuCheckboxCdk);
236
+ this.inset = input(false, {
237
+ ...ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {},
238
+ transform: booleanAttribute
239
+ });
240
+ classes(() => "hover:bg-accent focus:bg-accent hover:text-accent-foreground focus:text-accent-foreground hover:**:text-accent-foreground focus:**:text-accent-foreground gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm data-inset:ps-7 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] group/dropdown-menu-checkbox relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0");
241
+ }
242
+ static {
243
+ this.ɵfac = i0.ɵɵngDeclareFactory({
244
+ minVersion: "12.0.0",
245
+ version: "22.2.4",
246
+ ngImport: i0,
247
+ type: HlmDropdownMenuCheckbox,
248
+ deps: [],
249
+ target: i0.ɵɵFactoryTarget.Directive
250
+ });
251
+ }
252
+ static {
253
+ this.ɵdir = i0.ɵɵngDeclareDirective({
254
+ minVersion: "17.1.0",
255
+ version: "22.2.4",
256
+ type: HlmDropdownMenuCheckbox,
257
+ isStandalone: true,
258
+ selector: "[hlmDropdownMenuCheckbox],[hlmDropdownMenuCheckboxItem]",
259
+ inputs: { inset: {
260
+ classPropertyName: "inset",
261
+ publicName: "inset",
262
+ isSignal: true,
263
+ isRequired: false,
264
+ transformFunction: null
265
+ } },
266
+ host: {
267
+ attributes: { "data-slot": "dropdown-menu-checkbox-item" },
268
+ properties: {
269
+ "attr.data-disabled": "_cdkMenuItem.disabled ? \"\" : null",
270
+ "attr.data-checked": "_cdkMenuItem.checked ? \"\" : null",
271
+ "attr.data-inset": "inset() ? \"\" : null"
272
+ }
273
+ },
274
+ hostDirectives: [{
275
+ directive: HlmDropdownMenuCheckboxCdk,
276
+ inputs: [
277
+ "cdkMenuItemDisabled",
278
+ "disabled",
279
+ "cdkMenuItemChecked",
280
+ "checked",
281
+ "keepOpen",
282
+ "keepOpen"
283
+ ],
284
+ outputs: ["cdkMenuItemTriggered", "triggered"]
285
+ }, { directive: HlmDropdownMenuFocusOnHover }],
286
+ ngImport: i0
287
+ });
288
+ }
289
+ };
290
+ i0.ɵɵngDeclareClassMetadata({
291
+ minVersion: "12.0.0",
292
+ version: "22.2.4",
293
+ ngImport: i0,
294
+ type: HlmDropdownMenuCheckbox,
295
+ decorators: [{
296
+ type: Directive,
297
+ args: [{
298
+ selector: "[hlmDropdownMenuCheckbox],[hlmDropdownMenuCheckboxItem]",
299
+ hostDirectives: [{
300
+ directive: HlmDropdownMenuCheckboxCdk,
301
+ inputs: [
302
+ "cdkMenuItemDisabled: disabled",
303
+ "cdkMenuItemChecked: checked",
304
+ "keepOpen"
305
+ ],
306
+ outputs: ["cdkMenuItemTriggered: triggered"]
307
+ }, HlmDropdownMenuFocusOnHover],
308
+ host: {
309
+ "data-slot": "dropdown-menu-checkbox-item",
310
+ "[attr.data-disabled]": "_cdkMenuItem.disabled ? \"\" : null",
311
+ "[attr.data-checked]": "_cdkMenuItem.checked ? \"\" : null",
312
+ "[attr.data-inset]": "inset() ? \"\" : null"
313
+ }
314
+ }]
315
+ }],
316
+ ctorParameters: () => [],
317
+ propDecorators: { inset: [{
318
+ type: i0.Input,
319
+ args: [{
320
+ isSignal: true,
321
+ alias: "inset",
322
+ required: false
323
+ }]
324
+ }] }
325
+ });
326
+ var HlmDropdownMenuCheckboxIndicator = class HlmDropdownMenuCheckboxIndicator {
327
+ constructor() {
328
+ classes(() => "absolute end-2 flex items-center justify-center [&_ng-icon]:text-[length:--spacing(4)] pointer-events-none opacity-0 group-data-checked/dropdown-menu-checkbox:opacity-100");
329
+ }
330
+ static {
331
+ this.ɵfac = i0.ɵɵngDeclareFactory({
332
+ minVersion: "12.0.0",
333
+ version: "22.2.4",
334
+ ngImport: i0,
335
+ type: HlmDropdownMenuCheckboxIndicator,
336
+ deps: [],
337
+ target: i0.ɵɵFactoryTarget.Component
338
+ });
339
+ }
340
+ static {
341
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
342
+ minVersion: "14.0.0",
343
+ version: "22.2.4",
344
+ type: HlmDropdownMenuCheckboxIndicator,
345
+ isStandalone: true,
346
+ selector: "hlm-dropdown-menu-checkbox-indicator",
347
+ host: { attributes: { "data-slot": "dropdown-menu-checkbox-item-indicator" } },
348
+ providers: [provideIcons({ lucideCheck })],
349
+ ngImport: i0,
350
+ template: `
164
351
  <ng-icon name="lucideCheck" />
165
352
  `,
166
- }]
167
- }], ctorParameters: () => [] });
168
-
169
- class HlmDropdownMenuGroup {
170
- constructor() {
171
- classes(() => 'block');
172
- }
173
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
174
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: HlmDropdownMenuGroup, isStandalone: true, selector: "[hlmDropdownMenuGroup],hlm-dropdown-menu-group", host: { attributes: { "data-slot": "dropdown-menu-group" } }, hostDirectives: [{ directive: i1.CdkMenuGroup }], ngImport: i0 }); }
175
- }
176
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuGroup, decorators: [{
177
- type: Directive,
178
- args: [{
179
- selector: '[hlmDropdownMenuGroup],hlm-dropdown-menu-group',
180
- hostDirectives: [CdkMenuGroup],
181
- host: { 'data-slot': 'dropdown-menu-group' },
182
- }]
183
- }], ctorParameters: () => [] });
184
-
185
- class HlmDropdownMenuItem {
186
- constructor() {
187
- this._isButton = inject(HOST_TAG_NAME) === 'button';
188
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
189
- this.variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
190
- this.inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
191
- classes(() => "hover:bg-accent focus:bg-accent hover:text-accent-foreground focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:hover:bg-destructive/10 data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:hover:bg-destructive/20 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:hover:text-destructive data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[ng-icon]:text-destructive not-data-[variant=destructive]:hover:**:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md px-1.5 py-1 text-sm data-inset:ps-7 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] group/dropdown-menu-item relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0");
192
- }
193
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
194
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: HlmDropdownMenuItem, isStandalone: true, selector: "[hlmDropdownMenuItem],hlm-dropdown-menu-item", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "dropdown-menu-item" }, properties: { "attr.disabled": "_isButton && disabled() ? \"\" : null", "attr.data-disabled": "disabled() ? \"\" : null", "attr.data-variant": "variant()", "attr.data-inset": "inset() ? \"\" : null" } }, hostDirectives: [{ directive: i1.CdkMenuItem, inputs: ["cdkMenuItemDisabled", "disabled"], outputs: ["cdkMenuItemTriggered", "triggered"] }, { directive: HlmDropdownMenuFocusOnHover }], ngImport: i0 }); }
195
- }
196
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuItem, decorators: [{
197
- type: Directive,
198
- args: [{
199
- selector: '[hlmDropdownMenuItem],hlm-dropdown-menu-item',
200
- hostDirectives: [
201
- {
202
- directive: CdkMenuItem,
203
- inputs: ['cdkMenuItemDisabled: disabled'],
204
- outputs: ['cdkMenuItemTriggered: triggered'],
205
- },
206
- HlmDropdownMenuFocusOnHover,
207
- ],
208
- host: {
209
- 'data-slot': 'dropdown-menu-item',
210
- '[attr.disabled]': '_isButton && disabled() ? "" : null',
211
- '[attr.data-disabled]': 'disabled() ? "" : null',
212
- '[attr.data-variant]': 'variant()',
213
- '[attr.data-inset]': 'inset() ? "" : null',
214
- },
215
- }]
216
- }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }] } });
217
-
218
- class HlmDropdownMenuItemSubIndicator {
219
- constructor() {
220
- classes(() => 'ms-auto flex items-center justify-center');
221
- }
222
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuItemSubIndicator, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
223
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: HlmDropdownMenuItemSubIndicator, isStandalone: true, selector: "hlm-dropdown-menu-item-sub-indicator", providers: [provideIcons({ lucideChevronRight })], ngImport: i0, template: `
224
- <ng-icon name="lucideChevronRight" class="text-[length:--spacing(4)] rtl:rotate-180" />
225
- `, isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
226
- }
227
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuItemSubIndicator, decorators: [{
228
- type: Component,
229
- args: [{
230
- selector: 'hlm-dropdown-menu-item-sub-indicator',
231
- imports: [NgIcon],
232
- providers: [provideIcons({ lucideChevronRight })],
233
- changeDetection: ChangeDetectionStrategy.OnPush,
234
- template: `
353
+ isInline: true,
354
+ dependencies: [{
355
+ kind: "component",
356
+ type: NgIcon,
357
+ selector: "ng-icon",
358
+ inputs: [
359
+ "name",
360
+ "svg",
361
+ "size",
362
+ "strokeWidth",
363
+ "color"
364
+ ]
365
+ }],
366
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
367
+ });
368
+ }
369
+ };
370
+ i0.ɵɵngDeclareClassMetadata({
371
+ minVersion: "12.0.0",
372
+ version: "22.2.4",
373
+ ngImport: i0,
374
+ type: HlmDropdownMenuCheckboxIndicator,
375
+ decorators: [{
376
+ type: Component,
377
+ args: [{
378
+ selector: "hlm-dropdown-menu-checkbox-indicator",
379
+ imports: [NgIcon],
380
+ providers: [provideIcons({ lucideCheck })],
381
+ changeDetection: ChangeDetectionStrategy.OnPush,
382
+ host: { "data-slot": "dropdown-menu-checkbox-item-indicator" },
383
+ template: `
384
+ <ng-icon name="lucideCheck" />
385
+ `
386
+ }]
387
+ }],
388
+ ctorParameters: () => []
389
+ });
390
+ var HlmDropdownMenuGroup = class HlmDropdownMenuGroup {
391
+ constructor() {
392
+ classes(() => "block");
393
+ }
394
+ static {
395
+ this.ɵfac = i0.ɵɵngDeclareFactory({
396
+ minVersion: "12.0.0",
397
+ version: "22.2.4",
398
+ ngImport: i0,
399
+ type: HlmDropdownMenuGroup,
400
+ deps: [],
401
+ target: i0.ɵɵFactoryTarget.Directive
402
+ });
403
+ }
404
+ static {
405
+ this.ɵdir = i0.ɵɵngDeclareDirective({
406
+ minVersion: "14.0.0",
407
+ version: "22.2.4",
408
+ type: HlmDropdownMenuGroup,
409
+ isStandalone: true,
410
+ selector: "[hlmDropdownMenuGroup],hlm-dropdown-menu-group",
411
+ host: { attributes: { "data-slot": "dropdown-menu-group" } },
412
+ hostDirectives: [{ directive: i1.CdkMenuGroup }],
413
+ ngImport: i0
414
+ });
415
+ }
416
+ };
417
+ i0.ɵɵngDeclareClassMetadata({
418
+ minVersion: "12.0.0",
419
+ version: "22.2.4",
420
+ ngImport: i0,
421
+ type: HlmDropdownMenuGroup,
422
+ decorators: [{
423
+ type: Directive,
424
+ args: [{
425
+ selector: "[hlmDropdownMenuGroup],hlm-dropdown-menu-group",
426
+ hostDirectives: [CdkMenuGroup],
427
+ host: { "data-slot": "dropdown-menu-group" }
428
+ }]
429
+ }],
430
+ ctorParameters: () => []
431
+ });
432
+ var HlmDropdownMenuItem = class HlmDropdownMenuItem {
433
+ constructor() {
434
+ this._isButton = inject(HOST_TAG_NAME) === "button";
435
+ this.disabled = input(false, {
436
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
437
+ transform: booleanAttribute
438
+ });
439
+ this.variant = input("default", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
440
+ this.inset = input(false, {
441
+ ...ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {},
442
+ transform: booleanAttribute
443
+ });
444
+ classes(() => "hover:bg-accent focus:bg-accent hover:text-accent-foreground focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:hover:bg-destructive/10 data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:hover:bg-destructive/20 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:hover:text-destructive data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[ng-icon]:text-destructive not-data-[variant=destructive]:hover:**:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md px-1.5 py-1 text-sm data-inset:ps-7 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] group/dropdown-menu-item relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0");
445
+ }
446
+ static {
447
+ this.ɵfac = i0.ɵɵngDeclareFactory({
448
+ minVersion: "12.0.0",
449
+ version: "22.2.4",
450
+ ngImport: i0,
451
+ type: HlmDropdownMenuItem,
452
+ deps: [],
453
+ target: i0.ɵɵFactoryTarget.Directive
454
+ });
455
+ }
456
+ static {
457
+ this.ɵdir = i0.ɵɵngDeclareDirective({
458
+ minVersion: "17.1.0",
459
+ version: "22.2.4",
460
+ type: HlmDropdownMenuItem,
461
+ isStandalone: true,
462
+ selector: "[hlmDropdownMenuItem],hlm-dropdown-menu-item",
463
+ inputs: {
464
+ disabled: {
465
+ classPropertyName: "disabled",
466
+ publicName: "disabled",
467
+ isSignal: true,
468
+ isRequired: false,
469
+ transformFunction: null
470
+ },
471
+ variant: {
472
+ classPropertyName: "variant",
473
+ publicName: "variant",
474
+ isSignal: true,
475
+ isRequired: false,
476
+ transformFunction: null
477
+ },
478
+ inset: {
479
+ classPropertyName: "inset",
480
+ publicName: "inset",
481
+ isSignal: true,
482
+ isRequired: false,
483
+ transformFunction: null
484
+ }
485
+ },
486
+ host: {
487
+ attributes: { "data-slot": "dropdown-menu-item" },
488
+ properties: {
489
+ "attr.disabled": "_isButton && disabled() ? \"\" : null",
490
+ "attr.data-disabled": "disabled() ? \"\" : null",
491
+ "attr.data-variant": "variant()",
492
+ "attr.data-inset": "inset() ? \"\" : null"
493
+ }
494
+ },
495
+ hostDirectives: [{
496
+ directive: i1.CdkMenuItem,
497
+ inputs: ["cdkMenuItemDisabled", "disabled"],
498
+ outputs: ["cdkMenuItemTriggered", "triggered"]
499
+ }, { directive: HlmDropdownMenuFocusOnHover }],
500
+ ngImport: i0
501
+ });
502
+ }
503
+ };
504
+ i0.ɵɵngDeclareClassMetadata({
505
+ minVersion: "12.0.0",
506
+ version: "22.2.4",
507
+ ngImport: i0,
508
+ type: HlmDropdownMenuItem,
509
+ decorators: [{
510
+ type: Directive,
511
+ args: [{
512
+ selector: "[hlmDropdownMenuItem],hlm-dropdown-menu-item",
513
+ hostDirectives: [{
514
+ directive: CdkMenuItem,
515
+ inputs: ["cdkMenuItemDisabled: disabled"],
516
+ outputs: ["cdkMenuItemTriggered: triggered"]
517
+ }, HlmDropdownMenuFocusOnHover],
518
+ host: {
519
+ "data-slot": "dropdown-menu-item",
520
+ "[attr.disabled]": "_isButton && disabled() ? \"\" : null",
521
+ "[attr.data-disabled]": "disabled() ? \"\" : null",
522
+ "[attr.data-variant]": "variant()",
523
+ "[attr.data-inset]": "inset() ? \"\" : null"
524
+ }
525
+ }]
526
+ }],
527
+ ctorParameters: () => [],
528
+ propDecorators: {
529
+ disabled: [{
530
+ type: i0.Input,
531
+ args: [{
532
+ isSignal: true,
533
+ alias: "disabled",
534
+ required: false
535
+ }]
536
+ }],
537
+ variant: [{
538
+ type: i0.Input,
539
+ args: [{
540
+ isSignal: true,
541
+ alias: "variant",
542
+ required: false
543
+ }]
544
+ }],
545
+ inset: [{
546
+ type: i0.Input,
547
+ args: [{
548
+ isSignal: true,
549
+ alias: "inset",
550
+ required: false
551
+ }]
552
+ }]
553
+ }
554
+ });
555
+ var HlmDropdownMenuItemSubIndicator = class HlmDropdownMenuItemSubIndicator {
556
+ constructor() {
557
+ classes(() => "ms-auto flex items-center justify-center");
558
+ }
559
+ static {
560
+ this.ɵfac = i0.ɵɵngDeclareFactory({
561
+ minVersion: "12.0.0",
562
+ version: "22.2.4",
563
+ ngImport: i0,
564
+ type: HlmDropdownMenuItemSubIndicator,
565
+ deps: [],
566
+ target: i0.ɵɵFactoryTarget.Component
567
+ });
568
+ }
569
+ static {
570
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
571
+ minVersion: "14.0.0",
572
+ version: "22.2.4",
573
+ type: HlmDropdownMenuItemSubIndicator,
574
+ isStandalone: true,
575
+ selector: "hlm-dropdown-menu-item-sub-indicator",
576
+ providers: [provideIcons({ lucideChevronRight })],
577
+ ngImport: i0,
578
+ template: `
235
579
  <ng-icon name="lucideChevronRight" class="text-[length:--spacing(4)] rtl:rotate-180" />
236
580
  `,
237
- }]
238
- }], ctorParameters: () => [] });
239
-
240
- class HlmDropdownMenuLabel {
241
- constructor() {
242
- this.inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
243
- classes(() => 'text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:ps-7 block');
244
- }
245
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
246
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: HlmDropdownMenuLabel, isStandalone: true, selector: "[hlmDropdownMenuLabel],hlm-dropdown-menu-label", inputs: { inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "dropdown-menu-label" }, properties: { "attr.data-inset": "inset() ? \"\" : null" } }, ngImport: i0 }); }
247
- }
248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuLabel, decorators: [{
249
- type: Directive,
250
- args: [{
251
- selector: '[hlmDropdownMenuLabel],hlm-dropdown-menu-label',
252
- host: {
253
- 'data-slot': 'dropdown-menu-label',
254
- '[attr.data-inset]': 'inset() ? "" : null',
255
- },
256
- }]
257
- }], ctorParameters: () => [], propDecorators: { inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }] } });
258
-
259
- /** @internal. Use HlmDropdownMenuRadio instead. */
260
- class HlmDropdownMenuRadioCdk extends CdkMenuItemRadio {
261
- constructor() {
262
- super(...arguments);
263
- this.keepOpen = input(true, { ...(ngDevMode ? { debugName: "keepOpen" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
264
- }
265
- trigger(options) {
266
- super.trigger({ ...options, keepOpen: this.keepOpen() });
267
- }
268
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuRadioCdk, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
269
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: HlmDropdownMenuRadioCdk, isStandalone: true, selector: "[hlmDropdownMenuRadioCdk]", inputs: { keepOpen: { classPropertyName: "keepOpen", publicName: "keepOpen", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
270
- { provide: CdkMenuItemRadio, useExisting: HlmDropdownMenuRadioCdk },
271
- { provide: CdkMenuItemSelectable, useExisting: HlmDropdownMenuRadioCdk },
272
- { provide: CdkMenuItem, useExisting: CdkMenuItemSelectable },
273
- ], usesInheritance: true, ngImport: i0 }); }
274
- }
275
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuRadioCdk, decorators: [{
276
- type: Directive,
277
- args: [{
278
- selector: '[hlmDropdownMenuRadioCdk]',
279
- providers: [
280
- { provide: CdkMenuItemRadio, useExisting: HlmDropdownMenuRadioCdk },
281
- { provide: CdkMenuItemSelectable, useExisting: HlmDropdownMenuRadioCdk },
282
- { provide: CdkMenuItem, useExisting: CdkMenuItemSelectable },
283
- ],
284
- }]
285
- }], propDecorators: { keepOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepOpen", required: false }] }] } });
286
- class HlmDropdownMenuRadio {
287
- constructor() {
288
- this._cdkMenuItem = inject(HlmDropdownMenuRadioCdk);
289
- classes(() => "hover:bg-accent focus:bg-accent hover:text-accent-foreground focus:text-accent-foreground hover:**:text-accent-foreground focus:**:text-accent-foreground gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm data-inset:ps-7 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] group/dropdown-menu-radio relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0");
290
- }
291
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuRadio, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
292
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: HlmDropdownMenuRadio, isStandalone: true, selector: "[hlmDropdownMenuRadio]", host: { attributes: { "data-slot": "dropdown-menu-radio-item" }, properties: { "attr.data-disabled": "_cdkMenuItem.disabled ? \"\" : null", "attr.data-checked": "_cdkMenuItem.checked ? \"\" : null" } }, hostDirectives: [{ directive: HlmDropdownMenuRadioCdk, inputs: ["cdkMenuItemDisabled", "disabled", "cdkMenuItemChecked", "checked", "keepOpen", "keepOpen"], outputs: ["cdkMenuItemTriggered", "triggered"] }, { directive: HlmDropdownMenuFocusOnHover }], ngImport: i0 }); }
293
- }
294
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuRadio, decorators: [{
295
- type: Directive,
296
- args: [{
297
- selector: '[hlmDropdownMenuRadio]',
298
- hostDirectives: [
299
- {
300
- directive: HlmDropdownMenuRadioCdk,
301
- inputs: ['cdkMenuItemDisabled: disabled', 'cdkMenuItemChecked: checked', 'keepOpen'],
302
- outputs: ['cdkMenuItemTriggered: triggered'],
303
- },
304
- HlmDropdownMenuFocusOnHover,
305
- ],
306
- host: {
307
- 'data-slot': 'dropdown-menu-radio-item',
308
- '[attr.data-disabled]': '_cdkMenuItem.disabled ? "" : null',
309
- '[attr.data-checked]': '_cdkMenuItem.checked ? "" : null',
310
- },
311
- }]
312
- }], ctorParameters: () => [] });
313
-
314
- class HlmDropdownMenuRadioIndicator {
315
- constructor() {
316
- classes(() => 'absolute end-2 flex items-center justify-center [&_ng-icon]:text-[length:--spacing(4)] pointer-events-none opacity-0 group-data-checked/dropdown-menu-radio:opacity-100');
317
- }
318
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuRadioIndicator, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
319
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: HlmDropdownMenuRadioIndicator, isStandalone: true, selector: "hlm-dropdown-menu-radio-indicator", host: { attributes: { "data-slot": "dropdown-menu-radio-item-indicator" } }, providers: [provideIcons({ lucideCheck })], ngImport: i0, template: `
320
- <ng-icon name="lucideCheck" />
321
- `, isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
322
- }
323
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuRadioIndicator, decorators: [{
324
- type: Component,
325
- args: [{
326
- selector: 'hlm-dropdown-menu-radio-indicator',
327
- imports: [NgIcon],
328
- providers: [provideIcons({ lucideCheck })],
329
- changeDetection: ChangeDetectionStrategy.OnPush,
330
- host: { 'data-slot': 'dropdown-menu-radio-item-indicator' },
331
- template: `
581
+ isInline: true,
582
+ dependencies: [{
583
+ kind: "component",
584
+ type: NgIcon,
585
+ selector: "ng-icon",
586
+ inputs: [
587
+ "name",
588
+ "svg",
589
+ "size",
590
+ "strokeWidth",
591
+ "color"
592
+ ]
593
+ }],
594
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
595
+ });
596
+ }
597
+ };
598
+ i0.ɵɵngDeclareClassMetadata({
599
+ minVersion: "12.0.0",
600
+ version: "22.2.4",
601
+ ngImport: i0,
602
+ type: HlmDropdownMenuItemSubIndicator,
603
+ decorators: [{
604
+ type: Component,
605
+ args: [{
606
+ selector: "hlm-dropdown-menu-item-sub-indicator",
607
+ imports: [NgIcon],
608
+ providers: [provideIcons({ lucideChevronRight })],
609
+ changeDetection: ChangeDetectionStrategy.OnPush,
610
+ template: `
611
+ <ng-icon name="lucideChevronRight" class="text-[length:--spacing(4)] rtl:rotate-180" />
612
+ `
613
+ }]
614
+ }],
615
+ ctorParameters: () => []
616
+ });
617
+ var HlmDropdownMenuLabel = class HlmDropdownMenuLabel {
618
+ constructor() {
619
+ this.inset = input(false, {
620
+ ...ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {},
621
+ transform: booleanAttribute
622
+ });
623
+ classes(() => "text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:ps-7 block");
624
+ }
625
+ static {
626
+ this.ɵfac = i0.ɵɵngDeclareFactory({
627
+ minVersion: "12.0.0",
628
+ version: "22.2.4",
629
+ ngImport: i0,
630
+ type: HlmDropdownMenuLabel,
631
+ deps: [],
632
+ target: i0.ɵɵFactoryTarget.Directive
633
+ });
634
+ }
635
+ static {
636
+ this.ɵdir = i0.ɵɵngDeclareDirective({
637
+ minVersion: "17.1.0",
638
+ version: "22.2.4",
639
+ type: HlmDropdownMenuLabel,
640
+ isStandalone: true,
641
+ selector: "[hlmDropdownMenuLabel],hlm-dropdown-menu-label",
642
+ inputs: { inset: {
643
+ classPropertyName: "inset",
644
+ publicName: "inset",
645
+ isSignal: true,
646
+ isRequired: false,
647
+ transformFunction: null
648
+ } },
649
+ host: {
650
+ attributes: { "data-slot": "dropdown-menu-label" },
651
+ properties: { "attr.data-inset": "inset() ? \"\" : null" }
652
+ },
653
+ ngImport: i0
654
+ });
655
+ }
656
+ };
657
+ i0.ɵɵngDeclareClassMetadata({
658
+ minVersion: "12.0.0",
659
+ version: "22.2.4",
660
+ ngImport: i0,
661
+ type: HlmDropdownMenuLabel,
662
+ decorators: [{
663
+ type: Directive,
664
+ args: [{
665
+ selector: "[hlmDropdownMenuLabel],hlm-dropdown-menu-label",
666
+ host: {
667
+ "data-slot": "dropdown-menu-label",
668
+ "[attr.data-inset]": "inset() ? \"\" : null"
669
+ }
670
+ }]
671
+ }],
672
+ ctorParameters: () => [],
673
+ propDecorators: { inset: [{
674
+ type: i0.Input,
675
+ args: [{
676
+ isSignal: true,
677
+ alias: "inset",
678
+ required: false
679
+ }]
680
+ }] }
681
+ });
682
+ var HlmDropdownMenuRadioCdk = class HlmDropdownMenuRadioCdk extends CdkMenuItemRadio {
683
+ constructor() {
684
+ super(...arguments);
685
+ this.keepOpen = input(true, {
686
+ ...ngDevMode ? { debugName: "keepOpen" } : /* istanbul ignore next */ {},
687
+ transform: booleanAttribute
688
+ });
689
+ }
690
+ trigger(options) {
691
+ super.trigger({
692
+ ...options,
693
+ keepOpen: this.keepOpen()
694
+ });
695
+ }
696
+ static {
697
+ this.ɵfac = i0.ɵɵngDeclareFactory({
698
+ minVersion: "12.0.0",
699
+ version: "22.2.4",
700
+ ngImport: i0,
701
+ type: HlmDropdownMenuRadioCdk,
702
+ deps: null,
703
+ target: i0.ɵɵFactoryTarget.Directive
704
+ });
705
+ }
706
+ static {
707
+ this.ɵdir = i0.ɵɵngDeclareDirective({
708
+ minVersion: "17.1.0",
709
+ version: "22.2.4",
710
+ type: HlmDropdownMenuRadioCdk,
711
+ isStandalone: true,
712
+ selector: "[hlmDropdownMenuRadioCdk]",
713
+ inputs: { keepOpen: {
714
+ classPropertyName: "keepOpen",
715
+ publicName: "keepOpen",
716
+ isSignal: true,
717
+ isRequired: false,
718
+ transformFunction: null
719
+ } },
720
+ providers: [
721
+ {
722
+ provide: CdkMenuItemRadio,
723
+ useExisting: HlmDropdownMenuRadioCdk
724
+ },
725
+ {
726
+ provide: CdkMenuItemSelectable,
727
+ useExisting: HlmDropdownMenuRadioCdk
728
+ },
729
+ {
730
+ provide: CdkMenuItem,
731
+ useExisting: CdkMenuItemSelectable
732
+ }
733
+ ],
734
+ usesInheritance: true,
735
+ ngImport: i0
736
+ });
737
+ }
738
+ };
739
+ i0.ɵɵngDeclareClassMetadata({
740
+ minVersion: "12.0.0",
741
+ version: "22.2.4",
742
+ ngImport: i0,
743
+ type: HlmDropdownMenuRadioCdk,
744
+ decorators: [{
745
+ type: Directive,
746
+ args: [{
747
+ selector: "[hlmDropdownMenuRadioCdk]",
748
+ providers: [
749
+ {
750
+ provide: CdkMenuItemRadio,
751
+ useExisting: HlmDropdownMenuRadioCdk
752
+ },
753
+ {
754
+ provide: CdkMenuItemSelectable,
755
+ useExisting: HlmDropdownMenuRadioCdk
756
+ },
757
+ {
758
+ provide: CdkMenuItem,
759
+ useExisting: CdkMenuItemSelectable
760
+ }
761
+ ]
762
+ }]
763
+ }],
764
+ propDecorators: { keepOpen: [{
765
+ type: i0.Input,
766
+ args: [{
767
+ isSignal: true,
768
+ alias: "keepOpen",
769
+ required: false
770
+ }]
771
+ }] }
772
+ });
773
+ var HlmDropdownMenuRadio = class HlmDropdownMenuRadio {
774
+ constructor() {
775
+ this._cdkMenuItem = inject(HlmDropdownMenuRadioCdk);
776
+ classes(() => "hover:bg-accent focus:bg-accent hover:text-accent-foreground focus:text-accent-foreground hover:**:text-accent-foreground focus:**:text-accent-foreground gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm data-inset:ps-7 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] group/dropdown-menu-radio relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0");
777
+ }
778
+ static {
779
+ this.ɵfac = i0.ɵɵngDeclareFactory({
780
+ minVersion: "12.0.0",
781
+ version: "22.2.4",
782
+ ngImport: i0,
783
+ type: HlmDropdownMenuRadio,
784
+ deps: [],
785
+ target: i0.ɵɵFactoryTarget.Directive
786
+ });
787
+ }
788
+ static {
789
+ this.ɵdir = i0.ɵɵngDeclareDirective({
790
+ minVersion: "14.0.0",
791
+ version: "22.2.4",
792
+ type: HlmDropdownMenuRadio,
793
+ isStandalone: true,
794
+ selector: "[hlmDropdownMenuRadio]",
795
+ host: {
796
+ attributes: { "data-slot": "dropdown-menu-radio-item" },
797
+ properties: {
798
+ "attr.data-disabled": "_cdkMenuItem.disabled ? \"\" : null",
799
+ "attr.data-checked": "_cdkMenuItem.checked ? \"\" : null"
800
+ }
801
+ },
802
+ hostDirectives: [{
803
+ directive: HlmDropdownMenuRadioCdk,
804
+ inputs: [
805
+ "cdkMenuItemDisabled",
806
+ "disabled",
807
+ "cdkMenuItemChecked",
808
+ "checked",
809
+ "keepOpen",
810
+ "keepOpen"
811
+ ],
812
+ outputs: ["cdkMenuItemTriggered", "triggered"]
813
+ }, { directive: HlmDropdownMenuFocusOnHover }],
814
+ ngImport: i0
815
+ });
816
+ }
817
+ };
818
+ i0.ɵɵngDeclareClassMetadata({
819
+ minVersion: "12.0.0",
820
+ version: "22.2.4",
821
+ ngImport: i0,
822
+ type: HlmDropdownMenuRadio,
823
+ decorators: [{
824
+ type: Directive,
825
+ args: [{
826
+ selector: "[hlmDropdownMenuRadio]",
827
+ hostDirectives: [{
828
+ directive: HlmDropdownMenuRadioCdk,
829
+ inputs: [
830
+ "cdkMenuItemDisabled: disabled",
831
+ "cdkMenuItemChecked: checked",
832
+ "keepOpen"
833
+ ],
834
+ outputs: ["cdkMenuItemTriggered: triggered"]
835
+ }, HlmDropdownMenuFocusOnHover],
836
+ host: {
837
+ "data-slot": "dropdown-menu-radio-item",
838
+ "[attr.data-disabled]": "_cdkMenuItem.disabled ? \"\" : null",
839
+ "[attr.data-checked]": "_cdkMenuItem.checked ? \"\" : null"
840
+ }
841
+ }]
842
+ }],
843
+ ctorParameters: () => []
844
+ });
845
+ var HlmDropdownMenuRadioIndicator = class HlmDropdownMenuRadioIndicator {
846
+ constructor() {
847
+ classes(() => "absolute end-2 flex items-center justify-center [&_ng-icon]:text-[length:--spacing(4)] pointer-events-none opacity-0 group-data-checked/dropdown-menu-radio:opacity-100");
848
+ }
849
+ static {
850
+ this.ɵfac = i0.ɵɵngDeclareFactory({
851
+ minVersion: "12.0.0",
852
+ version: "22.2.4",
853
+ ngImport: i0,
854
+ type: HlmDropdownMenuRadioIndicator,
855
+ deps: [],
856
+ target: i0.ɵɵFactoryTarget.Component
857
+ });
858
+ }
859
+ static {
860
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
861
+ minVersion: "14.0.0",
862
+ version: "22.2.4",
863
+ type: HlmDropdownMenuRadioIndicator,
864
+ isStandalone: true,
865
+ selector: "hlm-dropdown-menu-radio-indicator",
866
+ host: { attributes: { "data-slot": "dropdown-menu-radio-item-indicator" } },
867
+ providers: [provideIcons({ lucideCheck })],
868
+ ngImport: i0,
869
+ template: `
332
870
  <ng-icon name="lucideCheck" />
333
871
  `,
334
- }]
335
- }], ctorParameters: () => [] });
336
-
337
- class HlmDropdownMenuSeparator {
338
- constructor() {
339
- classes(() => 'bg-border -mx-1 my-1 h-px block');
340
- }
341
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
342
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: HlmDropdownMenuSeparator, isStandalone: true, selector: "[hlmDropdownMenuSeparator],hlm-dropdown-menu-separator", host: { attributes: { "data-slot": "dropdown-menu-separator" } }, ngImport: i0 }); }
343
- }
344
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuSeparator, decorators: [{
345
- type: Directive,
346
- args: [{
347
- selector: '[hlmDropdownMenuSeparator],hlm-dropdown-menu-separator',
348
- host: { 'data-slot': 'dropdown-menu-separator' },
349
- }]
350
- }], ctorParameters: () => [] });
351
-
352
- class HlmDropdownMenuShortcut {
353
- constructor() {
354
- classes(() => 'text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ms-auto text-xs tracking-widest');
355
- }
356
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuShortcut, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
357
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: HlmDropdownMenuShortcut, isStandalone: true, selector: "[hlmDropdownMenuShortcut],hlm-dropdown-menu-shortcut", host: { attributes: { "data-slot": "dropdown-menu-shortcut" } }, ngImport: i0 }); }
358
- }
359
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuShortcut, decorators: [{
360
- type: Directive,
361
- args: [{
362
- selector: '[hlmDropdownMenuShortcut],hlm-dropdown-menu-shortcut',
363
- host: { 'data-slot': 'dropdown-menu-shortcut' },
364
- }]
365
- }], ctorParameters: () => [] });
366
-
367
- class HlmDropdownMenuSub {
368
- constructor() {
369
- this._host = inject(CdkMenu);
370
- this._elementRef = inject((ElementRef));
371
- // The sub-trigger provides its configured side; CDK parents this content's injector under it.
372
- this._menuSide = inject(MENU_SIDE, { optional: true });
373
- this._state = signal('open', ...(ngDevMode ? [{ debugName: "_state" }] : /* istanbul ignore next */ []));
374
- this._side = signal(this._menuSide?.side() ?? 'right', ...(ngDevMode ? [{ debugName: "_side" }] : /* istanbul ignore next */ []));
375
- this.setSideFromTransformOrigin();
376
- // this is a best effort, but does not seem to work currently
377
- // TODO: figure out a way for us to know the host is about to be closed. might not be possible with CDK
378
- this._host.closed.pipe(takeUntilDestroyed()).subscribe(() => this._state.set('closed'));
379
- classes(() => 'motion-safe:data-open:animate-in motion-safe:data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-24 rounded-lg p-1 shadow-lg ring-1 duration-100 w-auto');
380
- }
381
- setSideFromTransformOrigin() {
382
- const side = this._menuSide?.side() ?? 'right';
383
- // CDK sets transform-origin on this element synchronously on attach; read it next tick and derive side
384
- setTimeout(() => {
385
- this._side.set(deriveMenuSideFromTransformOrigin(this._elementRef.nativeElement.style.transformOrigin, side));
386
- });
387
- }
388
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuSub, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
389
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: HlmDropdownMenuSub, isStandalone: true, selector: "[hlmDropdownMenuSub],hlm-dropdown-menu-sub", host: { attributes: { "data-slot": "dropdown-menu-sub" }, properties: { "attr.data-state": "_state()", "attr.data-side": "_side()" } }, hostDirectives: [{ directive: i1.CdkMenu }], ngImport: i0 }); }
390
- }
391
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuSub, decorators: [{
392
- type: Directive,
393
- args: [{
394
- selector: '[hlmDropdownMenuSub],hlm-dropdown-menu-sub',
395
- hostDirectives: [CdkMenu],
396
- host: {
397
- 'data-slot': 'dropdown-menu-sub',
398
- '[attr.data-state]': '_state()',
399
- '[attr.data-side]': '_side()',
400
- },
401
- }]
402
- }], ctorParameters: () => [] });
403
-
872
+ isInline: true,
873
+ dependencies: [{
874
+ kind: "component",
875
+ type: NgIcon,
876
+ selector: "ng-icon",
877
+ inputs: [
878
+ "name",
879
+ "svg",
880
+ "size",
881
+ "strokeWidth",
882
+ "color"
883
+ ]
884
+ }],
885
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
886
+ });
887
+ }
888
+ };
889
+ i0.ɵɵngDeclareClassMetadata({
890
+ minVersion: "12.0.0",
891
+ version: "22.2.4",
892
+ ngImport: i0,
893
+ type: HlmDropdownMenuRadioIndicator,
894
+ decorators: [{
895
+ type: Component,
896
+ args: [{
897
+ selector: "hlm-dropdown-menu-radio-indicator",
898
+ imports: [NgIcon],
899
+ providers: [provideIcons({ lucideCheck })],
900
+ changeDetection: ChangeDetectionStrategy.OnPush,
901
+ host: { "data-slot": "dropdown-menu-radio-item-indicator" },
902
+ template: `
903
+ <ng-icon name="lucideCheck" />
904
+ `
905
+ }]
906
+ }],
907
+ ctorParameters: () => []
908
+ });
909
+ var HlmDropdownMenuSeparator = class HlmDropdownMenuSeparator {
910
+ constructor() {
911
+ classes(() => "bg-border -mx-1 my-1 h-px block");
912
+ }
913
+ static {
914
+ this.ɵfac = i0.ɵɵngDeclareFactory({
915
+ minVersion: "12.0.0",
916
+ version: "22.2.4",
917
+ ngImport: i0,
918
+ type: HlmDropdownMenuSeparator,
919
+ deps: [],
920
+ target: i0.ɵɵFactoryTarget.Directive
921
+ });
922
+ }
923
+ static {
924
+ this.ɵdir = i0.ɵɵngDeclareDirective({
925
+ minVersion: "14.0.0",
926
+ version: "22.2.4",
927
+ type: HlmDropdownMenuSeparator,
928
+ isStandalone: true,
929
+ selector: "[hlmDropdownMenuSeparator],hlm-dropdown-menu-separator",
930
+ host: { attributes: { "data-slot": "dropdown-menu-separator" } },
931
+ ngImport: i0
932
+ });
933
+ }
934
+ };
935
+ i0.ɵɵngDeclareClassMetadata({
936
+ minVersion: "12.0.0",
937
+ version: "22.2.4",
938
+ ngImport: i0,
939
+ type: HlmDropdownMenuSeparator,
940
+ decorators: [{
941
+ type: Directive,
942
+ args: [{
943
+ selector: "[hlmDropdownMenuSeparator],hlm-dropdown-menu-separator",
944
+ host: { "data-slot": "dropdown-menu-separator" }
945
+ }]
946
+ }],
947
+ ctorParameters: () => []
948
+ });
949
+ var HlmDropdownMenuShortcut = class HlmDropdownMenuShortcut {
950
+ constructor() {
951
+ classes(() => "text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ms-auto text-xs tracking-widest");
952
+ }
953
+ static {
954
+ this.ɵfac = i0.ɵɵngDeclareFactory({
955
+ minVersion: "12.0.0",
956
+ version: "22.2.4",
957
+ ngImport: i0,
958
+ type: HlmDropdownMenuShortcut,
959
+ deps: [],
960
+ target: i0.ɵɵFactoryTarget.Directive
961
+ });
962
+ }
963
+ static {
964
+ this.ɵdir = i0.ɵɵngDeclareDirective({
965
+ minVersion: "14.0.0",
966
+ version: "22.2.4",
967
+ type: HlmDropdownMenuShortcut,
968
+ isStandalone: true,
969
+ selector: "[hlmDropdownMenuShortcut],hlm-dropdown-menu-shortcut",
970
+ host: { attributes: { "data-slot": "dropdown-menu-shortcut" } },
971
+ ngImport: i0
972
+ });
973
+ }
974
+ };
975
+ i0.ɵɵngDeclareClassMetadata({
976
+ minVersion: "12.0.0",
977
+ version: "22.2.4",
978
+ ngImport: i0,
979
+ type: HlmDropdownMenuShortcut,
980
+ decorators: [{
981
+ type: Directive,
982
+ args: [{
983
+ selector: "[hlmDropdownMenuShortcut],hlm-dropdown-menu-shortcut",
984
+ host: { "data-slot": "dropdown-menu-shortcut" }
985
+ }]
986
+ }],
987
+ ctorParameters: () => []
988
+ });
989
+ var HlmDropdownMenuSub = class HlmDropdownMenuSub {
990
+ constructor() {
991
+ this._host = inject(CdkMenu);
992
+ this._elementRef = inject(ElementRef);
993
+ this._menuSide = inject(MENU_SIDE, { optional: true });
994
+ this._state = signal("open", ...ngDevMode ? [{ debugName: "_state" }] : /* istanbul ignore next */ []);
995
+ this._side = signal(this._menuSide?.side() ?? "right", ...ngDevMode ? [{ debugName: "_side" }] : /* istanbul ignore next */ []);
996
+ this.setSideFromTransformOrigin();
997
+ this._host.closed.pipe(takeUntilDestroyed()).subscribe(() => this._state.set("closed"));
998
+ classes(() => "motion-safe:data-open:animate-in motion-safe:data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-24 rounded-lg p-1 shadow-lg ring-1 duration-100 w-auto");
999
+ }
1000
+ setSideFromTransformOrigin() {
1001
+ const side = this._menuSide?.side() ?? "right";
1002
+ setTimeout(() => {
1003
+ this._side.set(deriveMenuSideFromTransformOrigin(this._elementRef.nativeElement.style.transformOrigin, side));
1004
+ });
1005
+ }
1006
+ static {
1007
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1008
+ minVersion: "12.0.0",
1009
+ version: "22.2.4",
1010
+ ngImport: i0,
1011
+ type: HlmDropdownMenuSub,
1012
+ deps: [],
1013
+ target: i0.ɵɵFactoryTarget.Directive
1014
+ });
1015
+ }
1016
+ static {
1017
+ this.ɵdir = i0.ɵɵngDeclareDirective({
1018
+ minVersion: "14.0.0",
1019
+ version: "22.2.4",
1020
+ type: HlmDropdownMenuSub,
1021
+ isStandalone: true,
1022
+ selector: "[hlmDropdownMenuSub],hlm-dropdown-menu-sub",
1023
+ host: {
1024
+ attributes: { "data-slot": "dropdown-menu-sub" },
1025
+ properties: {
1026
+ "attr.data-state": "_state()",
1027
+ "attr.data-side": "_side()"
1028
+ }
1029
+ },
1030
+ hostDirectives: [{ directive: i1.CdkMenu }],
1031
+ ngImport: i0
1032
+ });
1033
+ }
1034
+ };
1035
+ i0.ɵɵngDeclareClassMetadata({
1036
+ minVersion: "12.0.0",
1037
+ version: "22.2.4",
1038
+ ngImport: i0,
1039
+ type: HlmDropdownMenuSub,
1040
+ decorators: [{
1041
+ type: Directive,
1042
+ args: [{
1043
+ selector: "[hlmDropdownMenuSub],hlm-dropdown-menu-sub",
1044
+ hostDirectives: [CdkMenu],
1045
+ host: {
1046
+ "data-slot": "dropdown-menu-sub",
1047
+ "[attr.data-state]": "_state()",
1048
+ "[attr.data-side]": "_side()"
1049
+ }
1050
+ }]
1051
+ }],
1052
+ ctorParameters: () => []
1053
+ });
404
1054
  const defaultConfig = {
405
- align: 'start',
406
- side: 'bottom',
1055
+ align: "start",
1056
+ side: "bottom"
407
1057
  };
408
- const HlmDropdownMenuConfigToken = new InjectionToken('HlmDropdownMenuConfig');
1058
+ const HlmDropdownMenuConfigToken = new InjectionToken("HlmDropdownMenuConfig");
409
1059
  function provideHlmDropdownMenuConfig(config) {
410
- return { provide: HlmDropdownMenuConfigToken, useValue: { ...defaultConfig, ...config } };
1060
+ return {
1061
+ provide: HlmDropdownMenuConfigToken,
1062
+ useValue: {
1063
+ ...defaultConfig,
1064
+ ...config
1065
+ }
1066
+ };
411
1067
  }
412
1068
  function injectHlmDropdownMenuConfig() {
413
- return inject(HlmDropdownMenuConfigToken, { optional: true }) ?? defaultConfig;
414
- }
415
-
416
- class HlmDropdownMenuSubTrigger {
417
- constructor() {
418
- this._cdkTrigger = inject(CdkMenuTrigger, { host: true });
419
- this._config = injectHlmDropdownMenuConfig();
420
- this.align = input(this._config.align, ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
421
- this.side = input(this._config.side, ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
422
- this._menuPosition = computed(() => createMenuPosition(this.align(), this.side()), ...(ngDevMode ? [{ debugName: "_menuPosition" }] : /* istanbul ignore next */ []));
423
- // CDK sets transform-origin on the submenu content from the resolved position; the content reads it
424
- // to animate from the anchored corner and to derive its data-side. Cast tolerates @angular/cdk < 21.2
425
- // (we still support >=21.0), where the property is absent and the assignment is a harmless no-op.
426
- this._cdkTrigger.transformOriginSelector =
427
- '[data-slot="dropdown-menu-sub"]';
428
- effect(() => {
429
- this._cdkTrigger.menuPosition = this._menuPosition();
430
- });
431
- classes(() => 'aria-expanded:bg-accent aria-expanded:text-accent-foreground');
432
- }
433
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuSubTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
434
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: HlmDropdownMenuSubTrigger, isStandalone: true, selector: "[hlmDropdownMenuSubTrigger]", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "dropdown-menu-sub-trigger" } }, providers: [{ provide: MENU_SIDE, useExisting: forwardRef(() => HlmDropdownMenuSubTrigger) }], hostDirectives: [{ directive: i1.CdkMenuTrigger, inputs: ["cdkMenuTriggerFor", "hlmDropdownMenuSubTrigger", "cdkMenuTriggerData", "hlmDropdownMenuTriggerData"], outputs: ["cdkMenuOpened", "hlmDropdownMenuSubOpened", "cdkMenuClosed", "hlmDropdownMenuSubClosed"] }], ngImport: i0 }); }
1069
+ return inject(HlmDropdownMenuConfigToken, { optional: true }) ?? defaultConfig;
435
1070
  }
436
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuSubTrigger, decorators: [{
437
- type: Directive,
438
- args: [{
439
- selector: '[hlmDropdownMenuSubTrigger]',
440
- providers: [{ provide: MENU_SIDE, useExisting: forwardRef(() => HlmDropdownMenuSubTrigger) }],
441
- hostDirectives: [
442
- {
443
- directive: CdkMenuTrigger,
444
- inputs: ['cdkMenuTriggerFor: hlmDropdownMenuSubTrigger', 'cdkMenuTriggerData: hlmDropdownMenuTriggerData'],
445
- outputs: ['cdkMenuOpened: hlmDropdownMenuSubOpened', 'cdkMenuClosed: hlmDropdownMenuSubClosed'],
446
- },
447
- ],
448
- host: { 'data-slot': 'dropdown-menu-sub-trigger' },
449
- }]
450
- }], ctorParameters: () => [], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }] } });
451
-
452
- class HlmDropdownMenuTrigger {
453
- constructor() {
454
- this._cdkTrigger = inject(CdkMenuTrigger, { host: true });
455
- this._config = injectHlmDropdownMenuConfig();
456
- this.align = input(this._config.align, ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
457
- this.side = input(this._config.side, ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
458
- this._menuPosition = computed(() => createMenuPosition(this.align(), this.side()), ...(ngDevMode ? [{ debugName: "_menuPosition" }] : /* istanbul ignore next */ []));
459
- // CDK sets transform-origin on the menu content from the resolved position; the content reads it to
460
- // animate from the anchored corner and to derive its data-side. Cast tolerates @angular/cdk < 21.2
461
- // (we still support >=21.0), where the property is absent and the assignment is a harmless no-op.
462
- this._cdkTrigger.transformOriginSelector = '[data-slot="dropdown-menu"]';
463
- effect(() => {
464
- this._cdkTrigger.menuPosition = this._menuPosition();
465
- });
466
- }
467
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
468
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: HlmDropdownMenuTrigger, isStandalone: true, selector: "[hlmDropdownMenuTrigger]", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "dropdown-menu-trigger" } }, providers: [{ provide: MENU_SIDE, useExisting: forwardRef(() => HlmDropdownMenuTrigger) }], hostDirectives: [{ directive: i1.CdkMenuTrigger, inputs: ["cdkMenuTriggerFor", "hlmDropdownMenuTrigger", "cdkMenuTriggerData", "hlmDropdownMenuTriggerData"], outputs: ["cdkMenuOpened", "hlmDropdownMenuOpened", "cdkMenuClosed", "hlmDropdownMenuClosed"] }], ngImport: i0 }); }
469
- }
470
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmDropdownMenuTrigger, decorators: [{
471
- type: Directive,
472
- args: [{
473
- selector: '[hlmDropdownMenuTrigger]',
474
- providers: [{ provide: MENU_SIDE, useExisting: forwardRef(() => HlmDropdownMenuTrigger) }],
475
- hostDirectives: [
476
- {
477
- directive: CdkMenuTrigger,
478
- inputs: ['cdkMenuTriggerFor: hlmDropdownMenuTrigger', 'cdkMenuTriggerData: hlmDropdownMenuTriggerData'],
479
- outputs: ['cdkMenuOpened: hlmDropdownMenuOpened', 'cdkMenuClosed: hlmDropdownMenuClosed'],
480
- },
481
- ],
482
- host: { 'data-slot': 'dropdown-menu-trigger' },
483
- }]
484
- }], ctorParameters: () => [], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }] } });
485
-
1071
+ var HlmDropdownMenuSubTrigger = class HlmDropdownMenuSubTrigger {
1072
+ constructor() {
1073
+ this._cdkTrigger = inject(CdkMenuTrigger, { host: true });
1074
+ this._config = injectHlmDropdownMenuConfig();
1075
+ this.align = input(this._config.align, ...ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []);
1076
+ this.side = input(this._config.side, ...ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []);
1077
+ this._menuPosition = computed(() => createMenuPosition(this.align(), this.side()), ...ngDevMode ? [{ debugName: "_menuPosition" }] : /* istanbul ignore next */ []);
1078
+ this._cdkTrigger.transformOriginSelector = "[data-slot=\"dropdown-menu-sub\"]";
1079
+ effect(() => {
1080
+ this._cdkTrigger.menuPosition = this._menuPosition();
1081
+ });
1082
+ classes(() => "aria-expanded:bg-accent aria-expanded:text-accent-foreground");
1083
+ }
1084
+ static {
1085
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1086
+ minVersion: "12.0.0",
1087
+ version: "22.2.4",
1088
+ ngImport: i0,
1089
+ type: HlmDropdownMenuSubTrigger,
1090
+ deps: [],
1091
+ target: i0.ɵɵFactoryTarget.Directive
1092
+ });
1093
+ }
1094
+ static {
1095
+ this.ɵdir = i0.ɵɵngDeclareDirective({
1096
+ minVersion: "17.1.0",
1097
+ version: "22.2.4",
1098
+ type: HlmDropdownMenuSubTrigger,
1099
+ isStandalone: true,
1100
+ selector: "[hlmDropdownMenuSubTrigger]",
1101
+ inputs: {
1102
+ align: {
1103
+ classPropertyName: "align",
1104
+ publicName: "align",
1105
+ isSignal: true,
1106
+ isRequired: false,
1107
+ transformFunction: null
1108
+ },
1109
+ side: {
1110
+ classPropertyName: "side",
1111
+ publicName: "side",
1112
+ isSignal: true,
1113
+ isRequired: false,
1114
+ transformFunction: null
1115
+ }
1116
+ },
1117
+ host: { attributes: { "data-slot": "dropdown-menu-sub-trigger" } },
1118
+ providers: [{
1119
+ provide: MENU_SIDE,
1120
+ useExisting: forwardRef(() => HlmDropdownMenuSubTrigger)
1121
+ }],
1122
+ hostDirectives: [{
1123
+ directive: i1.CdkMenuTrigger,
1124
+ inputs: [
1125
+ "cdkMenuTriggerFor",
1126
+ "hlmDropdownMenuSubTrigger",
1127
+ "cdkMenuTriggerData",
1128
+ "hlmDropdownMenuTriggerData"
1129
+ ],
1130
+ outputs: [
1131
+ "cdkMenuOpened",
1132
+ "hlmDropdownMenuSubOpened",
1133
+ "cdkMenuClosed",
1134
+ "hlmDropdownMenuSubClosed"
1135
+ ]
1136
+ }],
1137
+ ngImport: i0
1138
+ });
1139
+ }
1140
+ };
1141
+ i0.ɵɵngDeclareClassMetadata({
1142
+ minVersion: "12.0.0",
1143
+ version: "22.2.4",
1144
+ ngImport: i0,
1145
+ type: HlmDropdownMenuSubTrigger,
1146
+ decorators: [{
1147
+ type: Directive,
1148
+ args: [{
1149
+ selector: "[hlmDropdownMenuSubTrigger]",
1150
+ providers: [{
1151
+ provide: MENU_SIDE,
1152
+ useExisting: forwardRef(() => HlmDropdownMenuSubTrigger)
1153
+ }],
1154
+ hostDirectives: [{
1155
+ directive: CdkMenuTrigger,
1156
+ inputs: ["cdkMenuTriggerFor: hlmDropdownMenuSubTrigger", "cdkMenuTriggerData: hlmDropdownMenuTriggerData"],
1157
+ outputs: ["cdkMenuOpened: hlmDropdownMenuSubOpened", "cdkMenuClosed: hlmDropdownMenuSubClosed"]
1158
+ }],
1159
+ host: { "data-slot": "dropdown-menu-sub-trigger" }
1160
+ }]
1161
+ }],
1162
+ ctorParameters: () => [],
1163
+ propDecorators: {
1164
+ align: [{
1165
+ type: i0.Input,
1166
+ args: [{
1167
+ isSignal: true,
1168
+ alias: "align",
1169
+ required: false
1170
+ }]
1171
+ }],
1172
+ side: [{
1173
+ type: i0.Input,
1174
+ args: [{
1175
+ isSignal: true,
1176
+ alias: "side",
1177
+ required: false
1178
+ }]
1179
+ }]
1180
+ }
1181
+ });
1182
+ var HlmDropdownMenuTrigger = class HlmDropdownMenuTrigger {
1183
+ constructor() {
1184
+ this._cdkTrigger = inject(CdkMenuTrigger, { host: true });
1185
+ this._config = injectHlmDropdownMenuConfig();
1186
+ this.align = input(this._config.align, ...ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []);
1187
+ this.side = input(this._config.side, ...ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []);
1188
+ this._menuPosition = computed(() => createMenuPosition(this.align(), this.side()), ...ngDevMode ? [{ debugName: "_menuPosition" }] : /* istanbul ignore next */ []);
1189
+ this._cdkTrigger.transformOriginSelector = "[data-slot=\"dropdown-menu\"]";
1190
+ effect(() => {
1191
+ this._cdkTrigger.menuPosition = this._menuPosition();
1192
+ });
1193
+ }
1194
+ static {
1195
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1196
+ minVersion: "12.0.0",
1197
+ version: "22.2.4",
1198
+ ngImport: i0,
1199
+ type: HlmDropdownMenuTrigger,
1200
+ deps: [],
1201
+ target: i0.ɵɵFactoryTarget.Directive
1202
+ });
1203
+ }
1204
+ static {
1205
+ this.ɵdir = i0.ɵɵngDeclareDirective({
1206
+ minVersion: "17.1.0",
1207
+ version: "22.2.4",
1208
+ type: HlmDropdownMenuTrigger,
1209
+ isStandalone: true,
1210
+ selector: "[hlmDropdownMenuTrigger]",
1211
+ inputs: {
1212
+ align: {
1213
+ classPropertyName: "align",
1214
+ publicName: "align",
1215
+ isSignal: true,
1216
+ isRequired: false,
1217
+ transformFunction: null
1218
+ },
1219
+ side: {
1220
+ classPropertyName: "side",
1221
+ publicName: "side",
1222
+ isSignal: true,
1223
+ isRequired: false,
1224
+ transformFunction: null
1225
+ }
1226
+ },
1227
+ host: { attributes: { "data-slot": "dropdown-menu-trigger" } },
1228
+ providers: [{
1229
+ provide: MENU_SIDE,
1230
+ useExisting: forwardRef(() => HlmDropdownMenuTrigger)
1231
+ }],
1232
+ hostDirectives: [{
1233
+ directive: i1.CdkMenuTrigger,
1234
+ inputs: [
1235
+ "cdkMenuTriggerFor",
1236
+ "hlmDropdownMenuTrigger",
1237
+ "cdkMenuTriggerData",
1238
+ "hlmDropdownMenuTriggerData"
1239
+ ],
1240
+ outputs: [
1241
+ "cdkMenuOpened",
1242
+ "hlmDropdownMenuOpened",
1243
+ "cdkMenuClosed",
1244
+ "hlmDropdownMenuClosed"
1245
+ ]
1246
+ }],
1247
+ ngImport: i0
1248
+ });
1249
+ }
1250
+ };
1251
+ i0.ɵɵngDeclareClassMetadata({
1252
+ minVersion: "12.0.0",
1253
+ version: "22.2.4",
1254
+ ngImport: i0,
1255
+ type: HlmDropdownMenuTrigger,
1256
+ decorators: [{
1257
+ type: Directive,
1258
+ args: [{
1259
+ selector: "[hlmDropdownMenuTrigger]",
1260
+ providers: [{
1261
+ provide: MENU_SIDE,
1262
+ useExisting: forwardRef(() => HlmDropdownMenuTrigger)
1263
+ }],
1264
+ hostDirectives: [{
1265
+ directive: CdkMenuTrigger,
1266
+ inputs: ["cdkMenuTriggerFor: hlmDropdownMenuTrigger", "cdkMenuTriggerData: hlmDropdownMenuTriggerData"],
1267
+ outputs: ["cdkMenuOpened: hlmDropdownMenuOpened", "cdkMenuClosed: hlmDropdownMenuClosed"]
1268
+ }],
1269
+ host: { "data-slot": "dropdown-menu-trigger" }
1270
+ }]
1271
+ }],
1272
+ ctorParameters: () => [],
1273
+ propDecorators: {
1274
+ align: [{
1275
+ type: i0.Input,
1276
+ args: [{
1277
+ isSignal: true,
1278
+ alias: "align",
1279
+ required: false
1280
+ }]
1281
+ }],
1282
+ side: [{
1283
+ type: i0.Input,
1284
+ args: [{
1285
+ isSignal: true,
1286
+ alias: "side",
1287
+ required: false
1288
+ }]
1289
+ }]
1290
+ }
1291
+ });
486
1292
  const HlmDropdownMenuImports = [
487
- HlmDropdownMenu,
488
- HlmDropdownMenuCheckbox,
489
- HlmDropdownMenuCheckboxIndicator,
490
- HlmDropdownMenuGroup,
491
- HlmDropdownMenuItem,
492
- HlmDropdownMenuItemSubIndicator,
493
- HlmDropdownMenuLabel,
494
- HlmDropdownMenuRadio,
495
- HlmDropdownMenuRadioIndicator,
496
- HlmDropdownMenuSeparator,
497
- HlmDropdownMenuShortcut,
498
- HlmDropdownMenuSub,
499
- HlmDropdownMenuSubTrigger,
500
- HlmDropdownMenuTrigger,
1293
+ HlmDropdownMenu,
1294
+ HlmDropdownMenuCheckbox,
1295
+ HlmDropdownMenuCheckboxIndicator,
1296
+ HlmDropdownMenuGroup,
1297
+ HlmDropdownMenuItem,
1298
+ HlmDropdownMenuItemSubIndicator,
1299
+ HlmDropdownMenuLabel,
1300
+ HlmDropdownMenuRadio,
1301
+ HlmDropdownMenuRadioIndicator,
1302
+ HlmDropdownMenuSeparator,
1303
+ HlmDropdownMenuShortcut,
1304
+ HlmDropdownMenuSub,
1305
+ HlmDropdownMenuSubTrigger,
1306
+ HlmDropdownMenuTrigger
501
1307
  ];
502
-
503
- /**
504
- * Generated bundle index. Do not edit.
505
- */
506
-
507
1308
  export { HlmDropdownMenu, HlmDropdownMenuCheckbox, HlmDropdownMenuCheckboxCdk, HlmDropdownMenuCheckboxIndicator, HlmDropdownMenuFocusOnHover, HlmDropdownMenuGroup, HlmDropdownMenuImports, HlmDropdownMenuItem, HlmDropdownMenuItemSubIndicator, HlmDropdownMenuLabel, HlmDropdownMenuRadio, HlmDropdownMenuRadioCdk, HlmDropdownMenuRadioIndicator, HlmDropdownMenuSeparator, HlmDropdownMenuShortcut, HlmDropdownMenuSub, HlmDropdownMenuSubTrigger, HlmDropdownMenuTrigger, injectHlmDropdownMenuConfig, provideHlmDropdownMenuConfig };
508
- //# sourceMappingURL=yukit-web-helm-dropdown-menu.mjs.map
1309
+
1310
+ //# sourceMappingURL=yukit-web-helm-dropdown-menu.mjs.map