@raintonic/formaui 0.2.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.
- package/CHANGELOG.md +7 -0
- package/README.md +145 -0
- package/fesm2022/raintonic-formaui-cdk-drag-drop.mjs +806 -0
- package/fesm2022/raintonic-formaui-cdk-drag-drop.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-cdk-form-field.mjs +86 -0
- package/fesm2022/raintonic-formaui-cdk-form-field.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-cdk-overlay.mjs +1757 -0
- package/fesm2022/raintonic-formaui-cdk-overlay.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-cdk-virtual-scroll.mjs +287 -0
- package/fesm2022/raintonic-formaui-cdk-virtual-scroll.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-accordion.mjs +217 -0
- package/fesm2022/raintonic-formaui-components-accordion.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-alert.mjs +161 -0
- package/fesm2022/raintonic-formaui-components-alert.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-autocomplete.mjs +726 -0
- package/fesm2022/raintonic-formaui-components-autocomplete.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-avatar.mjs +92 -0
- package/fesm2022/raintonic-formaui-components-avatar.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-badge.mjs +107 -0
- package/fesm2022/raintonic-formaui-components-badge.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-big-menu.mjs +68 -0
- package/fesm2022/raintonic-formaui-components-big-menu.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-breadcrumb.mjs +55 -0
- package/fesm2022/raintonic-formaui-components-breadcrumb.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-button-group.mjs +103 -0
- package/fesm2022/raintonic-formaui-components-button-group.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-button.mjs +241 -0
- package/fesm2022/raintonic-formaui-components-button.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-card.mjs +270 -0
- package/fesm2022/raintonic-formaui-components-card.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-checkbox.mjs +295 -0
- package/fesm2022/raintonic-formaui-components-checkbox.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-data-table.mjs +631 -0
- package/fesm2022/raintonic-formaui-components-data-table.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-date-picker.mjs +1331 -0
- package/fesm2022/raintonic-formaui-components-date-picker.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-divider.mjs +41 -0
- package/fesm2022/raintonic-formaui-components-divider.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-drawer.mjs +190 -0
- package/fesm2022/raintonic-formaui-components-drawer.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-dynamic-form.mjs +266 -0
- package/fesm2022/raintonic-formaui-components-dynamic-form.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-empty-state.mjs +33 -0
- package/fesm2022/raintonic-formaui-components-empty-state.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-file-upload.mjs +246 -0
- package/fesm2022/raintonic-formaui-components-file-upload.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-form-field.mjs +482 -0
- package/fesm2022/raintonic-formaui-components-form-field.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-icon.mjs +117 -0
- package/fesm2022/raintonic-formaui-components-icon.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-input.mjs +327 -0
- package/fesm2022/raintonic-formaui-components-input.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-list.mjs +149 -0
- package/fesm2022/raintonic-formaui-components-list.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-menu.mjs +896 -0
- package/fesm2022/raintonic-formaui-components-menu.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-number-input.mjs +345 -0
- package/fesm2022/raintonic-formaui-components-number-input.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-paginator.mjs +139 -0
- package/fesm2022/raintonic-formaui-components-paginator.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-password-input.mjs +306 -0
- package/fesm2022/raintonic-formaui-components-password-input.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-popover.mjs +451 -0
- package/fesm2022/raintonic-formaui-components-popover.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-progressbar.mjs +148 -0
- package/fesm2022/raintonic-formaui-components-progressbar.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-radio.mjs +260 -0
- package/fesm2022/raintonic-formaui-components-radio.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-select.mjs +1011 -0
- package/fesm2022/raintonic-formaui-components-select.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-side-panel.mjs +150 -0
- package/fesm2022/raintonic-formaui-components-side-panel.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-sidebar.mjs +257 -0
- package/fesm2022/raintonic-formaui-components-sidebar.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-skeleton.mjs +50 -0
- package/fesm2022/raintonic-formaui-components-skeleton.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-slider.mjs +347 -0
- package/fesm2022/raintonic-formaui-components-slider.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-spinner.mjs +63 -0
- package/fesm2022/raintonic-formaui-components-spinner.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-stepper.mjs +317 -0
- package/fesm2022/raintonic-formaui-components-stepper.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tab.mjs +197 -0
- package/fesm2022/raintonic-formaui-components-tab.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tag.mjs +78 -0
- package/fesm2022/raintonic-formaui-components-tag.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-time-picker.mjs +644 -0
- package/fesm2022/raintonic-formaui-components-time-picker.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-toggle.mjs +171 -0
- package/fesm2022/raintonic-formaui-components-toggle.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-toolbar.mjs +140 -0
- package/fesm2022/raintonic-formaui-components-toolbar.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tooltip.mjs +555 -0
- package/fesm2022/raintonic-formaui-components-tooltip.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tree-select.mjs +314 -0
- package/fesm2022/raintonic-formaui-components-tree-select.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tree-table.mjs +103 -0
- package/fesm2022/raintonic-formaui-components-tree-table.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tree.mjs +430 -0
- package/fesm2022/raintonic-formaui-components-tree.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-core.mjs +62 -0
- package/fesm2022/raintonic-formaui-core.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-services-dialog.mjs +798 -0
- package/fesm2022/raintonic-formaui-services-dialog.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-services-notification.mjs +391 -0
- package/fesm2022/raintonic-formaui-services-notification.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-services-theme.mjs +248 -0
- package/fesm2022/raintonic-formaui-services-theme.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-test-utils.mjs +66 -0
- package/fesm2022/raintonic-formaui-test-utils.mjs.map +1 -0
- package/fesm2022/raintonic-formaui.mjs +15 -0
- package/fesm2022/raintonic-formaui.mjs.map +1 -0
- package/llms-full.txt +1627 -0
- package/llms.txt +60 -0
- package/package.json +251 -0
- package/styles/_fonts-entry.scss +3 -0
- package/styles/fonts/dm-mono-400-latin.woff2 +0 -0
- package/styles/fonts/inter-tight-latin-italic.woff2 +0 -0
- package/styles/fonts/inter-tight-latin.woff2 +0 -0
- package/styles/index.scss +127 -0
- package/styles/partials/_constants.scss +29 -0
- package/styles/partials/_fonts.scss +36 -0
- package/styles/partials/_grid.scss +171 -0
- package/styles/partials/_mixins.scss +145 -0
- package/styles/partials/_motion.scss +252 -0
- package/styles/partials/_theme.scss +275 -0
- package/styles/partials/_typography.scss +112 -0
- package/styles/partials/_utilities.scss +480 -0
- package/styles/partials/themes/_dark.scss +254 -0
- package/styles/partials/themes/_light.scss +254 -0
- package/types/raintonic-formaui-cdk-drag-drop.d.ts +196 -0
- package/types/raintonic-formaui-cdk-drag-drop.d.ts.map +1 -0
- package/types/raintonic-formaui-cdk-form-field.d.ts +62 -0
- package/types/raintonic-formaui-cdk-form-field.d.ts.map +1 -0
- package/types/raintonic-formaui-cdk-overlay.d.ts +843 -0
- package/types/raintonic-formaui-cdk-overlay.d.ts.map +1 -0
- package/types/raintonic-formaui-cdk-virtual-scroll.d.ts +112 -0
- package/types/raintonic-formaui-cdk-virtual-scroll.d.ts.map +1 -0
- package/types/raintonic-formaui-components-accordion.d.ts +124 -0
- package/types/raintonic-formaui-components-accordion.d.ts.map +1 -0
- package/types/raintonic-formaui-components-alert.d.ts +143 -0
- package/types/raintonic-formaui-components-alert.d.ts.map +1 -0
- package/types/raintonic-formaui-components-autocomplete.d.ts +193 -0
- package/types/raintonic-formaui-components-autocomplete.d.ts.map +1 -0
- package/types/raintonic-formaui-components-avatar.d.ts +52 -0
- package/types/raintonic-formaui-components-avatar.d.ts.map +1 -0
- package/types/raintonic-formaui-components-badge.d.ts +47 -0
- package/types/raintonic-formaui-components-badge.d.ts.map +1 -0
- package/types/raintonic-formaui-components-big-menu.d.ts +62 -0
- package/types/raintonic-formaui-components-big-menu.d.ts.map +1 -0
- package/types/raintonic-formaui-components-breadcrumb.d.ts +26 -0
- package/types/raintonic-formaui-components-breadcrumb.d.ts.map +1 -0
- package/types/raintonic-formaui-components-button-group.d.ts +61 -0
- package/types/raintonic-formaui-components-button-group.d.ts.map +1 -0
- package/types/raintonic-formaui-components-button.d.ts +116 -0
- package/types/raintonic-formaui-components-button.d.ts.map +1 -0
- package/types/raintonic-formaui-components-card.d.ts +191 -0
- package/types/raintonic-formaui-components-card.d.ts.map +1 -0
- package/types/raintonic-formaui-components-checkbox.d.ts +132 -0
- package/types/raintonic-formaui-components-checkbox.d.ts.map +1 -0
- package/types/raintonic-formaui-components-data-table.d.ts +368 -0
- package/types/raintonic-formaui-components-data-table.d.ts.map +1 -0
- package/types/raintonic-formaui-components-date-picker.d.ts +341 -0
- package/types/raintonic-formaui-components-date-picker.d.ts.map +1 -0
- package/types/raintonic-formaui-components-divider.d.ts +21 -0
- package/types/raintonic-formaui-components-divider.d.ts.map +1 -0
- package/types/raintonic-formaui-components-drawer.d.ts +48 -0
- package/types/raintonic-formaui-components-drawer.d.ts.map +1 -0
- package/types/raintonic-formaui-components-dynamic-form.d.ts +412 -0
- package/types/raintonic-formaui-components-dynamic-form.d.ts.map +1 -0
- package/types/raintonic-formaui-components-empty-state.d.ts +14 -0
- package/types/raintonic-formaui-components-empty-state.d.ts.map +1 -0
- package/types/raintonic-formaui-components-file-upload.d.ts +77 -0
- package/types/raintonic-formaui-components-file-upload.d.ts.map +1 -0
- package/types/raintonic-formaui-components-form-field.d.ts +271 -0
- package/types/raintonic-formaui-components-form-field.d.ts.map +1 -0
- package/types/raintonic-formaui-components-icon.d.ts +61 -0
- package/types/raintonic-formaui-components-icon.d.ts.map +1 -0
- package/types/raintonic-formaui-components-input.d.ts +149 -0
- package/types/raintonic-formaui-components-input.d.ts.map +1 -0
- package/types/raintonic-formaui-components-list.d.ts +48 -0
- package/types/raintonic-formaui-components-list.d.ts.map +1 -0
- package/types/raintonic-formaui-components-menu.d.ts +403 -0
- package/types/raintonic-formaui-components-menu.d.ts.map +1 -0
- package/types/raintonic-formaui-components-number-input.d.ts +127 -0
- package/types/raintonic-formaui-components-number-input.d.ts.map +1 -0
- package/types/raintonic-formaui-components-paginator.d.ts +37 -0
- package/types/raintonic-formaui-components-paginator.d.ts.map +1 -0
- package/types/raintonic-formaui-components-password-input.d.ts +111 -0
- package/types/raintonic-formaui-components-password-input.d.ts.map +1 -0
- package/types/raintonic-formaui-components-popover.d.ts +131 -0
- package/types/raintonic-formaui-components-popover.d.ts.map +1 -0
- package/types/raintonic-formaui-components-progressbar.d.ts +111 -0
- package/types/raintonic-formaui-components-progressbar.d.ts.map +1 -0
- package/types/raintonic-formaui-components-radio.d.ts +95 -0
- package/types/raintonic-formaui-components-radio.d.ts.map +1 -0
- package/types/raintonic-formaui-components-select.d.ts +307 -0
- package/types/raintonic-formaui-components-select.d.ts.map +1 -0
- package/types/raintonic-formaui-components-side-panel.d.ts +51 -0
- package/types/raintonic-formaui-components-side-panel.d.ts.map +1 -0
- package/types/raintonic-formaui-components-sidebar.d.ts +174 -0
- package/types/raintonic-formaui-components-sidebar.d.ts.map +1 -0
- package/types/raintonic-formaui-components-skeleton.d.ts +20 -0
- package/types/raintonic-formaui-components-skeleton.d.ts.map +1 -0
- package/types/raintonic-formaui-components-slider.d.ts +108 -0
- package/types/raintonic-formaui-components-slider.d.ts.map +1 -0
- package/types/raintonic-formaui-components-spinner.d.ts +42 -0
- package/types/raintonic-formaui-components-spinner.d.ts.map +1 -0
- package/types/raintonic-formaui-components-stepper.d.ts +126 -0
- package/types/raintonic-formaui-components-stepper.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tab.d.ts +96 -0
- package/types/raintonic-formaui-components-tab.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tag.d.ts +34 -0
- package/types/raintonic-formaui-components-tag.d.ts.map +1 -0
- package/types/raintonic-formaui-components-time-picker.d.ts +172 -0
- package/types/raintonic-formaui-components-time-picker.d.ts.map +1 -0
- package/types/raintonic-formaui-components-toggle.d.ts +70 -0
- package/types/raintonic-formaui-components-toggle.d.ts.map +1 -0
- package/types/raintonic-formaui-components-toolbar.d.ts +128 -0
- package/types/raintonic-formaui-components-toolbar.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tooltip.d.ts +268 -0
- package/types/raintonic-formaui-components-tooltip.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tree-select.d.ts +80 -0
- package/types/raintonic-formaui-components-tree-select.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tree-table.d.ts +90 -0
- package/types/raintonic-formaui-components-tree-table.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tree.d.ts +104 -0
- package/types/raintonic-formaui-components-tree.d.ts.map +1 -0
- package/types/raintonic-formaui-core.d.ts +115 -0
- package/types/raintonic-formaui-core.d.ts.map +1 -0
- package/types/raintonic-formaui-services-dialog.d.ts +451 -0
- package/types/raintonic-formaui-services-dialog.d.ts.map +1 -0
- package/types/raintonic-formaui-services-notification.d.ts +221 -0
- package/types/raintonic-formaui-services-notification.d.ts.map +1 -0
- package/types/raintonic-formaui-services-theme.d.ts +126 -0
- package/types/raintonic-formaui-services-theme.d.ts.map +1 -0
- package/types/raintonic-formaui-test-utils.d.ts +24 -0
- package/types/raintonic-formaui-test-utils.d.ts.map +1 -0
- package/types/raintonic-formaui.d.ts +4 -0
- package/types/raintonic-formaui.d.ts.map +1 -0
|
@@ -0,0 +1,843 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, ComponentRef, TemplateRef, Injector, ElementRef, Renderer2, OnInit, OnDestroy } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Injection token for the overlay container element
|
|
7
|
+
*/
|
|
8
|
+
declare const FUI_OVERLAY_CONTAINER: InjectionToken<HTMLElement>;
|
|
9
|
+
/**
|
|
10
|
+
* Injection token for the overlay scroll strategy
|
|
11
|
+
*/
|
|
12
|
+
declare const FUI_OVERLAY_SCROLL_STRATEGY: InjectionToken<() => FuiScrollStrategy>;
|
|
13
|
+
/**
|
|
14
|
+
* Available overlay positions for connected positioning
|
|
15
|
+
*/
|
|
16
|
+
interface FuiConnectedPosition {
|
|
17
|
+
/** Horizontal alignment of the overlay relative to the origin */
|
|
18
|
+
originX: 'start' | 'center' | 'end';
|
|
19
|
+
/** Vertical alignment of the overlay relative to the origin */
|
|
20
|
+
originY: 'top' | 'center' | 'bottom';
|
|
21
|
+
/** Horizontal alignment of the overlay panel */
|
|
22
|
+
overlayX: 'start' | 'center' | 'end';
|
|
23
|
+
/** Vertical alignment of the overlay panel */
|
|
24
|
+
overlayY: 'top' | 'center' | 'bottom';
|
|
25
|
+
/** Offset in pixels along the x-axis */
|
|
26
|
+
offsetX?: number;
|
|
27
|
+
/** Offset in pixels along the y-axis */
|
|
28
|
+
offsetY?: number;
|
|
29
|
+
/** Weight for this position when multiple positions are provided */
|
|
30
|
+
weight?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Global position configuration
|
|
34
|
+
*/
|
|
35
|
+
interface FuiGlobalPosition {
|
|
36
|
+
/** Top position in pixels or CSS value */
|
|
37
|
+
top?: string | number;
|
|
38
|
+
/** Bottom position in pixels or CSS value */
|
|
39
|
+
bottom?: string | number;
|
|
40
|
+
/** Left position in pixels or CSS value */
|
|
41
|
+
left?: string | number;
|
|
42
|
+
/** Right position in pixels or CSS value */
|
|
43
|
+
right?: string | number;
|
|
44
|
+
/** Width in pixels or CSS value */
|
|
45
|
+
width?: string | number;
|
|
46
|
+
/** Height in pixels or CSS value */
|
|
47
|
+
height?: string | number;
|
|
48
|
+
/** Min width in pixels or CSS value */
|
|
49
|
+
minWidth?: string | number;
|
|
50
|
+
/** Min height in pixels or CSS value */
|
|
51
|
+
minHeight?: string | number;
|
|
52
|
+
/** Max width in pixels or CSS value */
|
|
53
|
+
maxWidth?: string | number;
|
|
54
|
+
/** Max height in pixels or CSS value */
|
|
55
|
+
maxHeight?: string | number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Scroll strategy types
|
|
59
|
+
*/
|
|
60
|
+
type FuiScrollStrategyType = 'reposition' | 'close' | 'block' | 'noop';
|
|
61
|
+
/**
|
|
62
|
+
* Backdrop click behavior
|
|
63
|
+
*/
|
|
64
|
+
type FuiBackdropClickBehavior = 'close' | 'ignore';
|
|
65
|
+
/**
|
|
66
|
+
* Configuration for creating an overlay
|
|
67
|
+
*/
|
|
68
|
+
interface FuiOverlayConfig {
|
|
69
|
+
/** Position strategy for the overlay */
|
|
70
|
+
positionStrategy?: FuiPositionStrategy;
|
|
71
|
+
/** Scroll strategy for the overlay */
|
|
72
|
+
scrollStrategy?: FuiScrollStrategy;
|
|
73
|
+
/** Whether to show a backdrop */
|
|
74
|
+
hasBackdrop?: boolean;
|
|
75
|
+
/** CSS class(es) to apply to the backdrop */
|
|
76
|
+
backdropClass?: string | string[];
|
|
77
|
+
/** Behavior when backdrop is clicked */
|
|
78
|
+
backdropClickBehavior?: FuiBackdropClickBehavior;
|
|
79
|
+
/** CSS class(es) to apply to the overlay pane */
|
|
80
|
+
panelClass?: string | string[];
|
|
81
|
+
/** Width of the overlay */
|
|
82
|
+
width?: string | number;
|
|
83
|
+
/** Height of the overlay */
|
|
84
|
+
height?: string | number;
|
|
85
|
+
/** Min width of the overlay */
|
|
86
|
+
minWidth?: string | number;
|
|
87
|
+
/** Min height of the overlay */
|
|
88
|
+
minHeight?: string | number;
|
|
89
|
+
/** Max width of the overlay */
|
|
90
|
+
maxWidth?: string | number;
|
|
91
|
+
/** Max height of the overlay */
|
|
92
|
+
maxHeight?: string | number;
|
|
93
|
+
/** Direction of the overlay content */
|
|
94
|
+
direction?: 'ltr' | 'rtl';
|
|
95
|
+
/** Whether to dispose the overlay when the backdrop is clicked */
|
|
96
|
+
disposeOnNavigation?: boolean;
|
|
97
|
+
/** Custom injector for the overlay content */
|
|
98
|
+
injector?: Injector;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Reference to an overlay instance
|
|
102
|
+
*/
|
|
103
|
+
interface FuiOverlayRef {
|
|
104
|
+
/** Unique identifier for this overlay */
|
|
105
|
+
readonly id: string;
|
|
106
|
+
/** The overlay pane element */
|
|
107
|
+
readonly overlayElement: HTMLElement;
|
|
108
|
+
/** The backdrop element (if any) */
|
|
109
|
+
readonly backdropElement: HTMLElement | null;
|
|
110
|
+
/** Observable that emits when the backdrop is clicked */
|
|
111
|
+
readonly backdropClick: Observable<MouseEvent>;
|
|
112
|
+
/** Observable that emits when a key is pressed while the overlay has focus */
|
|
113
|
+
readonly keydownEvents: Observable<KeyboardEvent>;
|
|
114
|
+
/** Observable that emits when the overlay is attached to the DOM */
|
|
115
|
+
readonly attachments: Observable<void>;
|
|
116
|
+
/** Observable that emits when the overlay is detached from the DOM */
|
|
117
|
+
readonly detachments: Observable<void>;
|
|
118
|
+
/** Whether the overlay is currently attached */
|
|
119
|
+
readonly hasAttached: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Attaches content to the overlay
|
|
122
|
+
* @param content The content to attach (component, template, or DOM element)
|
|
123
|
+
* @param injector Optional injector for component content
|
|
124
|
+
*/
|
|
125
|
+
attach<T = unknown>(content: ComponentRef<T> | TemplateRef<unknown> | HTMLElement, injector?: Injector): ComponentRef<T> | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* Detaches the content from the overlay
|
|
128
|
+
*/
|
|
129
|
+
detach(): void;
|
|
130
|
+
/**
|
|
131
|
+
* Disposes the overlay and cleans up resources
|
|
132
|
+
*/
|
|
133
|
+
dispose(): void;
|
|
134
|
+
/**
|
|
135
|
+
* Updates the position of the overlay
|
|
136
|
+
*/
|
|
137
|
+
updatePosition(): void;
|
|
138
|
+
/**
|
|
139
|
+
* Updates the size of the overlay
|
|
140
|
+
*/
|
|
141
|
+
updateSize(config?: Pick<FuiOverlayConfig, 'width' | 'height' | 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight'>): void;
|
|
142
|
+
/**
|
|
143
|
+
* Adds CSS classes to the overlay pane
|
|
144
|
+
*/
|
|
145
|
+
addPanelClass(classes: string | string[]): void;
|
|
146
|
+
/**
|
|
147
|
+
* Removes CSS classes from the overlay pane
|
|
148
|
+
*/
|
|
149
|
+
removePanelClass(classes: string | string[]): void;
|
|
150
|
+
/**
|
|
151
|
+
* Gets the current configuration of the overlay
|
|
152
|
+
*/
|
|
153
|
+
getConfig(): FuiOverlayConfig;
|
|
154
|
+
/**
|
|
155
|
+
* Updates the configuration of the overlay
|
|
156
|
+
*/
|
|
157
|
+
updateConfig(config: Partial<FuiOverlayConfig>): void;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Strategy for positioning overlays
|
|
161
|
+
*/
|
|
162
|
+
interface FuiPositionStrategy {
|
|
163
|
+
/** Applies the positioning strategy */
|
|
164
|
+
apply(): void;
|
|
165
|
+
/** Disposes the strategy and cleans up resources */
|
|
166
|
+
dispose(): void;
|
|
167
|
+
/** Detaches the strategy from the overlay */
|
|
168
|
+
detach(): void;
|
|
169
|
+
/** Sets the overlay element reference */
|
|
170
|
+
setOverlayElement(element: HTMLElement): void;
|
|
171
|
+
/** Observable that emits when the position changes */
|
|
172
|
+
readonly positionChanges: Observable<FuiConnectedOverlayPositionChange>;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Strategy for handling scroll events
|
|
176
|
+
*/
|
|
177
|
+
interface FuiScrollStrategy {
|
|
178
|
+
/** Enables the scroll strategy */
|
|
179
|
+
enable(): void;
|
|
180
|
+
/** Disables the scroll strategy */
|
|
181
|
+
disable(): void;
|
|
182
|
+
/** Attaches the strategy to an overlay reference */
|
|
183
|
+
attach(overlayRef: FuiOverlayRef): void;
|
|
184
|
+
/** Detaches the strategy from the overlay reference */
|
|
185
|
+
detach(): void;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Position change event for connected overlays
|
|
189
|
+
*/
|
|
190
|
+
interface FuiConnectedOverlayPositionChange {
|
|
191
|
+
/** The position that was applied */
|
|
192
|
+
connectionPair: FuiConnectedPosition;
|
|
193
|
+
/** The scroll position that triggered the change */
|
|
194
|
+
scrollableViewProperties: FuiScrollableViewProperties;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Properties of a scrollable view
|
|
198
|
+
*/
|
|
199
|
+
interface FuiScrollableViewProperties {
|
|
200
|
+
/** The size of the scrollable view */
|
|
201
|
+
size: {
|
|
202
|
+
width: number;
|
|
203
|
+
height: number;
|
|
204
|
+
};
|
|
205
|
+
/** The scroll position of the view */
|
|
206
|
+
scrollPosition: {
|
|
207
|
+
top: number;
|
|
208
|
+
left: number;
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Content that can be attached to an overlay
|
|
213
|
+
*/
|
|
214
|
+
type FuiOverlayContent<T = unknown> = ComponentRef<T> | TemplateRef<unknown> | HTMLElement | string;
|
|
215
|
+
/**
|
|
216
|
+
* Factory function for creating scroll strategies
|
|
217
|
+
*/
|
|
218
|
+
type FuiScrollStrategyFactory = () => FuiScrollStrategy;
|
|
219
|
+
/**
|
|
220
|
+
* Options for creating a connected position strategy
|
|
221
|
+
*/
|
|
222
|
+
interface FuiConnectedPositionStrategyOptions {
|
|
223
|
+
/** The element to position relative to */
|
|
224
|
+
origin: ElementRef<HTMLElement> | HTMLElement;
|
|
225
|
+
/** Array of preferred positions */
|
|
226
|
+
positions: FuiConnectedPosition[];
|
|
227
|
+
/** Whether to push the overlay on-screen if it would otherwise be clipped */
|
|
228
|
+
withPush?: boolean;
|
|
229
|
+
/** Whether to grow the overlay after it reaches the edge of the viewport */
|
|
230
|
+
withGrowAfterOpen?: boolean;
|
|
231
|
+
/** Whether to lock the position after the first time it is positioned */
|
|
232
|
+
withLockedPosition?: boolean;
|
|
233
|
+
/** Whether to apply the default offset */
|
|
234
|
+
withDefaultOffsetX?: number;
|
|
235
|
+
/** Whether to apply the default offset */
|
|
236
|
+
withDefaultOffsetY?: number;
|
|
237
|
+
/** Whether to transform the origin element */
|
|
238
|
+
withTransformOriginOn?: ElementRef<HTMLElement> | HTMLElement;
|
|
239
|
+
/** Margin between the overlay and the viewport edge */
|
|
240
|
+
viewportMargin?: number;
|
|
241
|
+
/** Whether to use flexible dimensions */
|
|
242
|
+
withFlexibleDimensions?: boolean;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Options for creating a global position strategy
|
|
246
|
+
*/
|
|
247
|
+
interface FuiGlobalPositionStrategyOptions extends FuiGlobalPosition {
|
|
248
|
+
/** Whether to center the overlay horizontally */
|
|
249
|
+
centerHorizontally?: boolean;
|
|
250
|
+
/** Whether to center the overlay vertically */
|
|
251
|
+
centerVertically?: boolean;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Overlay size configuration
|
|
255
|
+
*/
|
|
256
|
+
interface FuiOverlaySizeConfig {
|
|
257
|
+
width?: string | number;
|
|
258
|
+
height?: string | number;
|
|
259
|
+
minWidth?: string | number;
|
|
260
|
+
minHeight?: string | number;
|
|
261
|
+
maxWidth?: string | number;
|
|
262
|
+
maxHeight?: string | number;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Overlay state information
|
|
266
|
+
*/
|
|
267
|
+
interface FuiOverlayState {
|
|
268
|
+
/** Whether the overlay is attached */
|
|
269
|
+
isAttached: boolean;
|
|
270
|
+
/** Whether the overlay has a backdrop */
|
|
271
|
+
hasBackdrop: boolean;
|
|
272
|
+
/** The current size configuration */
|
|
273
|
+
size: FuiOverlaySizeConfig;
|
|
274
|
+
/** The current position strategy */
|
|
275
|
+
positionStrategy: FuiPositionStrategy | null;
|
|
276
|
+
/** The current scroll strategy */
|
|
277
|
+
scrollStrategy: FuiScrollStrategy | null;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* # FuiGlobalPositionStrategy
|
|
282
|
+
*
|
|
283
|
+
* A position strategy that positions the overlay at a fixed position on the screen.
|
|
284
|
+
* This strategy is useful for modals, dialogs, and other overlays that should be
|
|
285
|
+
* positioned relative to the viewport rather than a specific element.
|
|
286
|
+
*
|
|
287
|
+
* ## Features
|
|
288
|
+
* - Fixed positioning relative to the viewport
|
|
289
|
+
* - Support for all CSS position properties (top, bottom, left, right)
|
|
290
|
+
* - Centering options (horizontal and vertical)
|
|
291
|
+
* - Responsive positioning
|
|
292
|
+
* - Size constraints (width, height, min/max dimensions)
|
|
293
|
+
*/
|
|
294
|
+
declare class FuiGlobalPositionStrategy implements FuiPositionStrategy {
|
|
295
|
+
private _renderer;
|
|
296
|
+
private _options;
|
|
297
|
+
private _overlayElement?;
|
|
298
|
+
private readonly _positionChanges;
|
|
299
|
+
private _isDisposed;
|
|
300
|
+
constructor(_renderer: Renderer2, _options?: FuiGlobalPositionStrategyOptions);
|
|
301
|
+
/** Observable that emits when the position changes */
|
|
302
|
+
get positionChanges(): Observable<FuiConnectedOverlayPositionChange>;
|
|
303
|
+
/**
|
|
304
|
+
* Sets the overlay element reference
|
|
305
|
+
*/
|
|
306
|
+
setOverlayElement(element: HTMLElement): void;
|
|
307
|
+
/**
|
|
308
|
+
* Applies the positioning strategy
|
|
309
|
+
*/
|
|
310
|
+
apply(): void;
|
|
311
|
+
/**
|
|
312
|
+
* Sets the top position
|
|
313
|
+
*/
|
|
314
|
+
top(value?: string | number): this;
|
|
315
|
+
/**
|
|
316
|
+
* Sets the bottom position
|
|
317
|
+
*/
|
|
318
|
+
bottom(value?: string | number): this;
|
|
319
|
+
/**
|
|
320
|
+
* Sets the left position
|
|
321
|
+
*/
|
|
322
|
+
left(value?: string | number): this;
|
|
323
|
+
/**
|
|
324
|
+
* Sets the right position
|
|
325
|
+
*/
|
|
326
|
+
right(value?: string | number): this;
|
|
327
|
+
/**
|
|
328
|
+
* Centers the overlay horizontally
|
|
329
|
+
*/
|
|
330
|
+
centerHorizontally(): this;
|
|
331
|
+
/**
|
|
332
|
+
* Centers the overlay vertically
|
|
333
|
+
*/
|
|
334
|
+
centerVertically(): this;
|
|
335
|
+
/**
|
|
336
|
+
* Sets the width of the overlay
|
|
337
|
+
*/
|
|
338
|
+
width(value: string | number): this;
|
|
339
|
+
/**
|
|
340
|
+
* Sets the height of the overlay
|
|
341
|
+
*/
|
|
342
|
+
height(value: string | number): this;
|
|
343
|
+
/**
|
|
344
|
+
* Sets the minimum width of the overlay
|
|
345
|
+
*/
|
|
346
|
+
minWidth(value: string | number): this;
|
|
347
|
+
/**
|
|
348
|
+
* Sets the minimum height of the overlay
|
|
349
|
+
*/
|
|
350
|
+
minHeight(value: string | number): this;
|
|
351
|
+
/**
|
|
352
|
+
* Sets the maximum width of the overlay
|
|
353
|
+
*/
|
|
354
|
+
maxWidth(value: string | number): this;
|
|
355
|
+
/**
|
|
356
|
+
* Sets the maximum height of the overlay
|
|
357
|
+
*/
|
|
358
|
+
maxHeight(value: string | number): this;
|
|
359
|
+
/**
|
|
360
|
+
* Disposes the strategy and cleans up resources
|
|
361
|
+
*/
|
|
362
|
+
dispose(): void;
|
|
363
|
+
/**
|
|
364
|
+
* Detaches the strategy from the overlay
|
|
365
|
+
*/
|
|
366
|
+
detach(): void;
|
|
367
|
+
private _applyPosition;
|
|
368
|
+
private _applyCentering;
|
|
369
|
+
private _applySizeConstraints;
|
|
370
|
+
private _coerceCssPixelValue;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* # FuiConnectedPositionStrategy
|
|
375
|
+
*
|
|
376
|
+
* A position strategy that positions the overlay relative to a connected element.
|
|
377
|
+
* This strategy is ideal for tooltips, dropdowns, menus, and other overlays that
|
|
378
|
+
* should be positioned relative to a trigger element.
|
|
379
|
+
*
|
|
380
|
+
* ## Features
|
|
381
|
+
* - Positions overlay relative to an origin element
|
|
382
|
+
* - Multiple fallback positions with automatic selection
|
|
383
|
+
* - Collision detection and viewport boundary handling
|
|
384
|
+
* - Push and grow behaviors for constrained spaces
|
|
385
|
+
* - Scroll and resize event handling
|
|
386
|
+
* - Transform origin support for animations
|
|
387
|
+
*/
|
|
388
|
+
declare class FuiConnectedPositionStrategy implements FuiPositionStrategy {
|
|
389
|
+
private _renderer;
|
|
390
|
+
private _overlayElement?;
|
|
391
|
+
private _originElement;
|
|
392
|
+
private _positions;
|
|
393
|
+
private _appliedPosition?;
|
|
394
|
+
private _isDisposed;
|
|
395
|
+
private _resizeSubscription?;
|
|
396
|
+
private _scrollSubscription?;
|
|
397
|
+
private readonly _positionChanges;
|
|
398
|
+
private _withPush;
|
|
399
|
+
private _withGrowAfterOpen;
|
|
400
|
+
private _withLockedPosition;
|
|
401
|
+
private _defaultOffsetX;
|
|
402
|
+
private _defaultOffsetY;
|
|
403
|
+
private _transformOriginElement?;
|
|
404
|
+
private _viewportMargin;
|
|
405
|
+
private _withFlexibleDimensions;
|
|
406
|
+
constructor(_renderer: Renderer2, options: FuiConnectedPositionStrategyOptions);
|
|
407
|
+
/** Observable that emits when the position changes */
|
|
408
|
+
get positionChanges(): Observable<FuiConnectedOverlayPositionChange>;
|
|
409
|
+
/**
|
|
410
|
+
* Sets the overlay element reference
|
|
411
|
+
*/
|
|
412
|
+
setOverlayElement(element: HTMLElement): void;
|
|
413
|
+
/**
|
|
414
|
+
* Applies the positioning strategy
|
|
415
|
+
*/
|
|
416
|
+
apply(): void;
|
|
417
|
+
/**
|
|
418
|
+
* Updates the positions array
|
|
419
|
+
*/
|
|
420
|
+
withPositions(positions: FuiConnectedPosition[]): this;
|
|
421
|
+
/**
|
|
422
|
+
* Enables pushing the overlay on-screen if it would otherwise be clipped
|
|
423
|
+
*/
|
|
424
|
+
withPush(enabled?: boolean): this;
|
|
425
|
+
/**
|
|
426
|
+
* Enables growing the overlay after it reaches the edge of the viewport
|
|
427
|
+
*/
|
|
428
|
+
withGrowAfterOpen(enabled?: boolean): this;
|
|
429
|
+
/**
|
|
430
|
+
* Locks the position after the first time it is positioned
|
|
431
|
+
*/
|
|
432
|
+
withLockedPosition(enabled?: boolean): this;
|
|
433
|
+
/**
|
|
434
|
+
* Sets the default offset for the x-axis
|
|
435
|
+
*/
|
|
436
|
+
withDefaultOffsetX(offset: number): this;
|
|
437
|
+
/**
|
|
438
|
+
* Sets the default offset for the y-axis
|
|
439
|
+
*/
|
|
440
|
+
withDefaultOffsetY(offset: number): this;
|
|
441
|
+
/**
|
|
442
|
+
* Sets the element to use for transform origin
|
|
443
|
+
*/
|
|
444
|
+
withTransformOriginOn(element: ElementRef<HTMLElement> | HTMLElement): this;
|
|
445
|
+
/**
|
|
446
|
+
* Sets the margin between the overlay and the viewport edge
|
|
447
|
+
*/
|
|
448
|
+
withViewportMargin(margin: number): this;
|
|
449
|
+
/**
|
|
450
|
+
* Enables flexible dimensions
|
|
451
|
+
*/
|
|
452
|
+
withFlexibleDimensions(enabled?: boolean): this;
|
|
453
|
+
/**
|
|
454
|
+
* Disposes the strategy and cleans up resources
|
|
455
|
+
*/
|
|
456
|
+
dispose(): void;
|
|
457
|
+
/**
|
|
458
|
+
* Detaches the strategy from the overlay
|
|
459
|
+
*/
|
|
460
|
+
detach(): void;
|
|
461
|
+
private _getBestPosition;
|
|
462
|
+
private _applyPosition;
|
|
463
|
+
private _calculatePositionedRect;
|
|
464
|
+
private _calculatePositionScore;
|
|
465
|
+
private _pushWithinViewport;
|
|
466
|
+
private _setTransformOrigin;
|
|
467
|
+
private _applyFlexibleDimensions;
|
|
468
|
+
private _setupEventListeners;
|
|
469
|
+
private _removeEventListeners;
|
|
470
|
+
private _getViewportSize;
|
|
471
|
+
private _getScrollableViewProperties;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* # FuiNoopScrollStrategy
|
|
476
|
+
*
|
|
477
|
+
* A scroll strategy that does nothing when the user scrolls.
|
|
478
|
+
* This is useful for overlays that should remain in their position
|
|
479
|
+
* regardless of scrolling.
|
|
480
|
+
*/
|
|
481
|
+
declare class FuiNoopScrollStrategy implements FuiScrollStrategy {
|
|
482
|
+
enable(): void;
|
|
483
|
+
disable(): void;
|
|
484
|
+
attach(_overlayRef: FuiOverlayRef): void;
|
|
485
|
+
detach(): void;
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* # FuiCloseScrollStrategy
|
|
489
|
+
*
|
|
490
|
+
* A scroll strategy that closes the overlay when the user scrolls.
|
|
491
|
+
* This is useful for overlays like tooltips or dropdowns that should
|
|
492
|
+
* disappear when the user scrolls away from the trigger element.
|
|
493
|
+
*/
|
|
494
|
+
declare class FuiCloseScrollStrategy implements FuiScrollStrategy {
|
|
495
|
+
private _threshold;
|
|
496
|
+
private _overlayRef?;
|
|
497
|
+
private _scrollListener?;
|
|
498
|
+
private _isEnabled;
|
|
499
|
+
constructor(_threshold?: number);
|
|
500
|
+
enable(): void;
|
|
501
|
+
disable(): void;
|
|
502
|
+
attach(overlayRef: FuiOverlayRef): void;
|
|
503
|
+
detach(): void;
|
|
504
|
+
private _removeScrollListener;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* # FuiRepositionScrollStrategy
|
|
508
|
+
*
|
|
509
|
+
* A scroll strategy that repositions the overlay when the user scrolls.
|
|
510
|
+
* This is useful for overlays that should follow their trigger element
|
|
511
|
+
* as it moves due to scrolling.
|
|
512
|
+
*/
|
|
513
|
+
declare class FuiRepositionScrollStrategy implements FuiScrollStrategy {
|
|
514
|
+
private _scrollThrottle;
|
|
515
|
+
private _autoClose;
|
|
516
|
+
private _overlayRef?;
|
|
517
|
+
private _scrollListener?;
|
|
518
|
+
private _isEnabled;
|
|
519
|
+
constructor(_scrollThrottle?: number, _autoClose?: boolean);
|
|
520
|
+
enable(): void;
|
|
521
|
+
disable(): void;
|
|
522
|
+
attach(overlayRef: FuiOverlayRef): void;
|
|
523
|
+
detach(): void;
|
|
524
|
+
private _removeScrollListener;
|
|
525
|
+
private _isScrolledOutOfView;
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* # FuiBlockScrollStrategy
|
|
529
|
+
*
|
|
530
|
+
* A scroll strategy that prevents scrolling while the overlay is open.
|
|
531
|
+
* This is useful for modal dialogs and other overlays that should
|
|
532
|
+
* prevent interaction with the underlying content.
|
|
533
|
+
*/
|
|
534
|
+
declare class FuiBlockScrollStrategy implements FuiScrollStrategy {
|
|
535
|
+
private _document?;
|
|
536
|
+
private _previousHTMLStyles;
|
|
537
|
+
private _previousBodyStyles;
|
|
538
|
+
private _isEnabled;
|
|
539
|
+
constructor(_document?: Document | undefined);
|
|
540
|
+
enable(): void;
|
|
541
|
+
disable(): void;
|
|
542
|
+
attach(_overlayRef: FuiOverlayRef): void;
|
|
543
|
+
detach(): void;
|
|
544
|
+
private _getScrollbarWidth;
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Factory functions for creating scroll strategies
|
|
548
|
+
*/
|
|
549
|
+
declare const FUI_SCROLL_STRATEGIES: {
|
|
550
|
+
/**
|
|
551
|
+
* Creates a noop scroll strategy
|
|
552
|
+
*/
|
|
553
|
+
noop: () => FuiNoopScrollStrategy;
|
|
554
|
+
/**
|
|
555
|
+
* Creates a close scroll strategy
|
|
556
|
+
*/
|
|
557
|
+
close: (threshold?: number) => FuiCloseScrollStrategy;
|
|
558
|
+
/**
|
|
559
|
+
* Creates a reposition scroll strategy
|
|
560
|
+
*/
|
|
561
|
+
reposition: (scrollThrottle?: number, autoClose?: boolean) => FuiRepositionScrollStrategy;
|
|
562
|
+
/**
|
|
563
|
+
* Creates a block scroll strategy
|
|
564
|
+
* @param doc Optional Document reference for SSR compatibility
|
|
565
|
+
*/
|
|
566
|
+
block: (doc?: Document) => FuiBlockScrollStrategy;
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
declare class FuiOverlayService {
|
|
570
|
+
private readonly _document;
|
|
571
|
+
private readonly _rendererFactory;
|
|
572
|
+
private readonly _environmentInjector;
|
|
573
|
+
private readonly _renderer;
|
|
574
|
+
private _overlayContainer?;
|
|
575
|
+
private _nextUniqueId;
|
|
576
|
+
private _activeOverlays;
|
|
577
|
+
private _currentZIndex;
|
|
578
|
+
constructor();
|
|
579
|
+
/**
|
|
580
|
+
* Creates a new overlay with the given configuration
|
|
581
|
+
*/
|
|
582
|
+
create(config?: FuiOverlayConfig): FuiOverlayRef;
|
|
583
|
+
/**
|
|
584
|
+
* Gets the next available z-index for a new overlay
|
|
585
|
+
*/
|
|
586
|
+
private _getNextZIndex;
|
|
587
|
+
/**
|
|
588
|
+
* Recalculates the base z-index when overlays are disposed
|
|
589
|
+
* Resets to base if no overlays are active
|
|
590
|
+
*/
|
|
591
|
+
private _recalculateBaseZIndex;
|
|
592
|
+
/**
|
|
593
|
+
* Gets the position builder for creating position strategies
|
|
594
|
+
*/
|
|
595
|
+
position(): FuiOverlayPositionBuilder;
|
|
596
|
+
/**
|
|
597
|
+
* Gets the scroll strategies factory
|
|
598
|
+
*/
|
|
599
|
+
get scrollStrategies(): typeof FUI_SCROLL_STRATEGIES;
|
|
600
|
+
/**
|
|
601
|
+
* Gets all currently active overlays
|
|
602
|
+
*/
|
|
603
|
+
getActiveOverlays(): FuiOverlayRef[];
|
|
604
|
+
/**
|
|
605
|
+
* Disposes all active overlays
|
|
606
|
+
*/
|
|
607
|
+
disposeAll(): void;
|
|
608
|
+
private _createOverlayElement;
|
|
609
|
+
private _attachToContainer;
|
|
610
|
+
private _getOverlayContainer;
|
|
611
|
+
private _applyConfigDefaults;
|
|
612
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FuiOverlayService, never>;
|
|
613
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FuiOverlayService>;
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* # FuiOverlayPositionBuilder
|
|
617
|
+
*
|
|
618
|
+
* Builder class for creating position strategies. Provides a fluent API
|
|
619
|
+
* for configuring overlay positioning.
|
|
620
|
+
*/
|
|
621
|
+
declare class FuiOverlayPositionBuilder {
|
|
622
|
+
private _renderer;
|
|
623
|
+
constructor(_renderer: Renderer2);
|
|
624
|
+
/**
|
|
625
|
+
* Creates a global position strategy
|
|
626
|
+
*/
|
|
627
|
+
global(options?: FuiGlobalPositionStrategyOptions): FuiGlobalPositionStrategy;
|
|
628
|
+
/**
|
|
629
|
+
* Creates a connected position strategy
|
|
630
|
+
*/
|
|
631
|
+
connectedTo(origin: ElementRef<HTMLElement> | HTMLElement, positions?: FuiConnectedPosition[]): FuiConnectedPositionStrategy;
|
|
632
|
+
/**
|
|
633
|
+
* Creates a flexible connected position strategy with common tooltip positions
|
|
634
|
+
*/
|
|
635
|
+
flexibleConnectedTo(origin: ElementRef<HTMLElement> | HTMLElement, preferredPosition?: 'top' | 'bottom' | 'left' | 'right'): FuiConnectedPositionStrategy;
|
|
636
|
+
private _getFlexiblePositions;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* # FuiOverlayRefImpl
|
|
641
|
+
*
|
|
642
|
+
* Implementation of the FuiOverlayRef interface. This class manages the lifecycle
|
|
643
|
+
* of an individual overlay instance, including content attachment, positioning,
|
|
644
|
+
* and cleanup.
|
|
645
|
+
*
|
|
646
|
+
* ## Features
|
|
647
|
+
* - Content attachment and detachment
|
|
648
|
+
* - Event handling (backdrop clicks, keyboard events)
|
|
649
|
+
* - Position and size updates
|
|
650
|
+
* - CSS class management
|
|
651
|
+
* - Proper cleanup and disposal
|
|
652
|
+
*/
|
|
653
|
+
declare class FuiOverlayRefImpl implements FuiOverlayRef {
|
|
654
|
+
private readonly _id;
|
|
655
|
+
private readonly _overlayElement;
|
|
656
|
+
private readonly _renderer;
|
|
657
|
+
private readonly _zIndex;
|
|
658
|
+
private _backdropElement;
|
|
659
|
+
private _attachedContent;
|
|
660
|
+
private _config;
|
|
661
|
+
private _hasAttached;
|
|
662
|
+
private readonly _backdropClick;
|
|
663
|
+
private readonly _keydownEvents;
|
|
664
|
+
private readonly _attachments;
|
|
665
|
+
private readonly _detachments;
|
|
666
|
+
private _backdropClickListener?;
|
|
667
|
+
private _keydownListener?;
|
|
668
|
+
constructor(overlayElement: HTMLElement, config: FuiOverlayConfig, renderer: Renderer2, id?: string, zIndex?: number);
|
|
669
|
+
/** Unique identifier for this overlay */
|
|
670
|
+
get id(): string;
|
|
671
|
+
/** The overlay pane element */
|
|
672
|
+
get overlayElement(): HTMLElement;
|
|
673
|
+
/** The backdrop element (if any) */
|
|
674
|
+
get backdropElement(): HTMLElement | null;
|
|
675
|
+
/** Observable that emits when the backdrop is clicked */
|
|
676
|
+
get backdropClick(): Observable<MouseEvent>;
|
|
677
|
+
/** Observable that emits when a key is pressed while the overlay has focus */
|
|
678
|
+
get keydownEvents(): Observable<KeyboardEvent>;
|
|
679
|
+
/** Observable that emits when the overlay is attached to the DOM */
|
|
680
|
+
get attachments(): Observable<void>;
|
|
681
|
+
/** Observable that emits when the overlay is detached from the DOM */
|
|
682
|
+
get detachments(): Observable<void>;
|
|
683
|
+
/** Whether the overlay is currently attached */
|
|
684
|
+
get hasAttached(): boolean;
|
|
685
|
+
/**
|
|
686
|
+
* Attaches content to the overlay
|
|
687
|
+
*/
|
|
688
|
+
attach<T = unknown>(content: ComponentRef<T> | TemplateRef<unknown> | HTMLElement, injector?: Injector): ComponentRef<T> | undefined;
|
|
689
|
+
/**
|
|
690
|
+
* Detaches the content from the overlay
|
|
691
|
+
*/
|
|
692
|
+
detach(): void;
|
|
693
|
+
/**
|
|
694
|
+
* Disposes the overlay and cleans up resources
|
|
695
|
+
*/
|
|
696
|
+
dispose(): void;
|
|
697
|
+
/**
|
|
698
|
+
* Updates the position of the overlay
|
|
699
|
+
*/
|
|
700
|
+
updatePosition(): void;
|
|
701
|
+
/**
|
|
702
|
+
* Updates the size of the overlay
|
|
703
|
+
*/
|
|
704
|
+
updateSize(config?: Pick<FuiOverlayConfig, 'width' | 'height' | 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight'>): void;
|
|
705
|
+
/**
|
|
706
|
+
* Adds CSS classes to the overlay pane
|
|
707
|
+
*/
|
|
708
|
+
addPanelClass(classes: string | string[]): void;
|
|
709
|
+
/**
|
|
710
|
+
* Removes CSS classes from the overlay pane
|
|
711
|
+
*/
|
|
712
|
+
removePanelClass(classes: string | string[]): void;
|
|
713
|
+
/**
|
|
714
|
+
* Gets the current configuration of the overlay
|
|
715
|
+
*/
|
|
716
|
+
getConfig(): FuiOverlayConfig;
|
|
717
|
+
/**
|
|
718
|
+
* Updates the configuration of the overlay
|
|
719
|
+
*/
|
|
720
|
+
updateConfig(config: Partial<FuiOverlayConfig>): void;
|
|
721
|
+
private _setupOverlayElement;
|
|
722
|
+
private _setupBackdrop;
|
|
723
|
+
private _createBackdrop;
|
|
724
|
+
private _removeBackdrop;
|
|
725
|
+
private _setupEventListeners;
|
|
726
|
+
private _removeEventListeners;
|
|
727
|
+
private _applySizeConfig;
|
|
728
|
+
private _coerceCssPixelValue;
|
|
729
|
+
private _generateId;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* # FuiOverlayContainer Component
|
|
734
|
+
*
|
|
735
|
+
* Container component that holds all overlay content. This component is automatically
|
|
736
|
+
* created and attached to the document body when the overlay service is first used.
|
|
737
|
+
*
|
|
738
|
+
* ## Features
|
|
739
|
+
* - Provides a dedicated container for all overlay content
|
|
740
|
+
* - Manages z-index stacking for multiple overlays
|
|
741
|
+
* - Handles cleanup when destroyed
|
|
742
|
+
* - Applies proper CSS classes for styling
|
|
743
|
+
*
|
|
744
|
+
* ## Usage
|
|
745
|
+
*
|
|
746
|
+
* This component is used internally by the overlay service and should not be
|
|
747
|
+
* instantiated directly by application code.
|
|
748
|
+
*/
|
|
749
|
+
declare class FuiOverlayContainerComponent implements OnInit, OnDestroy {
|
|
750
|
+
private readonly _document;
|
|
751
|
+
private readonly _elementRef;
|
|
752
|
+
ngOnInit(): void;
|
|
753
|
+
ngOnDestroy(): void;
|
|
754
|
+
/**
|
|
755
|
+
* Gets the container element
|
|
756
|
+
*/
|
|
757
|
+
getContainerElement(): HTMLElement;
|
|
758
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FuiOverlayContainerComponent, never>;
|
|
759
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FuiOverlayContainerComponent, "fui-overlay-container", never, {}, {}, never, never, true, never>;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* Portal attachment result containing the attached element and cleanup function
|
|
764
|
+
*/
|
|
765
|
+
interface PortalAttachment {
|
|
766
|
+
/** The element that was attached to the portal outlet */
|
|
767
|
+
element: HTMLElement;
|
|
768
|
+
/** Function to detach the element and clean up */
|
|
769
|
+
detach: () => void;
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* # Portal Service
|
|
773
|
+
*
|
|
774
|
+
* A service for dynamically moving DOM elements to different locations in the DOM tree,
|
|
775
|
+
* particularly useful for moving elements to the document body to avoid clipping issues
|
|
776
|
+
* with parent containers that have overflow: hidden.
|
|
777
|
+
*
|
|
778
|
+
* ## Features
|
|
779
|
+
* - Move elements to document body or any other container
|
|
780
|
+
* - Maintain element references and event listeners
|
|
781
|
+
* - Proper cleanup when detaching
|
|
782
|
+
* - Support for multiple portal outlets
|
|
783
|
+
*
|
|
784
|
+
* ## Usage
|
|
785
|
+
*
|
|
786
|
+
* ```typescript
|
|
787
|
+
* constructor(private portalService: PortalService) {}
|
|
788
|
+
*
|
|
789
|
+
* openMenu() {
|
|
790
|
+
* const menuElement = this.menuElementRef.nativeElement;
|
|
791
|
+
* this.portalAttachment = this.portalService.attachToBody(menuElement);
|
|
792
|
+
* }
|
|
793
|
+
*
|
|
794
|
+
* closeMenu() {
|
|
795
|
+
* if (this.portalAttachment) {
|
|
796
|
+
* this.portalAttachment.detach();
|
|
797
|
+
* this.portalAttachment = null;
|
|
798
|
+
* }
|
|
799
|
+
* }
|
|
800
|
+
* ```
|
|
801
|
+
*/
|
|
802
|
+
declare class PortalService {
|
|
803
|
+
private readonly _document;
|
|
804
|
+
private readonly _renderer;
|
|
805
|
+
private readonly _rendererFactory;
|
|
806
|
+
constructor();
|
|
807
|
+
/**
|
|
808
|
+
* Attaches an element to the document body
|
|
809
|
+
* @param element The element to attach
|
|
810
|
+
* @returns PortalAttachment with detach function
|
|
811
|
+
*/
|
|
812
|
+
attachToBody(element: HTMLElement): PortalAttachment;
|
|
813
|
+
/**
|
|
814
|
+
* Attaches an element to a specific container
|
|
815
|
+
* @param element The element to attach
|
|
816
|
+
* @param container The container to attach to
|
|
817
|
+
* @returns PortalAttachment with detach function
|
|
818
|
+
*/
|
|
819
|
+
attachToContainer(element: HTMLElement, container: HTMLElement): PortalAttachment;
|
|
820
|
+
/**
|
|
821
|
+
* Creates a portal outlet element and attaches it to the document body
|
|
822
|
+
* @param className Optional CSS class for the outlet
|
|
823
|
+
* @returns The created outlet element
|
|
824
|
+
*/
|
|
825
|
+
createBodyOutlet(className?: string): HTMLElement;
|
|
826
|
+
/**
|
|
827
|
+
* Removes a portal outlet from the document
|
|
828
|
+
* @param outlet The outlet element to remove
|
|
829
|
+
*/
|
|
830
|
+
removeOutlet(outlet: HTMLElement): void;
|
|
831
|
+
/**
|
|
832
|
+
* Checks if an element is currently attached to a portal
|
|
833
|
+
* @param element The element to check
|
|
834
|
+
* @returns True if the element is attached to the body or not in its original position
|
|
835
|
+
*/
|
|
836
|
+
isAttachedToPortal(element: HTMLElement): boolean;
|
|
837
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PortalService, never>;
|
|
838
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PortalService>;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
export { FUI_OVERLAY_CONTAINER, FUI_OVERLAY_SCROLL_STRATEGY, FUI_SCROLL_STRATEGIES, FuiBlockScrollStrategy, FuiCloseScrollStrategy, FuiConnectedPositionStrategy, FuiGlobalPositionStrategy, FuiNoopScrollStrategy, FuiOverlayContainerComponent, FuiOverlayPositionBuilder, FuiOverlayRefImpl, FuiOverlayService, FuiRepositionScrollStrategy, PortalService };
|
|
842
|
+
export type { FuiBackdropClickBehavior, FuiConnectedOverlayPositionChange, FuiConnectedPosition, FuiConnectedPositionStrategyOptions, FuiGlobalPosition, FuiGlobalPositionStrategyOptions, FuiOverlayConfig, FuiOverlayContent, FuiOverlayRef, FuiOverlaySizeConfig, FuiOverlayState, FuiPositionStrategy, FuiScrollStrategy, FuiScrollStrategyFactory, FuiScrollStrategyType, FuiScrollableViewProperties, PortalAttachment };
|
|
843
|
+
//# sourceMappingURL=raintonic-formaui-cdk-overlay.d.ts.map
|