@cute-widgets/base 20.0.1

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 (183) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/LICENSE.md +191 -0
  3. package/README.md +190 -0
  4. package/abstract/index.d.ts +327 -0
  5. package/alert/index.d.ts +68 -0
  6. package/autocomplete/index.d.ts +442 -0
  7. package/badge/index.d.ts +26 -0
  8. package/bottom-sheet/index.d.ts +231 -0
  9. package/button/index.d.ts +182 -0
  10. package/button-toggle/index.d.ts +225 -0
  11. package/card/index.d.ts +163 -0
  12. package/checkbox/index.d.ts +174 -0
  13. package/chips/index.d.ts +963 -0
  14. package/collapse/index.d.ts +97 -0
  15. package/core/animation/index.d.ts +43 -0
  16. package/core/datetime/index.d.ts +404 -0
  17. package/core/directives/index.d.ts +168 -0
  18. package/core/error/index.d.ts +74 -0
  19. package/core/index.d.ts +1039 -0
  20. package/core/interfaces/index.d.ts +114 -0
  21. package/core/layout/index.d.ts +53 -0
  22. package/core/line/index.d.ts +37 -0
  23. package/core/nav/index.d.ts +321 -0
  24. package/core/observers/index.d.ts +124 -0
  25. package/core/option/index.d.ts +185 -0
  26. package/core/pipes/index.d.ts +53 -0
  27. package/core/ripple/index.d.ts +66 -0
  28. package/core/testing/index.d.ts +154 -0
  29. package/core/theming/index.d.ts +118 -0
  30. package/core/types/index.d.ts +53 -0
  31. package/core/utils/index.d.ts +129 -0
  32. package/cute-widgets-base-20.0.1.tgz +0 -0
  33. package/datepicker/index.d.ts +1817 -0
  34. package/dialog/index.d.ts +484 -0
  35. package/divider/index.d.ts +24 -0
  36. package/expansion/README.md +8 -0
  37. package/expansion/index.d.ts +308 -0
  38. package/fesm2022/cute-widgets-base-abstract.mjs +547 -0
  39. package/fesm2022/cute-widgets-base-abstract.mjs.map +1 -0
  40. package/fesm2022/cute-widgets-base-alert.mjs +198 -0
  41. package/fesm2022/cute-widgets-base-alert.mjs.map +1 -0
  42. package/fesm2022/cute-widgets-base-autocomplete.mjs +1217 -0
  43. package/fesm2022/cute-widgets-base-autocomplete.mjs.map +1 -0
  44. package/fesm2022/cute-widgets-base-badge.mjs +75 -0
  45. package/fesm2022/cute-widgets-base-badge.mjs.map +1 -0
  46. package/fesm2022/cute-widgets-base-bottom-sheet.mjs +416 -0
  47. package/fesm2022/cute-widgets-base-bottom-sheet.mjs.map +1 -0
  48. package/fesm2022/cute-widgets-base-button-toggle.mjs +640 -0
  49. package/fesm2022/cute-widgets-base-button-toggle.mjs.map +1 -0
  50. package/fesm2022/cute-widgets-base-button.mjs +546 -0
  51. package/fesm2022/cute-widgets-base-button.mjs.map +1 -0
  52. package/fesm2022/cute-widgets-base-card.mjs +471 -0
  53. package/fesm2022/cute-widgets-base-card.mjs.map +1 -0
  54. package/fesm2022/cute-widgets-base-checkbox.mjs +390 -0
  55. package/fesm2022/cute-widgets-base-checkbox.mjs.map +1 -0
  56. package/fesm2022/cute-widgets-base-chips.mjs +2360 -0
  57. package/fesm2022/cute-widgets-base-chips.mjs.map +1 -0
  58. package/fesm2022/cute-widgets-base-collapse.mjs +259 -0
  59. package/fesm2022/cute-widgets-base-collapse.mjs.map +1 -0
  60. package/fesm2022/cute-widgets-base-core-animation.mjs +53 -0
  61. package/fesm2022/cute-widgets-base-core-animation.mjs.map +1 -0
  62. package/fesm2022/cute-widgets-base-core-datetime.mjs +568 -0
  63. package/fesm2022/cute-widgets-base-core-datetime.mjs.map +1 -0
  64. package/fesm2022/cute-widgets-base-core-directives.mjs +404 -0
  65. package/fesm2022/cute-widgets-base-core-directives.mjs.map +1 -0
  66. package/fesm2022/cute-widgets-base-core-error.mjs +105 -0
  67. package/fesm2022/cute-widgets-base-core-error.mjs.map +1 -0
  68. package/fesm2022/cute-widgets-base-core-interfaces.mjs +22 -0
  69. package/fesm2022/cute-widgets-base-core-interfaces.mjs.map +1 -0
  70. package/fesm2022/cute-widgets-base-core-layout.mjs +74 -0
  71. package/fesm2022/cute-widgets-base-core-layout.mjs.map +1 -0
  72. package/fesm2022/cute-widgets-base-core-line.mjs +87 -0
  73. package/fesm2022/cute-widgets-base-core-line.mjs.map +1 -0
  74. package/fesm2022/cute-widgets-base-core-nav.mjs +863 -0
  75. package/fesm2022/cute-widgets-base-core-nav.mjs.map +1 -0
  76. package/fesm2022/cute-widgets-base-core-observers.mjs +304 -0
  77. package/fesm2022/cute-widgets-base-core-observers.mjs.map +1 -0
  78. package/fesm2022/cute-widgets-base-core-option.mjs +373 -0
  79. package/fesm2022/cute-widgets-base-core-option.mjs.map +1 -0
  80. package/fesm2022/cute-widgets-base-core-pipes.mjs +97 -0
  81. package/fesm2022/cute-widgets-base-core-pipes.mjs.map +1 -0
  82. package/fesm2022/cute-widgets-base-core-ripple.mjs +172 -0
  83. package/fesm2022/cute-widgets-base-core-ripple.mjs.map +1 -0
  84. package/fesm2022/cute-widgets-base-core-testing.mjs +210 -0
  85. package/fesm2022/cute-widgets-base-core-testing.mjs.map +1 -0
  86. package/fesm2022/cute-widgets-base-core-theming.mjs +314 -0
  87. package/fesm2022/cute-widgets-base-core-theming.mjs.map +1 -0
  88. package/fesm2022/cute-widgets-base-core-types.mjs +22 -0
  89. package/fesm2022/cute-widgets-base-core-types.mjs.map +1 -0
  90. package/fesm2022/cute-widgets-base-core-utils.mjs +257 -0
  91. package/fesm2022/cute-widgets-base-core-utils.mjs.map +1 -0
  92. package/fesm2022/cute-widgets-base-core.mjs +1600 -0
  93. package/fesm2022/cute-widgets-base-core.mjs.map +1 -0
  94. package/fesm2022/cute-widgets-base-datepicker.mjs +4827 -0
  95. package/fesm2022/cute-widgets-base-datepicker.mjs.map +1 -0
  96. package/fesm2022/cute-widgets-base-dialog.mjs +1046 -0
  97. package/fesm2022/cute-widgets-base-dialog.mjs.map +1 -0
  98. package/fesm2022/cute-widgets-base-divider.mjs +86 -0
  99. package/fesm2022/cute-widgets-base-divider.mjs.map +1 -0
  100. package/fesm2022/cute-widgets-base-expansion.mjs +623 -0
  101. package/fesm2022/cute-widgets-base-expansion.mjs.map +1 -0
  102. package/fesm2022/cute-widgets-base-form-field.mjs +969 -0
  103. package/fesm2022/cute-widgets-base-form-field.mjs.map +1 -0
  104. package/fesm2022/cute-widgets-base-grid-list.mjs +715 -0
  105. package/fesm2022/cute-widgets-base-grid-list.mjs.map +1 -0
  106. package/fesm2022/cute-widgets-base-icon.mjs +1105 -0
  107. package/fesm2022/cute-widgets-base-icon.mjs.map +1 -0
  108. package/fesm2022/cute-widgets-base-input.mjs +726 -0
  109. package/fesm2022/cute-widgets-base-input.mjs.map +1 -0
  110. package/fesm2022/cute-widgets-base-layout-container.mjs +95 -0
  111. package/fesm2022/cute-widgets-base-layout-container.mjs.map +1 -0
  112. package/fesm2022/cute-widgets-base-layout-stack.mjs +166 -0
  113. package/fesm2022/cute-widgets-base-layout-stack.mjs.map +1 -0
  114. package/fesm2022/cute-widgets-base-layout.mjs +250 -0
  115. package/fesm2022/cute-widgets-base-layout.mjs.map +1 -0
  116. package/fesm2022/cute-widgets-base-list.mjs +1557 -0
  117. package/fesm2022/cute-widgets-base-list.mjs.map +1 -0
  118. package/fesm2022/cute-widgets-base-menu.mjs +1283 -0
  119. package/fesm2022/cute-widgets-base-menu.mjs.map +1 -0
  120. package/fesm2022/cute-widgets-base-navbar.mjs +359 -0
  121. package/fesm2022/cute-widgets-base-navbar.mjs.map +1 -0
  122. package/fesm2022/cute-widgets-base-paginator.mjs +485 -0
  123. package/fesm2022/cute-widgets-base-paginator.mjs.map +1 -0
  124. package/fesm2022/cute-widgets-base-progress.mjs +321 -0
  125. package/fesm2022/cute-widgets-base-progress.mjs.map +1 -0
  126. package/fesm2022/cute-widgets-base-radio.mjs +637 -0
  127. package/fesm2022/cute-widgets-base-radio.mjs.map +1 -0
  128. package/fesm2022/cute-widgets-base-select.mjs +1208 -0
  129. package/fesm2022/cute-widgets-base-select.mjs.map +1 -0
  130. package/fesm2022/cute-widgets-base-sidenav.mjs +1095 -0
  131. package/fesm2022/cute-widgets-base-sidenav.mjs.map +1 -0
  132. package/fesm2022/cute-widgets-base-slider.mjs +99 -0
  133. package/fesm2022/cute-widgets-base-slider.mjs.map +1 -0
  134. package/fesm2022/cute-widgets-base-snack-bar.mjs +897 -0
  135. package/fesm2022/cute-widgets-base-snack-bar.mjs.map +1 -0
  136. package/fesm2022/cute-widgets-base-sort.mjs +639 -0
  137. package/fesm2022/cute-widgets-base-sort.mjs.map +1 -0
  138. package/fesm2022/cute-widgets-base-spinner.mjs +154 -0
  139. package/fesm2022/cute-widgets-base-spinner.mjs.map +1 -0
  140. package/fesm2022/cute-widgets-base-stepper.mjs +673 -0
  141. package/fesm2022/cute-widgets-base-stepper.mjs.map +1 -0
  142. package/fesm2022/cute-widgets-base-table.mjs +1023 -0
  143. package/fesm2022/cute-widgets-base-table.mjs.map +1 -0
  144. package/fesm2022/cute-widgets-base-tabs.mjs +729 -0
  145. package/fesm2022/cute-widgets-base-tabs.mjs.map +1 -0
  146. package/fesm2022/cute-widgets-base-timepicker.mjs +965 -0
  147. package/fesm2022/cute-widgets-base-timepicker.mjs.map +1 -0
  148. package/fesm2022/cute-widgets-base-toolbar.mjs +120 -0
  149. package/fesm2022/cute-widgets-base-toolbar.mjs.map +1 -0
  150. package/fesm2022/cute-widgets-base-tooltip.mjs +947 -0
  151. package/fesm2022/cute-widgets-base-tooltip.mjs.map +1 -0
  152. package/fesm2022/cute-widgets-base-tree.mjs +598 -0
  153. package/fesm2022/cute-widgets-base-tree.mjs.map +1 -0
  154. package/fesm2022/cute-widgets-base.mjs +68 -0
  155. package/fesm2022/cute-widgets-base.mjs.map +1 -0
  156. package/form-field/index.d.ts +401 -0
  157. package/grid-list/index.d.ts +361 -0
  158. package/icon/index.d.ts +477 -0
  159. package/index.d.ts +3 -0
  160. package/input/index.d.ts +256 -0
  161. package/layout/container/index.d.ts +31 -0
  162. package/layout/index.d.ts +78 -0
  163. package/layout/stack/index.d.ts +52 -0
  164. package/list/index.d.ts +659 -0
  165. package/menu/index.d.ts +497 -0
  166. package/navbar/index.d.ts +91 -0
  167. package/package.json +279 -0
  168. package/paginator/index.d.ts +216 -0
  169. package/progress/index.d.ts +130 -0
  170. package/radio/index.d.ts +259 -0
  171. package/select/index.d.ts +426 -0
  172. package/sidenav/index.d.ts +369 -0
  173. package/slider/index.d.ts +48 -0
  174. package/snack-bar/index.d.ts +374 -0
  175. package/sort/index.d.ts +334 -0
  176. package/spinner/index.d.ts +70 -0
  177. package/stepper/index.d.ts +295 -0
  178. package/table/index.d.ts +395 -0
  179. package/tabs/index.d.ts +307 -0
  180. package/timepicker/index.d.ts +350 -0
  181. package/toolbar/index.d.ts +36 -0
  182. package/tooltip/index.d.ts +299 -0
  183. package/tree/index.d.ts +314 -0
@@ -0,0 +1,497 @@
1
+ import * as i0 from '@angular/core';
2
+ import { OnDestroy, InjectionToken, TemplateRef, EventEmitter, AfterViewInit, AfterContentInit, OnInit, QueryList, ElementRef, ViewContainerRef, NgZone } from '@angular/core';
3
+ import { AnimationEvent } from '@angular/animations';
4
+ import { FocusOrigin, FocusableOption, FocusMonitor } from '@angular/cdk/a11y';
5
+ import { Direction, Directionality } from '@angular/cdk/bidi';
6
+ import { Subject, Observable } from 'rxjs';
7
+ import * as i1 from '@angular/cdk/menu';
8
+ import { ScrollStrategy, Overlay } from '@angular/cdk/overlay';
9
+ import * as i1$1 from '@angular/common';
10
+
11
+ /**
12
+ * @license Apache-2.0
13
+ *
14
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
15
+ *
16
+ * You may not use this file except in compliance with the License
17
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
18
+ *
19
+ * This code is a modification of the `@angular/material` original
20
+ * code licensed under MIT-style License (https://angular.dev/license).
21
+ */
22
+ /** Menu position on X axis. */
23
+ type MenuPositionX = 'before' | 'after';
24
+ /** Menu position on Y axis. */
25
+ type MenuPositionY = 'above' | 'below';
26
+
27
+ /**
28
+ * Injection token that can be used to reference instances of `CuteMenuContent`. It serves
29
+ * as an alternative token to the actual `CuteMenuContent` class, which could cause unnecessary
30
+ * retention of the class and its directive metadata.
31
+ */
32
+ declare const CUTE_MENU_CONTENT: InjectionToken<CuteMenuContent>;
33
+ /** Menu content that will be rendered lazily once the menu is opened. */
34
+ declare class CuteMenuContent implements OnDestroy {
35
+ private _template;
36
+ private _appRef;
37
+ private _injector;
38
+ private _viewContainerRef;
39
+ private _document;
40
+ private _changeDetectorRef;
41
+ private _portal;
42
+ private _outlet;
43
+ /** Emits when the menu content has been attached. */
44
+ readonly _attached: Subject<void>;
45
+ constructor(...args: unknown[]);
46
+ /**
47
+ * Attaches the content with a particular context.
48
+ */
49
+ attach(context?: any): void;
50
+ /**
51
+ * Detaches the content.
52
+ */
53
+ detach(): void;
54
+ ngOnDestroy(): void;
55
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteMenuContent, never>;
56
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteMenuContent, "ng-template[cuteMenuContent]", never, {}, {}, never, never, true, never>;
57
+ }
58
+
59
+ /**
60
+ * @license Apache-2.0
61
+ *
62
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
63
+ *
64
+ * You may not use this file except in compliance with the License
65
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
66
+ *
67
+ * This code is a modification of the `@angular/material` original
68
+ * code licensed under MIT-style License (https://angular.dev/license).
69
+ */
70
+
71
+ /**
72
+ * Interface for a custom menu panel that can be used with `cuteMenuTriggerFor`.
73
+ */
74
+ interface CuteMenuPanel<T = any> {
75
+ xPosition: MenuPositionX;
76
+ yPosition: MenuPositionY;
77
+ overlapTrigger: boolean;
78
+ templateRef: TemplateRef<any>;
79
+ readonly closed: EventEmitter<void | 'click' | 'keydown' | 'tab'>;
80
+ parentMenu?: CuteMenuPanel | undefined;
81
+ direction?: Direction;
82
+ focusFirstItem: (origin?: FocusOrigin) => void;
83
+ resetActiveItem: () => void;
84
+ setPositionClasses?: (x: MenuPositionX, y: MenuPositionY) => void;
85
+ /**
86
+ * @deprecated No longer used and will be removed.
87
+ * @breaking-change 21.0.0
88
+ */
89
+ setElevation?(depth: number): void;
90
+ lazyContent?: CuteMenuContent;
91
+ backdropClass?: string;
92
+ overlayPanelClass?: string | string[];
93
+ hasBackdrop?: boolean;
94
+ readonly panelId?: string;
95
+ /**
96
+ * @deprecated To be removed.
97
+ * @breaking-change 8.0.0
98
+ */
99
+ addItem?: (item: T) => void;
100
+ /**
101
+ * @deprecated To be removed.
102
+ * @breaking-change 8.0.0
103
+ */
104
+ removeItem?: (item: T) => void;
105
+ }
106
+
107
+ /**
108
+ * @license Apache-2.0
109
+ *
110
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
111
+ *
112
+ * You may not use this file except in compliance with the License
113
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
114
+ *
115
+ * This code is a modification of the `@angular/material` original
116
+ * code licensed under MIT-style License (https://angular.dev/license).
117
+ */
118
+
119
+ /**
120
+ * Single item inside a `cute-menu`. Provides the menu item styling and accessibility treatment.
121
+ */
122
+ declare class CuteMenuItem implements FocusableOption, AfterViewInit, OnDestroy {
123
+ private _elementRef;
124
+ private _document;
125
+ private _focusMonitor;
126
+ _parentMenu?: CuteMenuPanel<CuteMenuItem> | null | undefined;
127
+ private _changeDetectorRef;
128
+ /** ARIA role for the menu item. */
129
+ role: 'menuitem' | 'menuitemradio' | 'menuitemcheckbox';
130
+ /** Whether the menu item is disabled. */
131
+ disabled: boolean;
132
+ /** Whether ripples are disabled on the menu item. */
133
+ disableRipple: boolean;
134
+ /** Stream that emits when the menu item is hovered. */
135
+ readonly _hovered: Subject<CuteMenuItem>;
136
+ /** Stream that emits when the menu item is focused. */
137
+ readonly _focused: Subject<CuteMenuItem>;
138
+ /** Whether the menu item is highlighted. */
139
+ protected _highlighted: boolean;
140
+ /** Whether the menu item acts as a trigger for a submenu. */
141
+ protected _triggersSubmenu: boolean;
142
+ constructor(...args: unknown[]);
143
+ /** Focuses the menu item. */
144
+ focus(origin?: FocusOrigin, options?: FocusOptions): void;
145
+ ngAfterViewInit(): void;
146
+ ngOnDestroy(): void;
147
+ /** Used to set the `tabindex`. */
148
+ _getTabIndex(): string;
149
+ /** Returns the host DOM element. */
150
+ _getHostElement(): HTMLElement;
151
+ /** Prevents the default element actions if it is disabled. */
152
+ _checkDisabled(event: Event): void;
153
+ /** Emits to the hover stream. */
154
+ _handleMouseEnter(): void;
155
+ /** Gets the label to be used when determining whether the option should be focused. */
156
+ getLabel(): string;
157
+ _setHighlighted(isHighlighted: boolean): void;
158
+ _setTriggersSubmenu(triggersSubmenu: boolean): void;
159
+ _hasFocus(): boolean;
160
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteMenuItem, never>;
161
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteMenuItem, "[cute-menu-item]", ["cuteMenuItem"], { "role": { "alias": "role"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; }, {}, never, ["cute-icon, i[class], [cuteMenuItemIcon]", "*"], true, never>;
162
+ static ngAcceptInputType_disabled: unknown;
163
+ static ngAcceptInputType_disableRipple: unknown;
164
+ }
165
+
166
+ /**
167
+ * @license Apache-2.0
168
+ *
169
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
170
+ *
171
+ * You may not use this file except in compliance with the License
172
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
173
+ *
174
+ * This code is a modification of the `@angular/material` original
175
+ * code licensed under MIT-style License (https://angular.dev/license).
176
+ */
177
+
178
+ type MenuShadowElevation = 0 | 1 | 2 | 3;
179
+ /** Reason why the menu was closed. */
180
+ type MenuCloseReason = void | 'click' | 'keydown' | 'tab';
181
+ /** Default `cute-menu` options that can be overridden. */
182
+ interface CuteMenuDefaultOptions {
183
+ /** The x-axis position of the menu. */
184
+ xPosition: MenuPositionX;
185
+ /** The y-axis position of the menu. */
186
+ yPosition: MenuPositionY;
187
+ /** Whether the menu should overlap the menu trigger. */
188
+ overlapTrigger: boolean;
189
+ /** Class to be applied to the menu's backdrop. */
190
+ backdropClass: string;
191
+ /** Class or list of classes to be applied to the menu's overlay panel. */
192
+ overlayPanelClass?: string | string[];
193
+ /** Whether the menu has a backdrop. */
194
+ hasBackdrop?: boolean;
195
+ }
196
+ /** Injection token to be used to override the default options for `mat-menu`. */
197
+ declare const CUTE_MENU_DEFAULT_OPTIONS: InjectionToken<CuteMenuDefaultOptions>;
198
+ /**
199
+ * @docs-private
200
+ * @deprecated No longer used, will be removed.
201
+ * @breaking-change 21.0.0
202
+ */
203
+ declare function CUTE_MENU_DEFAULT_OPTIONS_FACTORY(): CuteMenuDefaultOptions;
204
+ declare class CuteMenu implements CuteMenuPanel<CuteMenuItem>, AfterContentInit, OnInit, OnDestroy {
205
+ private _elementRef;
206
+ private _changeDetectorRef;
207
+ private _injector;
208
+ private _keyManager;
209
+ private _xPosition;
210
+ private _yPosition;
211
+ private _firstItemFocusRef?;
212
+ private _exitFallbackTimeout;
213
+ private _previousElevation;
214
+ private _elevationPrefix;
215
+ private _baseElevation;
216
+ /** Config object to be passed into the menu's ngClass */
217
+ protected _classList: {
218
+ [key: string]: boolean;
219
+ };
220
+ /** Current state of the panel animation. */
221
+ protected _panelAnimationState: 'void' | 'enter';
222
+ /** Only the direct descendant menu items. */
223
+ _directDescendantItems: QueryList<CuteMenuItem>;
224
+ /** Emits whenever an animation on the menu completes. */
225
+ readonly _animationDone: Subject<AnimationEvent>;
226
+ /** Whether the menu is animating. */
227
+ _isAnimating: boolean | undefined;
228
+ /** Parent menu of the current menu panel. */
229
+ parentMenu: CuteMenuPanel | undefined;
230
+ /** Layout direction of the menu. */
231
+ direction: Direction | undefined;
232
+ /** Class or list of classes to be added to the overlay panel. */
233
+ overlayPanelClass: string | string[];
234
+ /** Class to be added to the backdrop element. */
235
+ backdropClass: string;
236
+ /** aria-label for the menu panel. */
237
+ ariaLabel: string | undefined;
238
+ /** aria-labelledby for the menu panel. */
239
+ ariaLabelledby: string | undefined;
240
+ /** aria-describedby for the menu panel. */
241
+ ariaDescribedby: string | undefined;
242
+ /** Position of the menu in the X axis. */
243
+ get xPosition(): MenuPositionX;
244
+ set xPosition(value: MenuPositionX);
245
+ /** Position of the menu in the Y axis. */
246
+ get yPosition(): MenuPositionY;
247
+ set yPosition(value: MenuPositionY);
248
+ /** Whether the menu should overlap its trigger. */
249
+ overlapTrigger: boolean;
250
+ /** Whether the menu has a backdrop. */
251
+ hasBackdrop?: boolean;
252
+ /** @docs-private */
253
+ templateRef: TemplateRef<any>;
254
+ /** All items inside the menu. Includes items nested inside another menu. */
255
+ _allItems: QueryList<CuteMenuItem> | undefined;
256
+ /**
257
+ * List of the items inside a menu.
258
+ * @deprecated
259
+ * @breaking-change 8.0.0
260
+ */
261
+ items: QueryList<CuteMenuItem> | undefined;
262
+ /**
263
+ * Menu content that will be rendered lazily.
264
+ */
265
+ lazyContent: CuteMenuContent | undefined;
266
+ /**
267
+ * This method takes classes set on the host mat-menu element and applies them on the
268
+ * menu template that displays in the overlay container. Otherwise, it's difficult
269
+ * to style the containing menu from outside the component.
270
+ * @param classes list of class names
271
+ */
272
+ set panelClass(classes: string);
273
+ private _previousPanelClass;
274
+ /** Event emitted when the menu is closed. */
275
+ readonly closed: EventEmitter<MenuCloseReason>;
276
+ readonly panelId: string;
277
+ constructor(...args: unknown[]);
278
+ ngOnInit(): void;
279
+ ngAfterContentInit(): void;
280
+ ngOnDestroy(): void;
281
+ /** Stream that emits whenever the hovered menu item changes. */
282
+ _hovered(): Observable<CuteMenuItem>;
283
+ /** Handle a keyboard event from the menu, delegating to the appropriate action. */
284
+ protected _handleKeydown(event: KeyboardEvent): void;
285
+ /**
286
+ * Handle a mouse event from the menu, delegating to the appropriate action.
287
+ * @param event
288
+ */
289
+ protected onClick(event: MouseEvent): void;
290
+ /**
291
+ * Focus the first item in the menu.
292
+ * @param origin Action from which the focus originated. Used to set the correct styling.
293
+ */
294
+ focusFirstItem(origin?: FocusOrigin): void;
295
+ /**
296
+ * Resets the active item in the menu. This is used when the menu is opened, allowing
297
+ * the user to start from the first option when pressing the down arrow.
298
+ */
299
+ resetActiveItem(): void;
300
+ /**
301
+ * Sets the menu panel elevation.
302
+ * @param depth Number of parent menus that come before the menu.
303
+ */
304
+ setElevation(depth: number): void;
305
+ /**
306
+ * Adds classes to the menu panel based on its position. Can be used by
307
+ * consumers to add specific styling based on the position.
308
+ * @param posX Position of the menu along the x axis.
309
+ * @param posY Position of the menu along the y axis.
310
+ */
311
+ setPositionClasses(posX?: MenuPositionX, posY?: MenuPositionY): void;
312
+ /** Starts the entered animation. */
313
+ _startAnimation(): void;
314
+ /** Resets the panel animation to its initial state. */
315
+ _resetAnimation(): void;
316
+ /** Callback that is invoked when the panel animation completes. */
317
+ _onAnimationDone(event: AnimationEvent): void;
318
+ _onAnimationStart(event: AnimationEvent): void;
319
+ /**
320
+ * Sets up a stream that will keep track of any newly-added menu items and will update the list
321
+ * of direct descendants. We collect the descendants this way, because `_allItems` can include
322
+ * items that are part of child menus, and using a custom way of registering items is unreliable
323
+ * when it comes to maintaining the item order.
324
+ */
325
+ private _updateDirectDescendants;
326
+ /** Gets the menu panel DOM node. */
327
+ private _resolvePanel;
328
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteMenu, never>;
329
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteMenu, "cute-menu", ["cuteMenu"], { "backdropClass": { "alias": "backdropClass"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; }; "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "overlapTrigger": { "alias": "overlapTrigger"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "panelClass": { "alias": "class"; "required": false; }; }, { "closed": "closed"; }, ["lazyContent", "_allItems", "items"], ["*"], true, [{ directive: typeof i1.CdkMenu; inputs: {}; outputs: {}; }]>;
330
+ static ngAcceptInputType_overlapTrigger: unknown;
331
+ static ngAcceptInputType_hasBackdrop: any;
332
+ }
333
+
334
+ /**
335
+ * @license Apache-2.0
336
+ *
337
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
338
+ *
339
+ * You may not use this file except in compliance with the License
340
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
341
+ *
342
+ * This code is a modification of the `@angular/material` original
343
+ * code licensed under MIT-style License (https://angular.dev/license).
344
+ */
345
+
346
+ /** Injection token that determines the scroll handling while the menu is open. */
347
+ declare const CUTE_MENU_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
348
+ /** @docs-private */
349
+ declare function CUTE_MENU_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;
350
+ /** @docs-private */
351
+ declare const CUTE_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER: {
352
+ provide: InjectionToken<() => ScrollStrategy>;
353
+ deps: (typeof Overlay)[];
354
+ useFactory: typeof CUTE_MENU_SCROLL_STRATEGY_FACTORY;
355
+ };
356
+ /** Directive applied to an element that should trigger a `cute-menu`. */
357
+ declare class CuteMenuTrigger implements AfterContentInit, OnDestroy {
358
+ private _overlay;
359
+ private _element;
360
+ private _viewContainerRef;
361
+ private _menuItemInstance;
362
+ private _dir;
363
+ private _focusMonitor;
364
+ private _ngZone?;
365
+ private _portal;
366
+ private _overlayRef;
367
+ private _menuOpen;
368
+ private _closingActionsSubscription;
369
+ private _hoverSubscription;
370
+ private _menuCloseSubscription;
371
+ private readonly _scrollStrategy;
372
+ private _changeDetectorRef;
373
+ /**
374
+ * We're specifically looking for a `CuteMenu` here since the generic `CuteMenuPanel`
375
+ * interface lacks some functionality around nested menus and animations.
376
+ */
377
+ private readonly _parentCuteMenu;
378
+ /**
379
+ * Cached value of the padding of the parent menu panel.
380
+ * Used to offset submenus to compensate for the padding.
381
+ */
382
+ private _parentInnerPadding;
383
+ /**
384
+ * Handles touch start events on the trigger.
385
+ * Needs to be an arrow function, so we can easily use addEventListener and removeEventListener.
386
+ */
387
+ private _handleTouchStart;
388
+ _openedBy: Exclude<FocusOrigin, 'program' | null> | undefined;
389
+ /** References the menu instance that the trigger is associated with. */
390
+ get menu(): CuteMenuPanel | null;
391
+ set menu(menu: CuteMenuPanel | null);
392
+ private _menu;
393
+ /** Data to be passed along to any lazily rendered content. */
394
+ menuData: any;
395
+ /**
396
+ * Whether focus should be restored when the menu is closed.
397
+ * Note that disabling this option can have accessibility implications, and
398
+ * it's up to you to manage focus if you decide to turn it off.
399
+ */
400
+ restoreFocus: boolean;
401
+ /** Event emitted when the associated menu is opened. */
402
+ readonly menuOpened: EventEmitter<void>;
403
+ /** Event emitted when the associated menu is closed. */
404
+ readonly menuClosed: EventEmitter<void>;
405
+ constructor(overlay: Overlay, element: ElementRef<HTMLElement>, viewContainerRef: ViewContainerRef, scrollStrategy: any, parentMenu: CuteMenuPanel, menuItemInstance: CuteMenuItem, dir: Directionality, focusMonitor: FocusMonitor, ngZone: NgZone);
406
+ /**
407
+ * @deprecated `focusMonitor` will become a required parameter.
408
+ * @breaking-change 8.0.0
409
+ */
410
+ constructor(overlay: Overlay, element: ElementRef<HTMLElement>, viewContainerRef: ViewContainerRef, scrollStrategy: any, parentMenu: CuteMenuPanel, menuItemInstance: CuteMenuItem, dir: Directionality, focusMonitor?: FocusMonitor | null);
411
+ /**
412
+ * @deprecated `ngZone` will become a required parameter.
413
+ * @breaking-change 15.0.0
414
+ */
415
+ constructor(overlay: Overlay, element: ElementRef<HTMLElement>, viewContainerRef: ViewContainerRef, scrollStrategy: any, parentMenu: CuteMenuPanel, menuItemInstance: CuteMenuItem, dir: Directionality, focusMonitor: FocusMonitor);
416
+ ngAfterContentInit(): void;
417
+ ngOnDestroy(): void;
418
+ /** Whether the menu is open. */
419
+ get menuOpen(): boolean;
420
+ /** The text direction of the containing app. */
421
+ get dir(): Direction;
422
+ get elementRef(): Readonly<ElementRef<HTMLElement>>;
423
+ /** Whether the menu triggers a submenu or a top-level one. */
424
+ triggersSubmenu(): boolean;
425
+ /** Toggles the menu between the open and closed states. */
426
+ toggleMenu(): void;
427
+ /** Opens the menu. */
428
+ openMenu(): void;
429
+ /** Closes the menu. */
430
+ closeMenu(): void;
431
+ /**
432
+ * Focuses the menu trigger.
433
+ * @param origin Source of the menu trigger's focus.
434
+ * @param options Focus options
435
+ */
436
+ focus(origin?: FocusOrigin, options?: FocusOptions): void;
437
+ /**
438
+ * Updates the position of the menu to ensure that it fits all options within the viewport.
439
+ */
440
+ updatePosition(): void;
441
+ /** Closes the menu and does the necessary cleanup. */
442
+ private _destroyMenu;
443
+ /**
444
+ * This method sets the menu state to open and focuses the first item if
445
+ * the menu was opened via the keyboard.
446
+ */
447
+ private _initMenu;
448
+ /** Updates the menu elevation based on the amount of parent menus that it has. */
449
+ private _setMenuElevation;
450
+ private _setIsMenuOpen;
451
+ /**
452
+ * This method creates the overlay from the provided menu's template and saves its
453
+ * OverlayRef so that it can be attached to the DOM when openMenu is called.
454
+ */
455
+ private _createOverlay;
456
+ /**
457
+ * This method builds the configuration object needed to create the overlay, the OverlayState.
458
+ * @returns OverlayConfig
459
+ */
460
+ private _getOverlayConfig;
461
+ /**
462
+ * Listens to changes in the position of the overlay and sets the correct classes
463
+ * on the menu based on the new position. This ensures the animation origin is always
464
+ * correct, even if a fallback position is used for the overlay.
465
+ */
466
+ private _subscribeToPositions;
467
+ /**
468
+ * Sets the appropriate positions on a position strategy
469
+ * so the overlay connects with the trigger correctly.
470
+ * @param menu Menu panel
471
+ * @param positionStrategy Strategy whose position is to update.
472
+ */
473
+ private _setPosition;
474
+ /** Returns a stream that emits whenever an action that should close the menu occurs. */
475
+ private _menuClosingActions;
476
+ /** Handles mouse presses on the trigger. */
477
+ _handleMousedown(event: MouseEvent): void;
478
+ /** Handles key presses on the trigger. */
479
+ _handleKeydown(event: KeyboardEvent): void;
480
+ /** Handles click events on the trigger. */
481
+ _handleClick(event: MouseEvent): void;
482
+ /** Handles the cases where the user hovers over the trigger. */
483
+ private _handleHover;
484
+ /** Gets the portal that should be attached to the overlay. */
485
+ private _getPortal;
486
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteMenuTrigger, [null, null, null, null, { optional: true; }, { optional: true; self: true; }, { optional: true; }, null, null]>;
487
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteMenuTrigger, "[cuteMenuTriggerFor]", ["cuteMenuTrigger"], { "menu": { "alias": "cuteMenuTriggerFor"; "required": false; }; "menuData": { "alias": "cuteMenuTriggerData"; "required": false; }; "restoreFocus": { "alias": "cuteMenuTriggerRestoreFocus"; "required": false; }; }, { "menuOpened": "menuOpened"; "menuClosed": "menuClosed"; }, never, never, true, never>;
488
+ }
489
+
490
+ declare class CuteMenuModule {
491
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteMenuModule, never>;
492
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CuteMenuModule, never, [typeof i1$1.CommonModule, typeof i1$1.CommonModule, typeof CuteMenu, typeof CuteMenuItem, typeof CuteMenuContent, typeof CuteMenuTrigger], [typeof i1$1.CommonModule, typeof CuteMenu, typeof CuteMenuItem, typeof CuteMenuContent, typeof CuteMenuTrigger]>;
493
+ static ɵinj: i0.ɵɵInjectorDeclaration<CuteMenuModule>;
494
+ }
495
+
496
+ export { CUTE_MENU_CONTENT, CUTE_MENU_DEFAULT_OPTIONS, CUTE_MENU_DEFAULT_OPTIONS_FACTORY, CUTE_MENU_SCROLL_STRATEGY, CUTE_MENU_SCROLL_STRATEGY_FACTORY, CUTE_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER, CuteMenu, CuteMenuContent, CuteMenuItem, CuteMenuModule, CuteMenuTrigger };
497
+ export type { CuteMenuDefaultOptions, MenuCloseReason, MenuPositionX, MenuPositionY, MenuShadowElevation };
@@ -0,0 +1,91 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, QueryList, EventEmitter } from '@angular/core';
3
+ import { CuteLayoutControl } from '@cute-widgets/base/abstract';
4
+ import * as _cute_widgets_base_navbar from '@cute-widgets/base/navbar';
5
+ import * as i1 from '@cute-widgets/base/collapse';
6
+ import { CuteCollapse, CuteCollapseState } from '@cute-widgets/base/collapse';
7
+ import { CuteNav } from '@cute-widgets/base/core/nav';
8
+ import * as i1$1 from '@angular/common';
9
+
10
+ /**
11
+ * Collapsible navbar content.
12
+ */
13
+ declare class CuteNavbarContent extends CuteCollapse {
14
+ private _subscription;
15
+ protected _navbar: _cute_widgets_base_navbar.CuteNavbar;
16
+ protected _breakpointMatches: i0.WritableSignal<boolean>;
17
+ constructor();
18
+ getState(): CuteCollapseState;
19
+ ngOnDestroy(): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteNavbarContent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteNavbarContent, "cute-navbar-content", ["cuteNavbarContent"], {}, {}, never, ["*"], true, never>;
22
+ }
23
+
24
+ /** Navbar's vertical non-static position. */
25
+ type NavbarPosition = "fixed-top" | "fixed-bottom" | "sticky-top" | "sticky-bottom";
26
+ declare const CUTE_NAVBAR: InjectionToken<CuteNavbar>;
27
+ /**
28
+ * Powerful and responsive navigation header in which responsive behavior depends on `CuteCollapse` component.
29
+ * Includes support for branding, navigation, and more.
30
+ */
31
+ declare class CuteNavbar extends CuteLayoutControl {
32
+ navContent: QueryList<CuteNavbarContent> | undefined;
33
+ /** Placement `navbar` in non-static position, if the `position` differs from the default. */
34
+ position: NavbarPosition | undefined;
35
+ /** Event emitted when the navbar's content expansion status changed. */
36
+ expansionChange: EventEmitter<boolean>;
37
+ readonly contentExpanded: i0.Signal<boolean>;
38
+ private _expanded;
39
+ get classBinding(): string;
40
+ constructor();
41
+ protected generateId(): string;
42
+ ngAfterContentInit(): void;
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteNavbar, never>;
44
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteNavbar, "cute-navbar", ["cuteNavbar"], { "position": { "alias": "position"; "required": false; }; }, { "expansionChange": "expansionChange"; }, ["navContent"], ["*"], true, never>;
45
+ }
46
+
47
+ /**
48
+ * Subcomponent for company, product, or project name
49
+ */
50
+ declare class CuteNavbarBrand {
51
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteNavbarBrand, never>;
52
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteNavbarBrand, "[cuteNavbarBrand], [cute-navbar-brand]", ["cuteNavbarBrand"], {}, {}, never, never, true, never>;
53
+ }
54
+
55
+ declare class CuteNavbarNav extends CuteNav {
56
+ /**
57
+ * Enable/disable vertical scrolling within the toggleable contents of a collapsed `navbar`.
58
+ * By default, scrolling kicks in at 75vh (or 75% of the viewport height).
59
+ */
60
+ scrollable: boolean;
61
+ /** The minimum height of the expanded content that triggers the scrolling mode when `scrollable` property is enabled. Default is **75vh**. */
62
+ get scrollHeight(): string | undefined;
63
+ set scrollHeight(value: string | number | undefined);
64
+ private _scrollHeight;
65
+ constructor();
66
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteNavbarNav, never>;
67
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteNavbarNav, "[cuteNavbarNav], [cute-navbar-nav]", ["cuteNavbarNav"], { "scrollable": { "alias": "scrollable"; "required": false; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; }; }, {}, never, never, true, never>;
68
+ static ngAcceptInputType_scrollable: unknown;
69
+ }
70
+
71
+ /**
72
+ * This directive adjusts vertical alignment and horizontal spacing for strings of text.
73
+ */
74
+ declare class CuteNavbarText {
75
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteNavbarText, never>;
76
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteNavbarText, "cute-navbar-text, [cuteNavbarText], [cute-navbar-text]", ["cuteNavbarText"], {}, {}, never, never, true, never>;
77
+ }
78
+
79
+ declare class CuteNavbarToggler {
80
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteNavbarToggler, never>;
81
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteNavbarToggler, "[cuteNavbarToggler], [cute-navbar-toggler]", ["cuteNavbarToggler"], {}, {}, never, never, true, [{ directive: typeof i1.CuteCollapseTrigger; inputs: { "cuteCollapseTriggerFor": "cuteNavbarTogglerFor"; }; outputs: {}; }]>;
82
+ }
83
+
84
+ declare class CuteNavbarModule {
85
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteNavbarModule, never>;
86
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CuteNavbarModule, never, [typeof i1$1.CommonModule, typeof CuteNavbar, typeof CuteNavbarBrand, typeof CuteNavbarContent, typeof CuteNavbarNav, typeof CuteNavbarText, typeof CuteNavbarToggler], [typeof CuteNavbar, typeof CuteNavbarBrand, typeof CuteNavbarContent, typeof CuteNavbarNav, typeof CuteNavbarText, typeof CuteNavbarToggler]>;
87
+ static ɵinj: i0.ɵɵInjectorDeclaration<CuteNavbarModule>;
88
+ }
89
+
90
+ export { CUTE_NAVBAR, CuteNavbar, CuteNavbarBrand, CuteNavbarContent, CuteNavbarModule, CuteNavbarNav, CuteNavbarText, CuteNavbarToggler };
91
+ export type { NavbarPosition };