ngx-com 0.0.1 → 0.0.4

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 (82) hide show
  1. package/fesm2022/ngx-com-components-avatar.mjs +772 -0
  2. package/fesm2022/ngx-com-components-avatar.mjs.map +1 -0
  3. package/fesm2022/ngx-com-components-badge.mjs +138 -0
  4. package/fesm2022/ngx-com-components-badge.mjs.map +1 -0
  5. package/fesm2022/ngx-com-components-button.mjs +146 -0
  6. package/fesm2022/ngx-com-components-button.mjs.map +1 -0
  7. package/fesm2022/ngx-com-components-calendar.mjs +5046 -0
  8. package/fesm2022/ngx-com-components-calendar.mjs.map +1 -0
  9. package/fesm2022/ngx-com-components-card.mjs +590 -0
  10. package/fesm2022/ngx-com-components-card.mjs.map +1 -0
  11. package/fesm2022/ngx-com-components-checkbox.mjs +344 -0
  12. package/fesm2022/ngx-com-components-checkbox.mjs.map +1 -0
  13. package/fesm2022/ngx-com-components-collapsible.mjs +612 -0
  14. package/fesm2022/ngx-com-components-collapsible.mjs.map +1 -0
  15. package/fesm2022/ngx-com-components-confirm.mjs +562 -0
  16. package/fesm2022/ngx-com-components-confirm.mjs.map +1 -0
  17. package/fesm2022/ngx-com-components-dropdown-testing.mjs +255 -0
  18. package/fesm2022/ngx-com-components-dropdown-testing.mjs.map +1 -0
  19. package/fesm2022/ngx-com-components-dropdown.mjs +2692 -0
  20. package/fesm2022/ngx-com-components-dropdown.mjs.map +1 -0
  21. package/fesm2022/ngx-com-components-empty-state.mjs +382 -0
  22. package/fesm2022/ngx-com-components-empty-state.mjs.map +1 -0
  23. package/fesm2022/ngx-com-components-form-field.mjs +924 -0
  24. package/fesm2022/ngx-com-components-form-field.mjs.map +1 -0
  25. package/fesm2022/ngx-com-components-icon.mjs +183 -0
  26. package/fesm2022/ngx-com-components-icon.mjs.map +1 -0
  27. package/fesm2022/ngx-com-components-item.mjs +578 -0
  28. package/fesm2022/ngx-com-components-item.mjs.map +1 -0
  29. package/fesm2022/ngx-com-components-menu.mjs +1200 -0
  30. package/fesm2022/ngx-com-components-menu.mjs.map +1 -0
  31. package/fesm2022/ngx-com-components-paginator.mjs +823 -0
  32. package/fesm2022/ngx-com-components-paginator.mjs.map +1 -0
  33. package/fesm2022/ngx-com-components-popover.mjs +901 -0
  34. package/fesm2022/ngx-com-components-popover.mjs.map +1 -0
  35. package/fesm2022/ngx-com-components-radio.mjs +621 -0
  36. package/fesm2022/ngx-com-components-radio.mjs.map +1 -0
  37. package/fesm2022/ngx-com-components-segmented-control.mjs +538 -0
  38. package/fesm2022/ngx-com-components-segmented-control.mjs.map +1 -0
  39. package/fesm2022/ngx-com-components-sort.mjs +368 -0
  40. package/fesm2022/ngx-com-components-sort.mjs.map +1 -0
  41. package/fesm2022/ngx-com-components-spinner.mjs +189 -0
  42. package/fesm2022/ngx-com-components-spinner.mjs.map +1 -0
  43. package/fesm2022/ngx-com-components-tabs.mjs +1522 -0
  44. package/fesm2022/ngx-com-components-tabs.mjs.map +1 -0
  45. package/fesm2022/ngx-com-components-tooltip.mjs +625 -0
  46. package/fesm2022/ngx-com-components-tooltip.mjs.map +1 -0
  47. package/fesm2022/ngx-com-components.mjs +17 -0
  48. package/fesm2022/ngx-com-components.mjs.map +1 -0
  49. package/fesm2022/ngx-com-tokens.mjs +12 -0
  50. package/fesm2022/ngx-com-tokens.mjs.map +1 -0
  51. package/fesm2022/ngx-com-utils.mjs +601 -0
  52. package/fesm2022/ngx-com-utils.mjs.map +1 -0
  53. package/fesm2022/ngx-com.mjs +9 -23
  54. package/fesm2022/ngx-com.mjs.map +1 -1
  55. package/package.json +105 -1
  56. package/types/ngx-com-components-avatar.d.ts +409 -0
  57. package/types/ngx-com-components-badge.d.ts +97 -0
  58. package/types/ngx-com-components-button.d.ts +69 -0
  59. package/types/ngx-com-components-calendar.d.ts +1665 -0
  60. package/types/ngx-com-components-card.d.ts +373 -0
  61. package/types/ngx-com-components-checkbox.d.ts +116 -0
  62. package/types/ngx-com-components-collapsible.d.ts +379 -0
  63. package/types/ngx-com-components-confirm.d.ts +160 -0
  64. package/types/ngx-com-components-dropdown-testing.d.ts +116 -0
  65. package/types/ngx-com-components-dropdown.d.ts +938 -0
  66. package/types/ngx-com-components-empty-state.d.ts +269 -0
  67. package/types/ngx-com-components-form-field.d.ts +531 -0
  68. package/types/ngx-com-components-icon.d.ts +94 -0
  69. package/types/ngx-com-components-item.d.ts +336 -0
  70. package/types/ngx-com-components-menu.d.ts +479 -0
  71. package/types/ngx-com-components-paginator.d.ts +265 -0
  72. package/types/ngx-com-components-popover.d.ts +309 -0
  73. package/types/ngx-com-components-radio.d.ts +258 -0
  74. package/types/ngx-com-components-segmented-control.d.ts +274 -0
  75. package/types/ngx-com-components-sort.d.ts +133 -0
  76. package/types/ngx-com-components-spinner.d.ts +120 -0
  77. package/types/ngx-com-components-tabs.d.ts +396 -0
  78. package/types/ngx-com-components-tooltip.d.ts +200 -0
  79. package/types/ngx-com-components.d.ts +12 -0
  80. package/types/ngx-com-tokens.d.ts +7 -0
  81. package/types/ngx-com-utils.d.ts +424 -0
  82. package/types/ngx-com.d.ts +10 -7
@@ -0,0 +1,479 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Signal, InputSignal, TemplateRef, InputSignalWithTransform, ModelSignal, OutputEmitterRef, WritableSignal } from '@angular/core';
3
+ import { VariantProps, cva } from 'class-variance-authority';
4
+ import { FocusableOption } from '@angular/cdk/a11y';
5
+
6
+ /**
7
+ * Interface for the root menu trigger, allowing items to close the entire menu tree.
8
+ */
9
+ interface RootMenuTrigger {
10
+ /** Close the menu and all submenus. */
11
+ close(): void;
12
+ /** Whether to close the menu when an item is selected. */
13
+ menuCloseOnSelect(): boolean;
14
+ /** Called by MenuComponent to register itself when attached. */
15
+ registerMenu?(menu: MenuRef): void;
16
+ }
17
+ /**
18
+ * Interface for a parent menu, allowing items and submenus to coordinate.
19
+ */
20
+ interface MenuRef {
21
+ /** Unique ID of the menu for ARIA. */
22
+ readonly menuId: string;
23
+ /** Size variant inherited by items. */
24
+ readonly menuSize: () => 'sm' | 'md' | 'lg';
25
+ /** Close this menu level. */
26
+ close(): void;
27
+ /** Focus the first item. */
28
+ focusFirstItem(): void;
29
+ /** Focus the last item. */
30
+ focusLastItem(): void;
31
+ }
32
+ /**
33
+ * Token to access the root menu trigger from anywhere in the menu tree.
34
+ * Used by items to close the entire menu on selection.
35
+ */
36
+ declare const ROOT_MENU_TRIGGER: InjectionToken<RootMenuTrigger>;
37
+ /**
38
+ * Token to access the nearest parent menu component.
39
+ * Used by items and submenu triggers to coordinate with their parent.
40
+ */
41
+ declare const MENU_REF: InjectionToken<MenuRef>;
42
+
43
+ type MenuSize = 'sm' | 'md' | 'lg';
44
+ type MenuVariant = 'default' | 'compact';
45
+ type MenuPosition = 'above' | 'below' | 'left' | 'right';
46
+ type MenuAlignment = 'start' | 'center' | 'end';
47
+ /**
48
+ * Menu panel styling variants.
49
+ *
50
+ * @tokens `--color-popover`, `--color-popover-foreground`, `--color-border`, `--shadow-lg`, `--radius-popover`
51
+ */
52
+ declare const menuPanelVariants: ReturnType<typeof cva<{
53
+ size: Record<MenuSize, string>;
54
+ variant: Record<MenuVariant, string>;
55
+ }>>;
56
+ type MenuPanelVariants = VariantProps<typeof menuPanelVariants>;
57
+ type BooleanVariant = Record<'true' | 'false', string>;
58
+ /**
59
+ * Menu item styling variants (base for all item types).
60
+ *
61
+ * @tokens `--color-popover-foreground`, `--color-foreground`, `--color-muted`, `--color-warn`, `--color-warn-subtle`
62
+ */
63
+ declare const menuItemVariants: ReturnType<typeof cva<{
64
+ size: Record<MenuSize, string>;
65
+ focused: BooleanVariant;
66
+ disabled: BooleanVariant;
67
+ destructive: BooleanVariant;
68
+ }>>;
69
+ type MenuItemVariants = VariantProps<typeof menuItemVariants>;
70
+ /**
71
+ * Menu label (section header) styling variants.
72
+ *
73
+ * @tokens `--color-muted-foreground`
74
+ */
75
+ declare const menuLabelVariants: ReturnType<typeof cva<{
76
+ size: Record<MenuSize, string>;
77
+ }>>;
78
+ type MenuLabelVariants = VariantProps<typeof menuLabelVariants>;
79
+ /**
80
+ * Check/radio indicator sizing variants.
81
+ */
82
+ declare const menuCheckIndicatorVariants: ReturnType<typeof cva<{
83
+ size: Record<MenuSize, string>;
84
+ }>>;
85
+ type MenuCheckIndicatorVariants = VariantProps<typeof menuCheckIndicatorVariants>;
86
+ /**
87
+ * Keyboard shortcut hint styling variants.
88
+ *
89
+ * @tokens `--color-muted-foreground`
90
+ */
91
+ declare const menuShortcutVariants: ReturnType<typeof cva<{
92
+ size: Record<MenuSize, string>;
93
+ }>>;
94
+ type MenuShortcutVariants = VariantProps<typeof menuShortcutVariants>;
95
+
96
+ /** Side for submenu positioning. */
97
+ type MenuSide = 'left' | 'right';
98
+ /**
99
+ * Unified menu trigger directive — opens a menu in a CDK overlay.
100
+ *
101
+ * **Root context** (outside a menu): Opens on click, has backdrop.
102
+ * **Submenu context** (inside a menu): Opens on hover/ArrowRight, no backdrop.
103
+ *
104
+ * @tokens `--color-popover`, `--color-popover-foreground`, `--color-border`, `--shadow-lg`
105
+ *
106
+ * @example Root trigger
107
+ * ```html
108
+ * <button comButton [comMenuTrigger]="menu">Options</button>
109
+ * <ng-template #menu>
110
+ * <com-menu>
111
+ * <button comMenuItem>Edit</button>
112
+ * <button comMenuItem>Delete</button>
113
+ * </com-menu>
114
+ * </ng-template>
115
+ * ```
116
+ *
117
+ * @example Submenu trigger (inside a menu, combined with comMenuItem)
118
+ * ```html
119
+ * <button comMenuItem [comMenuTrigger]="shareMenu" side="right" align="start">
120
+ * Share
121
+ * <com-menu-sub-indicator />
122
+ * </button>
123
+ * ```
124
+ */
125
+ declare class MenuTriggerDirective implements RootMenuTrigger {
126
+ private readonly overlay;
127
+ private readonly elementRef;
128
+ private readonly viewContainerRef;
129
+ private readonly injector;
130
+ private readonly destroyRef;
131
+ private readonly renderer;
132
+ private readonly parentMenu;
133
+ private readonly parentRootTrigger;
134
+ private overlayRef;
135
+ private attachedMenu;
136
+ private readonly menuId;
137
+ private openDelayTimer;
138
+ private closeDelayTimer;
139
+ private mouseInSubmenu;
140
+ private submenuMouseEnterCleanup;
141
+ private submenuMouseLeaveCleanup;
142
+ /** Whether this trigger is inside a menu (submenu context). */
143
+ readonly isSubmenu: Signal<boolean>;
144
+ /** Template containing `<com-menu>` with items. */
145
+ readonly comMenuTrigger: InputSignal<TemplateRef<unknown>>;
146
+ /** Preferred position direction (root trigger only). */
147
+ readonly menuPosition: InputSignal<MenuPosition>;
148
+ /** Alignment along cross-axis (root trigger only). */
149
+ readonly menuAlignment: InputSignal<MenuAlignment>;
150
+ /** Gap in px between trigger and menu. */
151
+ readonly menuOffset: InputSignal<number>;
152
+ /** Prevents opening when true. */
153
+ readonly menuDisabled: InputSignalWithTransform<boolean, unknown>;
154
+ /** Two-way bindable open state. */
155
+ readonly menuOpen: ModelSignal<boolean>;
156
+ /** Custom CSS class(es) on the overlay panel. */
157
+ readonly menuPanelClass: InputSignal<string | string[]>;
158
+ /** Close menu when an item is selected. */
159
+ readonly menuCloseOnSelect: InputSignalWithTransform<boolean, unknown>;
160
+ /** Side for submenu positioning (submenu context only). */
161
+ readonly side: InputSignal<MenuSide>;
162
+ /** Alignment for submenu positioning (submenu context only). */
163
+ readonly align: InputSignal<MenuAlignment>;
164
+ /** Hover delay before submenu opens in ms (submenu context only). */
165
+ readonly subMenuOpenDelay: InputSignal<number>;
166
+ /** Hover delay before submenu closes in ms (submenu context only). */
167
+ readonly subMenuCloseDelay: InputSignal<number>;
168
+ /** Emitted after menu opens. */
169
+ readonly menuOpened: OutputEmitterRef<void>;
170
+ /** Emitted after menu closes. */
171
+ readonly menuClosed: OutputEmitterRef<void>;
172
+ protected readonly ariaControls: Signal<string | null>;
173
+ private readonly panelClassArray;
174
+ constructor();
175
+ /** Programmatically open the menu. */
176
+ open(): void;
177
+ /** Programmatically close the menu. */
178
+ close(): void;
179
+ /** Toggle the menu open/close state. */
180
+ toggle(): void;
181
+ /** Called by MenuComponent to register itself when attached. */
182
+ registerMenu(menu: MenuRef): void;
183
+ protected onClick(event: Event): void;
184
+ protected onArrowDown(event: Event): void;
185
+ protected onArrowUp(event: Event): void;
186
+ protected onArrowRight(event: Event): void;
187
+ protected onArrowLeft(event: Event): void;
188
+ protected onEnter(event: Event): void;
189
+ protected onSpace(event: Event): void;
190
+ protected onMouseEnter(): void;
191
+ protected onMouseLeave(): void;
192
+ private focusFirstItemDeferred;
193
+ private focusLastItemDeferred;
194
+ private openMenu;
195
+ private closeMenu;
196
+ private openSubmenuInternal;
197
+ private closeSubmenu;
198
+ private createOverlay;
199
+ private attachContent;
200
+ private subscribeToCloseEvents;
201
+ private subscribeToSubmenuCloseEvents;
202
+ private onSubmenuMouseEnter;
203
+ private onSubmenuMouseLeave;
204
+ private cancelOpenTimer;
205
+ private cancelCloseTimer;
206
+ private disposeOverlay;
207
+ private cleanupSubmenuListeners;
208
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuTriggerDirective, never>;
209
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MenuTriggerDirective, "[comMenuTrigger]", ["comMenuTrigger"], { "comMenuTrigger": { "alias": "comMenuTrigger"; "required": true; "isSignal": true; }; "menuPosition": { "alias": "menuPosition"; "required": false; "isSignal": true; }; "menuAlignment": { "alias": "menuAlignment"; "required": false; "isSignal": true; }; "menuOffset": { "alias": "menuOffset"; "required": false; "isSignal": true; }; "menuDisabled": { "alias": "menuDisabled"; "required": false; "isSignal": true; }; "menuOpen": { "alias": "menuOpen"; "required": false; "isSignal": true; }; "menuPanelClass": { "alias": "menuPanelClass"; "required": false; "isSignal": true; }; "menuCloseOnSelect": { "alias": "menuCloseOnSelect"; "required": false; "isSignal": true; }; "side": { "alias": "side"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "subMenuOpenDelay": { "alias": "subMenuOpenDelay"; "required": false; "isSignal": true; }; "subMenuCloseDelay": { "alias": "subMenuCloseDelay"; "required": false; "isSignal": true; }; }, { "menuOpen": "menuOpenChange"; "menuOpened": "menuOpened"; "menuClosed": "menuClosed"; }, never, never, true, never>;
210
+ }
211
+
212
+ /**
213
+ * Base class for focusable menu items.
214
+ * All item directives must implement this interface for FocusKeyManager.
215
+ */
216
+ declare abstract class MenuItemBase implements FocusableOption {
217
+ abstract focus(): void;
218
+ abstract getLabel(): string;
219
+ /** Whether the item is disabled. */
220
+ abstract get disabled(): boolean;
221
+ }
222
+ /**
223
+ * Menu panel component that renders inside an overlay.
224
+ * Manages keyboard navigation across its items using CDK FocusKeyManager.
225
+ *
226
+ * @tokens `--color-popover`, `--color-popover-foreground`, `--color-border`, `--shadow-lg`
227
+ *
228
+ * @example
229
+ * ```html
230
+ * <com-menu>
231
+ * <button comMenuItem>Edit</button>
232
+ * <button comMenuItem>Delete</button>
233
+ * </com-menu>
234
+ * ```
235
+ */
236
+ declare class MenuComponent implements MenuRef {
237
+ private readonly rootTrigger;
238
+ private keyManager;
239
+ /** Size variant for the menu panel. */
240
+ readonly menuSize: InputSignal<MenuSize>;
241
+ /** Spacing density variant. */
242
+ readonly menuVariant: InputSignal<MenuVariant>;
243
+ /** Accessible label for the menu. */
244
+ readonly ariaLabel: InputSignal<string | null>;
245
+ /** ID of element labeling this menu. */
246
+ readonly ariaLabelledBy: InputSignal<string | null>;
247
+ readonly menuId: string;
248
+ readonly animationState: WritableSignal<'open' | 'closed'>;
249
+ /** Query all focusable items in the menu. */
250
+ private readonly items;
251
+ protected readonly panelClasses: Signal<string>;
252
+ constructor();
253
+ /** Focus the first non-disabled item. */
254
+ focusFirstItem(): void;
255
+ /** Focus the last non-disabled item. */
256
+ focusLastItem(): void;
257
+ /** Close this menu level. */
258
+ close(): void;
259
+ protected onKeydown(event: KeyboardEvent): void;
260
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuComponent, never>;
261
+ static ɵcmp: i0.ɵɵComponentDeclaration<MenuComponent, "com-menu", never, { "menuSize": { "alias": "menuSize"; "required": false; "isSignal": true; }; "menuVariant": { "alias": "menuVariant"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; }, {}, ["items"], ["*"], true, never>;
262
+ }
263
+
264
+ /**
265
+ * Menu item directive for actionable menu items.
266
+ * Applied to buttons, anchors, or any element that should be selectable.
267
+ *
268
+ * @tokens `--color-popover-foreground`, `--color-foreground`, `--color-muted`, `--color-warn`, `--color-warn-subtle`
269
+ *
270
+ * @example
271
+ * ```html
272
+ * <button comMenuItem (menuItemSelect)="onEdit()">Edit</button>
273
+ * <button comMenuItem [menuItemDisabled]="true">Disabled</button>
274
+ * <button comMenuItem destructive>Delete</button>
275
+ * ```
276
+ */
277
+ declare class MenuItemDirective extends MenuItemBase {
278
+ private readonly elementRef;
279
+ private readonly menu;
280
+ private readonly rootTrigger;
281
+ /** Disables the item. */
282
+ readonly menuItemDisabled: InputSignalWithTransform<boolean, unknown>;
283
+ /** Marks item as destructive (delete, remove actions). */
284
+ readonly destructive: InputSignalWithTransform<boolean, unknown>;
285
+ /** Emitted when item is activated. */
286
+ readonly menuItemSelect: OutputEmitterRef<void>;
287
+ private readonly isFocused;
288
+ private readonly size;
289
+ protected readonly itemClasses: Signal<string>;
290
+ get disabled(): boolean;
291
+ focus(): void;
292
+ getLabel(): string;
293
+ protected onAction(event: Event): void;
294
+ protected onMouseEnter(): void;
295
+ protected onMouseLeave(): void;
296
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemDirective, never>;
297
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MenuItemDirective, "[comMenuItem]", ["comMenuItem"], { "menuItemDisabled": { "alias": "menuItemDisabled"; "required": false; "isSignal": true; }; "destructive": { "alias": "destructive"; "required": false; "isSignal": true; }; }, { "menuItemSelect": "menuItemSelect"; }, never, never, true, never>;
298
+ }
299
+
300
+ /**
301
+ * Checkbox menu item component with toggleable checked state.
302
+ *
303
+ * @tokens `--color-popover-foreground`, `--color-foreground`, `--color-muted`
304
+ *
305
+ * @example
306
+ * ```html
307
+ * <button comMenuItemCheckbox [(checked)]="showSidebar">Sidebar</button>
308
+ * ```
309
+ */
310
+ declare class MenuItemCheckboxComponent extends MenuItemBase {
311
+ private readonly elementRef;
312
+ private readonly menu;
313
+ /** Disables the item. */
314
+ readonly menuItemDisabled: InputSignalWithTransform<boolean, unknown>;
315
+ /** Two-way bindable checked state. */
316
+ readonly checked: ModelSignal<boolean>;
317
+ private readonly isFocused;
318
+ private readonly size;
319
+ protected readonly itemClasses: Signal<string>;
320
+ protected readonly indicatorClasses: Signal<string>;
321
+ get disabled(): boolean;
322
+ focus(): void;
323
+ getLabel(): string;
324
+ protected toggle(event: Event): void;
325
+ protected onMouseEnter(): void;
326
+ protected onMouseLeave(): void;
327
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemCheckboxComponent, never>;
328
+ static ɵcmp: i0.ɵɵComponentDeclaration<MenuItemCheckboxComponent, "[comMenuItemCheckbox]", ["comMenuItemCheckbox"], { "menuItemDisabled": { "alias": "menuItemDisabled"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; }, never, ["*"], true, never>;
329
+ }
330
+
331
+ /**
332
+ * Radio menu item component for single-selection within a group.
333
+ *
334
+ * @tokens `--color-popover-foreground`, `--color-foreground`, `--color-muted`
335
+ *
336
+ * @example
337
+ * ```html
338
+ * <div comMenuGroup [(groupValue)]="sortField">
339
+ * <button comMenuItemRadio value="name">Name</button>
340
+ * <button comMenuItemRadio value="date">Date</button>
341
+ * </div>
342
+ * ```
343
+ */
344
+ declare class MenuItemRadioComponent extends MenuItemBase {
345
+ private readonly elementRef;
346
+ private readonly menu;
347
+ private readonly rootTrigger;
348
+ private readonly group;
349
+ /** Disables the item. */
350
+ readonly menuItemDisabled: InputSignalWithTransform<boolean, unknown>;
351
+ /** The value this radio item represents. */
352
+ readonly value: InputSignal<unknown>;
353
+ private readonly isFocused;
354
+ private readonly size;
355
+ /** Whether this radio item is currently selected. */
356
+ readonly isChecked: Signal<boolean>;
357
+ protected readonly itemClasses: Signal<string>;
358
+ protected readonly indicatorClasses: Signal<string>;
359
+ get disabled(): boolean;
360
+ focus(): void;
361
+ getLabel(): string;
362
+ protected select(event: Event): void;
363
+ protected onMouseEnter(): void;
364
+ protected onMouseLeave(): void;
365
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemRadioComponent, never>;
366
+ static ɵcmp: i0.ɵɵComponentDeclaration<MenuItemRadioComponent, "[comMenuItemRadio]", ["comMenuItemRadio"], { "menuItemDisabled": { "alias": "menuItemDisabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
367
+ }
368
+
369
+ /**
370
+ * Token for menu group to allow radio items to coordinate.
371
+ */
372
+ declare abstract class MenuGroupRef {
373
+ abstract readonly groupValue: () => unknown;
374
+ abstract setGroupValue(value: unknown): void;
375
+ }
376
+ /**
377
+ * Menu group directive for organizing related items.
378
+ * For radio items, ensures mutual exclusivity within the group.
379
+ *
380
+ * @example
381
+ * ```html
382
+ * <div comMenuGroup [(groupValue)]="sortField">
383
+ * <button comMenuItemRadio value="name">Name</button>
384
+ * <button comMenuItemRadio value="date">Date</button>
385
+ * </div>
386
+ * ```
387
+ *
388
+ * @tokens None - uses only ARIA attributes
389
+ */
390
+ declare class MenuGroupDirective extends MenuGroupRef {
391
+ /** Optional accessible label for the group. */
392
+ readonly ariaLabel: InputSignal<string | null>;
393
+ /** Two-way bindable value for radio groups. */
394
+ readonly groupValue: ModelSignal<unknown>;
395
+ setGroupValue(value: unknown): void;
396
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuGroupDirective, never>;
397
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MenuGroupDirective, "[comMenuGroup]", ["comMenuGroup"], { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "groupValue": { "alias": "groupValue"; "required": false; "isSignal": true; }; }, { "groupValue": "groupValueChange"; }, never, never, true, never>;
398
+ }
399
+
400
+ /**
401
+ * Non-interactive section label/header inside a menu.
402
+ *
403
+ * @tokens `--color-muted-foreground`
404
+ *
405
+ * @example
406
+ * ```html
407
+ * <span comMenuLabel>Team</span>
408
+ * <button comMenuItem>View Members</button>
409
+ * ```
410
+ */
411
+ declare class MenuLabelDirective {
412
+ private readonly menu;
413
+ /** Unique ID that can be referenced by aria-labelledby. */
414
+ readonly labelId: string;
415
+ private readonly size;
416
+ protected readonly labelClasses: Signal<string>;
417
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuLabelDirective, never>;
418
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MenuLabelDirective, "[comMenuLabel]", ["comMenuLabel"], {}, {}, never, never, true, never>;
419
+ }
420
+
421
+ /**
422
+ * Visual separator between menu sections.
423
+ *
424
+ * @tokens `--color-border`
425
+ *
426
+ * @example
427
+ * ```html
428
+ * <button comMenuItem>Edit</button>
429
+ * <hr comMenuDivider />
430
+ * <button comMenuItem>Delete</button>
431
+ * ```
432
+ */
433
+ declare class MenuDividerDirective {
434
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuDividerDirective, never>;
435
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MenuDividerDirective, "[comMenuDivider]", ["comMenuDivider"], {}, {}, never, never, true, never>;
436
+ }
437
+
438
+ /**
439
+ * Submenu indicator component — displays a chevron icon indicating a submenu.
440
+ * Place inside a menu item that has `[comMenuTrigger]` to indicate it opens a submenu.
441
+ *
442
+ * @tokens `--color-muted-foreground`
443
+ *
444
+ * @example
445
+ * ```html
446
+ * <button comMenuItem [comMenuTrigger]="shareMenu">
447
+ * Share
448
+ * <com-menu-sub-indicator />
449
+ * </button>
450
+ * ```
451
+ */
452
+ declare class MenuSubIndicatorComponent {
453
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuSubIndicatorComponent, never>;
454
+ static ɵcmp: i0.ɵɵComponentDeclaration<MenuSubIndicatorComponent, "com-menu-sub-indicator", never, {}, {}, never, never, true, never>;
455
+ }
456
+
457
+ /**
458
+ * Keyboard shortcut hint displayed in a menu item.
459
+ *
460
+ * @tokens `--color-muted-foreground`
461
+ *
462
+ * @example
463
+ * ```html
464
+ * <button comMenuItem>
465
+ * Save
466
+ * <span comMenuShortcut>⌘S</span>
467
+ * </button>
468
+ * ```
469
+ */
470
+ declare class MenuShortcutDirective {
471
+ private readonly menu;
472
+ private readonly size;
473
+ protected readonly shortcutClasses: Signal<string>;
474
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuShortcutDirective, never>;
475
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MenuShortcutDirective, "[comMenuShortcut]", ["comMenuShortcut"], {}, {}, never, never, true, never>;
476
+ }
477
+
478
+ export { MENU_REF, MenuComponent, MenuDividerDirective, MenuGroupDirective, MenuGroupRef, MenuItemBase, MenuItemCheckboxComponent, MenuItemDirective, MenuItemRadioComponent, MenuLabelDirective, MenuShortcutDirective, MenuSubIndicatorComponent, MenuTriggerDirective, ROOT_MENU_TRIGGER, menuCheckIndicatorVariants, menuItemVariants, menuLabelVariants, menuPanelVariants, menuShortcutVariants };
479
+ export type { MenuAlignment, MenuCheckIndicatorVariants, MenuItemVariants, MenuLabelVariants, MenuPanelVariants, MenuPosition, MenuRef, MenuShortcutVariants, MenuSide, MenuSize, MenuVariant, RootMenuTrigger };