@nanahoshi/mona-ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/README.md +25 -0
  2. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +590 -0
  3. package/fesm2022/nanahoshi-mona-ui-avatar.mjs +168 -0
  4. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +220 -0
  5. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +225 -0
  6. package/fesm2022/nanahoshi-mona-ui-button.mjs +497 -0
  7. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +1569 -0
  8. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +339 -0
  9. package/fesm2022/nanahoshi-mona-ui-chip.mjs +453 -0
  10. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +200 -0
  11. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +853 -0
  12. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +923 -0
  13. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +495 -0
  14. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +686 -0
  15. package/fesm2022/nanahoshi-mona-ui-common.mjs +642 -0
  16. package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +485 -0
  17. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +132 -0
  18. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +460 -0
  19. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +659 -0
  20. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +828 -0
  21. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +523 -0
  22. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +615 -0
  23. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +701 -0
  24. package/fesm2022/nanahoshi-mona-ui-editor.mjs +1400 -0
  25. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +245 -0
  26. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +170 -0
  27. package/fesm2022/nanahoshi-mona-ui-filter.mjs +680 -0
  28. package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-cell.component-B9SQH5N-.mjs +105 -0
  29. package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DlLwcCFT.mjs +42 -0
  30. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-Dgea-O0X.mjs +130 -0
  31. package/fesm2022/nanahoshi-mona-ui-grid-grid-toggle.component-DIUutx9s.mjs +773 -0
  32. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DRHycGIh.mjs +240 -0
  33. package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C3eZIaJK.mjs +5374 -0
  34. package/fesm2022/nanahoshi-mona-ui-grid.mjs +2 -0
  35. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +87 -0
  36. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +154 -0
  37. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +1356 -0
  38. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2263 -0
  39. package/fesm2022/nanahoshi-mona-ui-internal.mjs +379 -0
  40. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +630 -0
  41. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +527 -0
  42. package/fesm2022/nanahoshi-mona-ui-list.mjs +4 -0
  43. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +966 -0
  44. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +641 -0
  45. package/fesm2022/nanahoshi-mona-ui-notification.mjs +536 -0
  46. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +597 -0
  47. package/fesm2022/nanahoshi-mona-ui-pager.mjs +790 -0
  48. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +83 -0
  49. package/fesm2022/nanahoshi-mona-ui-popover.mjs +325 -0
  50. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +1559 -0
  51. package/fesm2022/nanahoshi-mona-ui-popup.mjs +1321 -0
  52. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +294 -0
  53. package/fesm2022/nanahoshi-mona-ui-query.mjs +175 -0
  54. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +339 -0
  55. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +565 -0
  56. package/fesm2022/nanahoshi-mona-ui-slider.mjs +1049 -0
  57. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +636 -0
  58. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +843 -0
  59. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +537 -0
  60. package/fesm2022/nanahoshi-mona-ui-switch.mjs +308 -0
  61. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +664 -0
  62. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +111 -0
  63. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +369 -0
  64. package/fesm2022/nanahoshi-mona-ui-theme.mjs +314 -0
  65. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +450 -0
  66. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +723 -0
  67. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +716 -0
  68. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +733 -0
  69. package/fesm2022/nanahoshi-mona-ui-window.mjs +1329 -0
  70. package/fesm2022/nanahoshi-mona-ui.mjs +9 -0
  71. package/package.json +289 -0
  72. package/types/nanahoshi-mona-ui-auto-complete.d.ts +223 -0
  73. package/types/nanahoshi-mona-ui-avatar.d.ts +642 -0
  74. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +70 -0
  75. package/types/nanahoshi-mona-ui-button-group.d.ts +77 -0
  76. package/types/nanahoshi-mona-ui-button.d.ts +111 -0
  77. package/types/nanahoshi-mona-ui-calendar.d.ts +262 -0
  78. package/types/nanahoshi-mona-ui-check-box.d.ts +133 -0
  79. package/types/nanahoshi-mona-ui-chip.d.ts +130 -0
  80. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +113 -0
  81. package/types/nanahoshi-mona-ui-color-gradient.d.ts +201 -0
  82. package/types/nanahoshi-mona-ui-color-palette.d.ts +102 -0
  83. package/types/nanahoshi-mona-ui-color-picker.d.ts +156 -0
  84. package/types/nanahoshi-mona-ui-combo-box.d.ts +232 -0
  85. package/types/nanahoshi-mona-ui-common.d.ts +386 -0
  86. package/types/nanahoshi-mona-ui-contextmenu.d.ts +129 -0
  87. package/types/nanahoshi-mona-ui-date-input.d.ts +60 -0
  88. package/types/nanahoshi-mona-ui-date-picker.d.ts +177 -0
  89. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +199 -0
  90. package/types/nanahoshi-mona-ui-dialog.d.ts +261 -0
  91. package/types/nanahoshi-mona-ui-dropdown-button.d.ts +159 -0
  92. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +219 -0
  93. package/types/nanahoshi-mona-ui-dropdowns.d.ts +176 -0
  94. package/types/nanahoshi-mona-ui-editor.d.ts +113 -0
  95. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +87 -0
  96. package/types/nanahoshi-mona-ui-fieldset.d.ts +68 -0
  97. package/types/nanahoshi-mona-ui-filter.d.ts +115 -0
  98. package/types/nanahoshi-mona-ui-grid.d.ts +1114 -0
  99. package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +25 -0
  100. package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +28 -0
  101. package/types/nanahoshi-mona-ui-internal-list.d.ts +269 -0
  102. package/types/nanahoshi-mona-ui-internal-tree.d.ts +391 -0
  103. package/types/nanahoshi-mona-ui-internal.d.ts +136 -0
  104. package/types/nanahoshi-mona-ui-list-box.d.ts +225 -0
  105. package/types/nanahoshi-mona-ui-list-view.d.ts +188 -0
  106. package/types/nanahoshi-mona-ui-list.d.ts +1 -0
  107. package/types/nanahoshi-mona-ui-menubar.d.ts +198 -0
  108. package/types/nanahoshi-mona-ui-multi-select.d.ts +247 -0
  109. package/types/nanahoshi-mona-ui-notification.d.ts +106 -0
  110. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +161 -0
  111. package/types/nanahoshi-mona-ui-pager.d.ts +238 -0
  112. package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -0
  113. package/types/nanahoshi-mona-ui-popover.d.ts +130 -0
  114. package/types/nanahoshi-mona-ui-popup-menu.d.ts +412 -0
  115. package/types/nanahoshi-mona-ui-popup.d.ts +485 -0
  116. package/types/nanahoshi-mona-ui-progress-bar.d.ts +139 -0
  117. package/types/nanahoshi-mona-ui-query.d.ts +89 -0
  118. package/types/nanahoshi-mona-ui-radio-button.d.ts +128 -0
  119. package/types/nanahoshi-mona-ui-scroll-view.d.ts +166 -0
  120. package/types/nanahoshi-mona-ui-slider.d.ts +305 -0
  121. package/types/nanahoshi-mona-ui-split-button.d.ts +182 -0
  122. package/types/nanahoshi-mona-ui-splitter.d.ts +70 -0
  123. package/types/nanahoshi-mona-ui-stepper.d.ts +173 -0
  124. package/types/nanahoshi-mona-ui-switch.d.ts +125 -0
  125. package/types/nanahoshi-mona-ui-tabs.d.ts +158 -0
  126. package/types/nanahoshi-mona-ui-text-area.d.ts +42 -0
  127. package/types/nanahoshi-mona-ui-text-box.d.ts +164 -0
  128. package/types/nanahoshi-mona-ui-theme.d.ts +23 -0
  129. package/types/nanahoshi-mona-ui-time-picker.d.ts +184 -0
  130. package/types/nanahoshi-mona-ui-time-selector.d.ts +143 -0
  131. package/types/nanahoshi-mona-ui-tooltip.d.ts +130 -0
  132. package/types/nanahoshi-mona-ui-tree-view.d.ts +274 -0
  133. package/types/nanahoshi-mona-ui-window.d.ts +295 -0
  134. package/types/nanahoshi-mona-ui.d.ts +2 -0
@@ -0,0 +1,485 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { ComponentRef, TemplateRef, StaticProvider, OnDestroy, AfterViewInit, InjectionToken } from '@angular/core';
3
+ import { OverlayRef, ConnectionPositionPair, FlexibleConnectedPositionStrategyOrigin, ComponentType, ConnectedPosition } from '@angular/cdk/overlay';
4
+ import { Action } from '@nanahoshi/mona-ui/internal';
5
+ import { PreventableEvent } from '@nanahoshi/mona-ui/common';
6
+ import { Observable } from 'rxjs';
7
+
8
+ declare class PopupCloseEvent<R = unknown> extends PreventableEvent {
9
+ #private;
10
+ constructor(options?: Partial<PopupCloseEventOptions<R>>);
11
+ get result(): R | undefined;
12
+ get via(): PopupCloseSource | undefined;
13
+ }
14
+ interface PopupCloseEventOptions<R = unknown, E = unknown> {
15
+ event?: E;
16
+ originalEvent: Event;
17
+ result?: R;
18
+ type?: string;
19
+ via?: PopupCloseSource;
20
+ }
21
+ declare enum PopupCloseSource {
22
+ BackdropClick = "backdropClick",
23
+ CloseButton = "closeButton",
24
+ Escape = "escape",
25
+ MouseLeave = "mouseLeave",
26
+ Programmatic = "programmatic",
27
+ OutsideClick = "outsideClick",
28
+ Scroll = "scroll"
29
+ }
30
+
31
+ interface PopupOffset {
32
+ horizontal?: number;
33
+ vertical?: number;
34
+ }
35
+
36
+ interface PopupRefParams {
37
+ close: <R>(result?: R, delay?: number) => void;
38
+ get beforeClose$(): Observable<PopupCloseEvent>;
39
+ get closeStart$(): Observable<PopupCloseEvent>;
40
+ get closed$(): Observable<PopupCloseEvent>;
41
+ get component(): ComponentRef<unknown> | null;
42
+ get opened$(): Observable<void>;
43
+ get overlayRef(): OverlayRef;
44
+ get positionChanges$(): Observable<ConnectionPositionPair>;
45
+ }
46
+
47
+ declare class PopupRef {
48
+ #private;
49
+ constructor(options: PopupRefParams);
50
+ close<R>(result?: R, delay?: number): void;
51
+ /**
52
+ * Closes the popup after a delay.
53
+ * When the popup is closed, the overlay element is removed from the DOM instantly.
54
+ * This causes the animation of the child elements to not play, therefore,
55
+ * a delay is added to allow the animation to play.
56
+ *
57
+ * @see {@link https://github.com/angular/angular/issues/23302} for more information.
58
+ * @param delay delay in milliseconds
59
+ * @param result optional result to pass to the closed observable
60
+ */
61
+ closeWithDelay<R>(delay?: number, result?: R): void;
62
+ /**
63
+ * @description Emitted when the popup is about to close.
64
+ * This event can be prevented. If it is prevented, the popup will not close.
65
+ */
66
+ get beforeClose(): Observable<PopupCloseEvent>;
67
+ /**
68
+ * @description Emitted when the popup begins closing, before the leave animation completes.
69
+ * Subscribe to this to react at the moment the close sequence starts — for example, to begin
70
+ * coordinating a transition in the consuming component. The `closed` observable fires after
71
+ * the leave animation finishes.
72
+ */
73
+ get closeStart(): Observable<PopupCloseEvent>;
74
+ /**
75
+ * @description Emitted when the popup is closed.
76
+ * This event is emitted after the animation completes.
77
+ * Preventing this event has no effect.
78
+ */
79
+ get closed(): Observable<PopupCloseEvent>;
80
+ /**
81
+ * @description Reference to the component hosted in the popup.
82
+ * This is `null` if the popup does not contain a component.
83
+ */
84
+ get component(): ComponentRef<unknown> | null;
85
+ /**
86
+ * @description Emitted when the popup is opened.
87
+ */
88
+ get opened(): Observable<void>;
89
+ /**
90
+ * @description Reference to the underlying CDK overlay.
91
+ * Use this reference to manipulate the overlay directly, such as to set its size or position.
92
+ * @see {@link https://material.angular.io/cdk/overlay/overview} for more information.
93
+ * @example
94
+ * ```ts
95
+ * const overlayRef = popupRef.overlayRef;
96
+ * overlayRef.updateSize({ width: '500px', height: '300px' });
97
+ * ```
98
+ */
99
+ get overlayRef(): OverlayRef;
100
+ /**
101
+ * @description Returns the position pair of the popup's anchor element.
102
+ * @example
103
+ * ```ts
104
+ * const positionChanges$ = popupRef.positionChanges;
105
+ * positionChanges$.subscribe(pair => {
106
+ * console.log(`Popup position changed to: ${pair.originX} ${pair.originY} -> ${pair.overlayX} ${pair.overlayY}`);
107
+ * });
108
+ * ```
109
+ */
110
+ get positionChanges(): Observable<ConnectionPositionPair>;
111
+ }
112
+
113
+ type ConnectionPoint = "topleft" | "topcenter" | "topright" | "centerleft" | "center" | "centerright" | "bottomleft" | "bottomcenter" | "bottomright";
114
+
115
+ type PopupAnchor = FlexibleConnectedPositionStrategyOrigin | string;
116
+ interface PopupSettings<T = unknown, C = void> {
117
+ /**
118
+ * The anchor element to which the popup will be connected.
119
+ * Can be an element, ElementRef, or CSS selector string.
120
+ * @type {PopupAnchor}
121
+ */
122
+ anchor: PopupAnchor;
123
+ /**
124
+ * The connection point of the anchor element to which the popup will be connected.
125
+ * @type {ConnectionPoint}
126
+ */
127
+ anchorConnectionPoint?: ConnectionPoint | null;
128
+ /**
129
+ * Animation settings for the popup.
130
+ */
131
+ animation?: boolean | PopupAnimationSettings;
132
+ /**
133
+ * Classes to be applied to the backdrop.
134
+ * @type {string | string[]}
135
+ */
136
+ backdropClass?: string | string[];
137
+ /**
138
+ * The content to display in the popup.
139
+ * @type {TemplateRef | ComponentType}
140
+ */
141
+ content: TemplateRef<C> | ComponentType<C>;
142
+ /**
143
+ * Whether the popup will be closed when the user clicks on the backdrop.
144
+ * Only applies if `hasBackdrop` is true.
145
+ * @type {boolean}
146
+ */
147
+ closeOnBackdropClick?: boolean;
148
+ /**
149
+ * Whether the popup will be closed when the user presses the escape key.
150
+ * Default: true.
151
+ * @type {boolean}
152
+ */
153
+ closeOnEscape?: boolean;
154
+ /**
155
+ * Whether the popup will be closed when the mouse leaves the anchor element.
156
+ * Default: false.
157
+ * @type {boolean}
158
+ */
159
+ closeOnMouseLeave?: boolean;
160
+ /**
161
+ * Whether the popup will be closed when the user clicks outside of it.
162
+ * @type {boolean}
163
+ */
164
+ closeOnOutsideClick?: boolean;
165
+ /**
166
+ * Whether the popup will be closed when the user scrolls.
167
+ * Default: false.
168
+ * @type {boolean}
169
+ */
170
+ closeOnScroll?: boolean;
171
+ /**
172
+ * Optional data to pass to the popup context.
173
+ */
174
+ data?: T;
175
+ /**
176
+ * Whether the popup will have a backdrop.
177
+ * Default: true.
178
+ */
179
+ hasBackdrop?: boolean;
180
+ /**
181
+ * Height of the popup.
182
+ * @type {number | string}
183
+ */
184
+ height?: number | string;
185
+ /**
186
+ * Maximum height of the popup.
187
+ * @type {number | string}
188
+ */
189
+ maxHeight?: number | string;
190
+ /**
191
+ * Maximum width of the popup.
192
+ * @type {number | string}
193
+ */
194
+ maxWidth?: number | string;
195
+ /**
196
+ * Minimum height of the popup.
197
+ * @type {number | string}
198
+ */
199
+ minHeight?: number | string;
200
+ /**
201
+ * Minimum width of the popup.
202
+ * @type {number | string}
203
+ */
204
+ minWidth?: number | string;
205
+ /**
206
+ * Offset of the popup.
207
+ * @type {PopupOffset}
208
+ */
209
+ offset?: PopupOffset;
210
+ /**
211
+ * Classes to be applied to the popup.
212
+ * @type {string | string[]}
213
+ */
214
+ popupClass?: string | string[];
215
+ /**
216
+ * The connection point of the popup element to which the anchor will be connected.
217
+ * @type {ConnectionPoint}
218
+ */
219
+ popupConnectionPoint?: ConnectionPoint | null;
220
+ /**
221
+ * Classes to be applied to the popup wrapper content div.
222
+ */
223
+ popupWrapperClass?: string | string[];
224
+ /**
225
+ * The strategy for positioning the popup.
226
+ * `global` means the popup will be positioned relative to the viewport,
227
+ * `connected` means the popup will be positioned relative to the anchor element.
228
+ * @type {"global" | "connected"}
229
+ */
230
+ positionStrategy?: "global" | "connected";
231
+ /**
232
+ * @description The positions to use for the popup.
233
+ * The popup will try to position itself in the first position that fits.
234
+ * This is only used when `positionStrategy` is set to `connected`.
235
+ */
236
+ positions?: Array<ConnectedPosition | ConnectionPositionPair>;
237
+ /**
238
+ * Optional callback invoked when the popup is about to close.
239
+ * Return `true` to cancel the close. Takes priority over `PopupCloseEvent.preventDefault()`.
240
+ * @type {(event: PopupCloseEvent) => boolean}
241
+ */
242
+ preventClose?: Action<PopupCloseEvent, boolean>;
243
+ /**
244
+ * Additional Angular providers made available within the popup's injector.
245
+ * Use this to inject services or values that the popup content component needs.
246
+ * @type {StaticProvider[]}
247
+ */
248
+ providers?: StaticProvider[];
249
+ /**
250
+ * Controls focus restoration behavior when the popup is closed.
251
+ * - true: Always restore focus to anchor
252
+ * - false: Never restore focus (recommended for tooltips)
253
+ * - "auto": Only restore focus if the anchor was focused when the popup opened (smart behavior)
254
+ * Default: "auto".
255
+ * @type {boolean | "auto"}
256
+ */
257
+ restoreFocus?: boolean | "auto";
258
+ /**
259
+ * Width of the popup.
260
+ * @type {number | string}
261
+ */
262
+ width?: number | string;
263
+ /**
264
+ * Whether the CDK overlay should push the popup into the visible viewport when it would
265
+ * otherwise overflow the screen edges.
266
+ * Default: true.
267
+ * @type {boolean}
268
+ */
269
+ withPush?: boolean;
270
+ /**
271
+ * Whether the popup should track scroll events and reposition itself.
272
+ * @type {boolean}
273
+ */
274
+ withScrollTracking?: boolean;
275
+ }
276
+ interface PopupAnimationSettings {
277
+ /**
278
+ * CSS class or classes applied by animate.enter when the popup is shown.
279
+ */
280
+ enter?: string | string[];
281
+ /**
282
+ * CSS class or classes applied by animate.leave when the popup is hidden.
283
+ */
284
+ leave?: string | string[];
285
+ }
286
+
287
+ declare class PopupComponent<T = unknown> implements OnDestroy, AfterViewInit {
288
+ #private;
289
+ protected readonly contentTemplate: _angular_core.Signal<TemplateRef<any>>;
290
+ protected popupRef: PopupRef | null;
291
+ /**
292
+ * @description The anchor element or point for the popup.
293
+ */
294
+ readonly anchor: _angular_core.InputSignal<FlexibleConnectedPositionStrategyOrigin>;
295
+ /**
296
+ * @description The connection point for the popup anchor.
297
+ */
298
+ readonly anchorConnectionPoint: _angular_core.InputSignal<ConnectionPoint>;
299
+ /**
300
+ * @description The animation settings for the popup.
301
+ */
302
+ readonly animation: _angular_core.InputSignal<boolean | PopupAnimationSettings>;
303
+ /**
304
+ * @description The class or classes to apply to the backdrop of the popup.
305
+ */
306
+ readonly backdropClass: _angular_core.InputSignal<string | string[]>;
307
+ /**
308
+ * @description Emits when the popup is closed.
309
+ */
310
+ readonly close: _angular_core.OutputEmitterRef<void>;
311
+ /**
312
+ * @description Whether to close the popup when clicking on the backdrop.
313
+ * Only applies when the popup has a backdrop.
314
+ */
315
+ readonly closeOnBackdropClick: _angular_core.InputSignal<boolean>;
316
+ /**
317
+ * @description Whether to close the popup when the escape key is pressed.
318
+ */
319
+ readonly closeOnEscape: _angular_core.InputSignal<boolean>;
320
+ /**
321
+ * @description Whether to close the popup when the mouse leaves the anchor element.
322
+ */
323
+ readonly closeOnMouseLeave: _angular_core.InputSignal<boolean>;
324
+ /**
325
+ * @description Whether to close the popup when clicking outside of it.
326
+ */
327
+ readonly closeOnOutsideClick: _angular_core.InputSignal<boolean>;
328
+ /**
329
+ * @description Arbitrary data to pass to the popup.
330
+ */
331
+ readonly data: _angular_core.InputSignal<T | undefined>;
332
+ /**
333
+ * @description Whether the popup should have a backdrop.
334
+ */
335
+ readonly hasBackdrop: _angular_core.InputSignal<boolean>;
336
+ /**
337
+ * @description The height of the popup.
338
+ */
339
+ readonly height: _angular_core.InputSignal<string | number | undefined>;
340
+ /**
341
+ * @description The maximum height of the popup.
342
+ */
343
+ readonly maxHeight: _angular_core.InputSignal<string | number | undefined>;
344
+ /**
345
+ * @description The maximum width of the popup.
346
+ */
347
+ readonly maxWidth: _angular_core.InputSignal<string | number | undefined>;
348
+ /**
349
+ * @description The minimum height of the popup.
350
+ */
351
+ readonly minHeight: _angular_core.InputSignal<string | number | undefined>;
352
+ /**
353
+ * @description The minimum width of the popup.
354
+ */
355
+ readonly minWidth: _angular_core.InputSignal<string | number | undefined>;
356
+ /**
357
+ * @description The offset of the popup from the anchor.
358
+ */
359
+ readonly offset: _angular_core.InputSignal<PopupOffset | undefined>;
360
+ /**
361
+ * @description Emits when the popup is opened.
362
+ */
363
+ readonly open: _angular_core.OutputEmitterRef<PopupRef>;
364
+ /**
365
+ * @description The class or classes to apply to the popup.
366
+ */
367
+ readonly popupClass: _angular_core.InputSignal<string | string[]>;
368
+ /**
369
+ * @description The connection point for the popup.
370
+ */
371
+ readonly popupConnectionPoint: _angular_core.InputSignal<ConnectionPoint>;
372
+ /**
373
+ * @description The class or classes to apply to the popup wrapper.
374
+ */
375
+ readonly popupWrapperClass: _angular_core.InputSignal<string | string[]>;
376
+ /**
377
+ * @description The strategy for positioning the popup.
378
+ * `global` means the popup will be positioned relative to the viewport,
379
+ * `connected` means the popup will be positioned relative to the anchor element.
380
+ */
381
+ readonly positionStrategy: _angular_core.InputSignal<"global" | "connected">;
382
+ /**
383
+ * @description The positions to use for the popup.
384
+ * The popup will try to position itself in the first position that fits.
385
+ * This is only used when the `positionStrategy` is set to `connected`.
386
+ */
387
+ readonly positions: _angular_core.InputSignal<(ConnectionPositionPair | ConnectedPosition)[] | undefined>;
388
+ /**
389
+ * @description Called when the popup is requested to close.
390
+ * This can be used to prevent the popup from closing.
391
+ */
392
+ readonly preventClose: _angular_core.InputSignal<Action<PopupCloseEvent<unknown>, boolean> | undefined>;
393
+ /**
394
+ * @description The providers that will be injected into the popup.
395
+ */
396
+ readonly providers: _angular_core.InputSignal<StaticProvider[]>;
397
+ /**
398
+ * @description The trigger event for opening the popup.
399
+ */
400
+ readonly trigger: _angular_core.InputSignal<string>;
401
+ /**
402
+ * @description The width of the popup.
403
+ */
404
+ readonly width: _angular_core.InputSignal<string | number | undefined>;
405
+ /**
406
+ * @description Whether to push the popup into the screen when it is opened.
407
+ */
408
+ readonly withPush: _angular_core.InputSignal<boolean>;
409
+ /**
410
+ * @description Whether to close the popup when the user scrolls within a scrollable container.
411
+ */
412
+ readonly closeOnScroll: _angular_core.InputSignal<boolean>;
413
+ /**
414
+ * @description Controls focus restoration when the popup closes.
415
+ * - `true`: always restore focus to the anchor element.
416
+ * - `false`: never restore focus (recommended for tooltips).
417
+ * - `"auto"`: restore focus only if the anchor was focused when the popup opened.
418
+ */
419
+ readonly restoreFocus: _angular_core.InputSignal<boolean | "auto">;
420
+ /**
421
+ * @description Whether the popup should track scroll events and reposition itself.
422
+ */
423
+ readonly withScrollTracking: _angular_core.InputSignal<boolean>;
424
+ constructor();
425
+ closePopup(): void;
426
+ ngAfterViewInit(): void;
427
+ ngOnDestroy(): void;
428
+ private getPopupWidth;
429
+ private setupEventListeners;
430
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PopupComponent<any>, never>;
431
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PopupComponent<any>, "mona-popup", never, { "anchor": { "alias": "anchor"; "required": true; "isSignal": true; }; "anchorConnectionPoint": { "alias": "anchorConnectionPoint"; "required": false; "isSignal": true; }; "animation": { "alias": "animation"; "required": false; "isSignal": true; }; "backdropClass": { "alias": "backdropClass"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "closeOnMouseLeave": { "alias": "closeOnMouseLeave"; "required": false; "isSignal": true; }; "closeOnOutsideClick": { "alias": "closeOnOutsideClick"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; "popupClass": { "alias": "popupClass"; "required": false; "isSignal": true; }; "popupConnectionPoint": { "alias": "popupConnectionPoint"; "required": false; "isSignal": true; }; "popupWrapperClass": { "alias": "popupWrapperClass"; "required": false; "isSignal": true; }; "positionStrategy": { "alias": "positionStrategy"; "required": false; "isSignal": true; }; "positions": { "alias": "positions"; "required": false; "isSignal": true; }; "preventClose": { "alias": "preventClose"; "required": false; "isSignal": true; }; "providers": { "alias": "providers"; "required": false; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "withPush": { "alias": "withPush"; "required": false; "isSignal": true; }; "closeOnScroll": { "alias": "closeOnScroll"; "required": false; "isSignal": true; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; "isSignal": true; }; "withScrollTracking": { "alias": "withScrollTracking"; "required": false; "isSignal": true; }; }, { "close": "close"; "open": "open"; }, never, ["*"], true, never>;
432
+ }
433
+
434
+ declare class PopupService {
435
+ #private;
436
+ create(settings: PopupSettings): PopupRef;
437
+ private attachContent;
438
+ private buildPanelClass;
439
+ private captureOriginalFocus;
440
+ private cleanupEventDelegation;
441
+ private createInjector;
442
+ private createMultiElementPopup;
443
+ private createOverlay;
444
+ private createPositionStrategy;
445
+ private createScrollDispatcherTarget;
446
+ private createSingleElementPopup;
447
+ private getAnchorElement;
448
+ private getPosition;
449
+ private getScrollableAncestorElements;
450
+ private getScrollableContainers;
451
+ private isScrollableElement;
452
+ private isScrollableOverflow;
453
+ private handleFocusRestoration;
454
+ /**
455
+ * Resolves a PopupAnchor to a FlexibleConnectedPositionStrategyOrigin.
456
+ * This method should only receive actual elements or ElementRefs, not CSS selector strings.
457
+ * CSS selectors are handled by the multi-element popup creation path.
458
+ * @param anchor The anchor to resolve (should be Element or ElementRef)
459
+ * @returns The resolved anchor
460
+ */
461
+ private resolveAnchor;
462
+ private restoreFocusToAnchor;
463
+ private setupBackdropCloseSubscription;
464
+ private setupCleanupSubscription;
465
+ private setupCloseSubscriptions;
466
+ private setupEscapeKeyListener;
467
+ private setupInternalEventDelegation;
468
+ private setupMouseLeaveSubscription;
469
+ private setupOutsideClickSubscription;
470
+ private setupPositionChangeTracking;
471
+ private setupScrollClosing;
472
+ private setupScrollTracking;
473
+ private shouldIgnoreOutsideClick;
474
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PopupService, never>;
475
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<PopupService>;
476
+ }
477
+
478
+ declare const defaultPopupAnimation: Required<PopupAnimationSettings>;
479
+ declare const dropdownPopupAnimation: Required<PopupAnimationSettings>;
480
+ declare const fadePopupAnimation: Required<PopupAnimationSettings>;
481
+
482
+ declare const PopupDataInjectionToken: InjectionToken<unknown>;
483
+
484
+ export { PopupCloseEvent, PopupCloseSource, PopupComponent, PopupDataInjectionToken, PopupRef, PopupService, defaultPopupAnimation, dropdownPopupAnimation, fadePopupAnimation };
485
+ export type { ConnectionPoint, PopupAnchor, PopupAnimationSettings, PopupOffset, PopupSettings };
@@ -0,0 +1,139 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { TemplateRef } from '@angular/core';
3
+ import { VariantInputs, Action } from '@nanahoshi/mona-ui/internal';
4
+ import * as class_variance_authority_types from 'class-variance-authority/types';
5
+ import { VariantProps } from 'class-variance-authority';
6
+ import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
7
+
8
+ interface LabelTemplateContext {
9
+ $implicit: number;
10
+ max: number;
11
+ min: number;
12
+ percent: number;
13
+ }
14
+
15
+ declare class ProgressBarLabelTemplateDirective {
16
+ readonly templateRef: TemplateRef<LabelTemplateContext>;
17
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProgressBarLabelTemplateDirective, never>;
18
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ProgressBarLabelTemplateDirective, "ng-template[monaProgressBarLabelTemplate]", never, {}, {}, never, never, true, never>;
19
+ }
20
+
21
+ type LabelPosition = "start" | "center" | "end";
22
+
23
+ declare const progressBarBaseThemeVariants: (theme: ThemeStyle) => (props?: ({
24
+ rounded?: "full" | "large" | "medium" | "none" | "small" | null | undefined;
25
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
26
+ declare const progressBarIndeterminateThemeVariants: (theme: ThemeStyle) => (props?: class_variance_authority_types.ClassProp | undefined) => string;
27
+ declare const progressBarLabelThemeVariants: (theme: ThemeStyle) => (props?: class_variance_authority_types.ClassProp | undefined) => string;
28
+ declare const progressBarTrackThemeVariants: (theme: ThemeStyle) => (props?: ({
29
+ rounded?: "full" | "large" | "medium" | "none" | "small" | null | undefined;
30
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
31
+ type ProgressBarBaseVariantProps = VariantProps<ReturnType<typeof progressBarBaseThemeVariants>>;
32
+ type ProgressBarBaseVariantInput = VariantInputs<ProgressBarBaseVariantProps>;
33
+ type ProgressBarIndeterminateVariantProps = VariantProps<ReturnType<typeof progressBarIndeterminateThemeVariants>>;
34
+ type ProgressBarIndeterminateVariantInput = VariantInputs<ProgressBarIndeterminateVariantProps>;
35
+ type ProgressBarLabelVariantProps = VariantProps<ReturnType<typeof progressBarLabelThemeVariants>>;
36
+ type ProgressBarLabelVariantInput = VariantInputs<ProgressBarLabelVariantProps>;
37
+ type ProgressBarTrackVariantProps = VariantProps<ReturnType<typeof progressBarTrackThemeVariants>>;
38
+ type ProgressBarTrackVariantInput = VariantInputs<ProgressBarTrackVariantProps>;
39
+ type ProgressBarVariantInput = ProgressBarBaseVariantInput & ProgressBarIndeterminateVariantInput & ProgressBarTrackVariantInput & ProgressBarLabelVariantInput;
40
+
41
+ declare class ProgressBarComponent implements ProgressBarVariantInput {
42
+ #private;
43
+ protected readonly baseClasses: _angular_core.Signal<string>;
44
+ protected readonly indeterminateClasses: _angular_core.Signal<string>;
45
+ protected readonly labelClasses: _angular_core.Signal<string>;
46
+ protected readonly labelTemplate: _angular_core.Signal<ProgressBarLabelTemplateDirective | undefined>;
47
+ protected readonly nextTrackClipPath: _angular_core.Signal<string>;
48
+ protected readonly prevTrackClipPath: _angular_core.Signal<string>;
49
+ protected readonly progress: _angular_core.Signal<number>;
50
+ protected readonly trackClasses: _angular_core.Signal<string>;
51
+ protected readonly trackColor: _angular_core.Signal<string>;
52
+ /**
53
+ * @description Accessible label for the progress bar host element.
54
+ * Use to describe what is being measured (e.g., "Upload progress").
55
+ * When empty, assistive technology announces the role and numeric values only.
56
+ * @default ""
57
+ */
58
+ readonly ariaLabel: _angular_core.InputSignal<string>;
59
+ /**
60
+ * @description Overrides the numeric aria-valuenow announcement for assistive technology.
61
+ * Particularly useful in indeterminate mode — set to a localized string such as "Loading"
62
+ * so screen readers announce state rather than silence.
63
+ * When empty, assistive technology falls back to the numeric value.
64
+ * @default ""
65
+ */
66
+ readonly ariaValueText: _angular_core.InputSignal<string>;
67
+ /**
68
+ * @description Enables CSS transitions on fill and color changes.
69
+ * Set to `false` when updating `value` at high frequency (e.g., a real-time byte counter).
70
+ * @default true
71
+ */
72
+ readonly animate: _angular_core.InputSignal<boolean>;
73
+ /**
74
+ * @description Fill color of the progress track.
75
+ * Pass a CSS color string, or a function that receives the current percentage (0–100) and returns a color string.
76
+ * When empty, falls back to the primary theme color.
77
+ * @default ""
78
+ */
79
+ readonly color: _angular_core.InputSignal<string | Action<number, string>>;
80
+ /**
81
+ * @description Renders the bar with reduced visual emphasis and removes pointer interaction.
82
+ * @default false
83
+ */
84
+ readonly disabled: _angular_core.InputSignal<boolean>;
85
+ /**
86
+ * @description Switches to indeterminate mode: plays a looping animation and hides the label.
87
+ * ARIA value attributes are removed and `aria-busy` is set on the host element.
88
+ * @default false
89
+ */
90
+ readonly indeterminate: _angular_core.InputSignal<boolean>;
91
+ /**
92
+ * @description Horizontal alignment of the label within the bar.
93
+ * @default center
94
+ */
95
+ readonly labelPosition: _angular_core.InputSignal<LabelPosition>;
96
+ /**
97
+ * @description Inline styles applied to the default label span.
98
+ * Has no effect when a custom `monaProgressBarLabelTemplate` is provided.
99
+ * @default {}
100
+ */
101
+ readonly labelStyles: _angular_core.InputSignal<Partial<CSSStyleDeclaration>>;
102
+ /**
103
+ * @description Controls label visibility in determinate mode.
104
+ * Has no effect in indeterminate mode — the label is always hidden there.
105
+ * @default true
106
+ */
107
+ readonly labelVisible: _angular_core.InputSignal<boolean>;
108
+ /**
109
+ * @description Upper bound of the value range. Must be greater than `min`.
110
+ * @default 100
111
+ */
112
+ readonly max: _angular_core.InputSignal<number>;
113
+ /**
114
+ * @description Lower bound of the value range.
115
+ * @default 0
116
+ */
117
+ readonly min: _angular_core.InputSignal<number>;
118
+ /**
119
+ * @description Border-radius preset applied to the bar.
120
+ * @default medium
121
+ */
122
+ readonly rounded: _angular_core.InputSignal<"full" | "large" | "medium" | "none" | "small" | null | undefined>;
123
+ /**
124
+ * @description Additional CSS classes merged onto the host element via `tailwind-merge`.
125
+ * @default ""
126
+ */
127
+ readonly userClass: _angular_core.InputSignal<string>;
128
+ /**
129
+ * @description Current progress value within `[min, max]`.
130
+ * Values outside the range are clamped before rendering; non-finite values are treated as `0`.
131
+ * @default 0
132
+ */
133
+ readonly value: _angular_core.InputSignal<number>;
134
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProgressBarComponent, never>;
135
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ProgressBarComponent, "mona-progress-bar", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaValueText": { "alias": "aria-valuetext"; "required": false; "isSignal": true; }; "animate": { "alias": "animate"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "labelStyles": { "alias": "labelStyles"; "required": false; "isSignal": true; }; "labelVisible": { "alias": "labelVisible"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, ["labelTemplate"], never, true, never>;
136
+ }
137
+
138
+ export { ProgressBarComponent, ProgressBarLabelTemplateDirective };
139
+ export type { LabelPosition, LabelTemplateContext };