forty-cdk 0.2.0 → 0.3.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/accordion/README.md +122 -0
- package/aspect-ratio/README.md +76 -0
- package/avatar/README.md +100 -0
- package/breadcrumbs/README.md +49 -0
- package/breakpoints/README.md +81 -0
- package/button/README.md +49 -0
- package/calendar/README.md +458 -0
- package/carousel/README.md +358 -0
- package/checkbox/README.md +146 -0
- package/combobox/README.md +535 -0
- package/context-menu/README.md +139 -0
- package/date-field/README.md +184 -0
- package/date-picker/README.md +338 -0
- package/dialog/README.md +388 -0
- package/disclosure/README.md +114 -0
- package/drag-drop/README.md +359 -0
- package/drawer/README.md +560 -0
- package/dropdown-menu/README.md +176 -0
- package/fesm2022/forty-cdk-accordion.mjs +348 -0
- package/fesm2022/forty-cdk-accordion.mjs.map +1 -0
- package/fesm2022/forty-cdk-aspect-ratio.mjs +74 -0
- package/fesm2022/forty-cdk-aspect-ratio.mjs.map +1 -0
- package/fesm2022/forty-cdk-avatar.mjs +308 -0
- package/fesm2022/forty-cdk-avatar.mjs.map +1 -0
- package/fesm2022/forty-cdk-breadcrumbs.mjs +125 -0
- package/fesm2022/forty-cdk-breadcrumbs.mjs.map +1 -0
- package/fesm2022/forty-cdk-breakpoints.mjs +117 -0
- package/fesm2022/forty-cdk-breakpoints.mjs.map +1 -0
- package/fesm2022/forty-cdk-button.mjs +134 -0
- package/fesm2022/forty-cdk-button.mjs.map +1 -0
- package/fesm2022/forty-cdk-calendar.mjs +2034 -0
- package/fesm2022/forty-cdk-calendar.mjs.map +1 -0
- package/fesm2022/forty-cdk-carousel.mjs +968 -0
- package/fesm2022/forty-cdk-carousel.mjs.map +1 -0
- package/fesm2022/forty-cdk-checkbox.mjs +226 -0
- package/fesm2022/forty-cdk-checkbox.mjs.map +1 -0
- package/fesm2022/forty-cdk-combobox.mjs +2596 -0
- package/fesm2022/forty-cdk-combobox.mjs.map +1 -0
- package/fesm2022/forty-cdk-context-menu.mjs +413 -0
- package/fesm2022/forty-cdk-context-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-core.mjs +9022 -0
- package/fesm2022/forty-cdk-core.mjs.map +1 -0
- package/fesm2022/forty-cdk-date-field.mjs +744 -0
- package/fesm2022/forty-cdk-date-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-date-picker.mjs +1011 -0
- package/fesm2022/forty-cdk-date-picker.mjs.map +1 -0
- package/fesm2022/forty-cdk-dialog.mjs +707 -0
- package/fesm2022/forty-cdk-dialog.mjs.map +1 -0
- package/fesm2022/forty-cdk-disclosure.mjs +190 -0
- package/fesm2022/forty-cdk-disclosure.mjs.map +1 -0
- package/fesm2022/forty-cdk-drag-drop.mjs +1180 -0
- package/fesm2022/forty-cdk-drag-drop.mjs.map +1 -0
- package/fesm2022/forty-cdk-drawer.mjs +1641 -0
- package/fesm2022/forty-cdk-drawer.mjs.map +1 -0
- package/fesm2022/forty-cdk-dropdown-menu.mjs +350 -0
- package/fesm2022/forty-cdk-dropdown-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-field.mjs +425 -0
- package/fesm2022/forty-cdk-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-fieldset.mjs +164 -0
- package/fesm2022/forty-cdk-fieldset.mjs.map +1 -0
- package/fesm2022/forty-cdk-file-upload.mjs +221 -0
- package/fesm2022/forty-cdk-file-upload.mjs.map +1 -0
- package/fesm2022/forty-cdk-hover-card.mjs +496 -0
- package/fesm2022/forty-cdk-hover-card.mjs.map +1 -0
- package/fesm2022/forty-cdk-input.mjs +274 -0
- package/fesm2022/forty-cdk-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-internationalized-date.mjs +1 -1
- package/fesm2022/forty-cdk-internationalized-date.mjs.map +1 -1
- package/fesm2022/forty-cdk-listbox.mjs +1279 -0
- package/fesm2022/forty-cdk-listbox.mjs.map +1 -0
- package/fesm2022/forty-cdk-menu.mjs +1439 -0
- package/fesm2022/forty-cdk-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-menubar.mjs +787 -0
- package/fesm2022/forty-cdk-menubar.mjs.map +1 -0
- package/fesm2022/forty-cdk-meter.mjs +211 -0
- package/fesm2022/forty-cdk-meter.mjs.map +1 -0
- package/fesm2022/forty-cdk-navigation-menu.mjs +1145 -0
- package/fesm2022/forty-cdk-navigation-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-number-input.mjs +559 -0
- package/fesm2022/forty-cdk-number-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-otp-input.mjs +527 -0
- package/fesm2022/forty-cdk-otp-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-pagination.mjs +323 -0
- package/fesm2022/forty-cdk-pagination.mjs.map +1 -0
- package/fesm2022/forty-cdk-pane-resizer.mjs +297 -0
- package/fesm2022/forty-cdk-pane-resizer.mjs.map +1 -0
- package/fesm2022/forty-cdk-popover.mjs +698 -0
- package/fesm2022/forty-cdk-popover.mjs.map +1 -0
- package/fesm2022/forty-cdk-progress.mjs +226 -0
- package/fesm2022/forty-cdk-progress.mjs.map +1 -0
- package/fesm2022/forty-cdk-radio-group.mjs +378 -0
- package/fesm2022/forty-cdk-radio-group.mjs.map +1 -0
- package/fesm2022/forty-cdk-scroll-area.mjs +640 -0
- package/fesm2022/forty-cdk-scroll-area.mjs.map +1 -0
- package/fesm2022/forty-cdk-search.mjs +205 -0
- package/fesm2022/forty-cdk-search.mjs.map +1 -0
- package/fesm2022/forty-cdk-select.mjs +1661 -0
- package/fesm2022/forty-cdk-select.mjs.map +1 -0
- package/fesm2022/forty-cdk-separator.mjs +82 -0
- package/fesm2022/forty-cdk-separator.mjs.map +1 -0
- package/fesm2022/forty-cdk-signal-forms.mjs +97 -0
- package/fesm2022/forty-cdk-signal-forms.mjs.map +1 -0
- package/fesm2022/forty-cdk-slider.mjs +803 -0
- package/fesm2022/forty-cdk-slider.mjs.map +1 -0
- package/fesm2022/forty-cdk-stepper.mjs +886 -0
- package/fesm2022/forty-cdk-stepper.mjs.map +1 -0
- package/fesm2022/forty-cdk-switch.mjs +137 -0
- package/fesm2022/forty-cdk-switch.mjs.map +1 -0
- package/fesm2022/forty-cdk-table.mjs +1518 -0
- package/fesm2022/forty-cdk-table.mjs.map +1 -0
- package/fesm2022/forty-cdk-tabs.mjs +400 -0
- package/fesm2022/forty-cdk-tabs.mjs.map +1 -0
- package/fesm2022/forty-cdk-time-field.mjs +593 -0
- package/fesm2022/forty-cdk-time-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-time-picker.mjs +1013 -0
- package/fesm2022/forty-cdk-time-picker.mjs.map +1 -0
- package/fesm2022/forty-cdk-toast.mjs +1153 -0
- package/fesm2022/forty-cdk-toast.mjs.map +1 -0
- package/fesm2022/forty-cdk-toggle.mjs +516 -0
- package/fesm2022/forty-cdk-toggle.mjs.map +1 -0
- package/fesm2022/forty-cdk-toolbar.mjs +374 -0
- package/fesm2022/forty-cdk-toolbar.mjs.map +1 -0
- package/fesm2022/forty-cdk-tooltip.mjs +672 -0
- package/fesm2022/forty-cdk-tooltip.mjs.map +1 -0
- package/fesm2022/forty-cdk-tree.mjs +2007 -0
- package/fesm2022/forty-cdk-tree.mjs.map +1 -0
- package/fesm2022/forty-cdk-virtualization.mjs +1 -1
- package/fesm2022/forty-cdk-virtualization.mjs.map +1 -1
- package/fesm2022/forty-cdk.mjs +0 -43310
- package/fesm2022/forty-cdk.mjs.map +1 -1
- package/field/README.md +97 -0
- package/fieldset/README.md +86 -0
- package/file-upload/README.md +73 -0
- package/hover-card/README.md +171 -0
- package/input/README.md +156 -0
- package/listbox/README.md +424 -0
- package/menu/README.md +181 -0
- package/menubar/README.md +140 -0
- package/meter/README.md +128 -0
- package/navigation-menu/README.md +253 -0
- package/number-input/README.md +171 -0
- package/otp-input/README.md +198 -0
- package/package.json +213 -1
- package/pagination/README.md +61 -0
- package/pane-resizer/README.md +136 -0
- package/popover/README.md +262 -0
- package/progress/README.md +115 -0
- package/radio-group/README.md +129 -0
- package/scroll-area/README.md +184 -0
- package/search/README.md +42 -0
- package/select/README.md +488 -0
- package/separator/README.md +84 -0
- package/signal-forms/README.md +72 -0
- package/slider/README.md +152 -0
- package/stepper/README.md +292 -0
- package/switch/README.md +116 -0
- package/table/README.md +769 -0
- package/tabs/README.md +130 -0
- package/time-field/README.md +157 -0
- package/time-picker/README.md +172 -0
- package/toast/README.md +398 -0
- package/toggle/README.md +224 -0
- package/toolbar/README.md +109 -0
- package/tooltip/README.md +274 -0
- package/tree/README.md +708 -0
- package/types/forty-cdk-accordion.d.ts +242 -0
- package/types/forty-cdk-aspect-ratio.d.ts +59 -0
- package/types/forty-cdk-avatar.d.ts +133 -0
- package/types/forty-cdk-breadcrumbs.d.ts +92 -0
- package/types/forty-cdk-breakpoints.d.ts +141 -0
- package/types/forty-cdk-button.d.ts +80 -0
- package/types/forty-cdk-calendar.d.ts +914 -0
- package/types/forty-cdk-carousel.d.ts +530 -0
- package/types/forty-cdk-checkbox.d.ts +141 -0
- package/types/forty-cdk-combobox.d.ts +1259 -0
- package/types/forty-cdk-context-menu.d.ts +313 -0
- package/types/forty-cdk-core.d.ts +5774 -0
- package/types/forty-cdk-date-field.d.ts +307 -0
- package/types/forty-cdk-date-picker.d.ts +622 -0
- package/types/forty-cdk-dialog.d.ts +546 -0
- package/types/forty-cdk-disclosure.d.ts +127 -0
- package/types/forty-cdk-drag-drop.d.ts +456 -0
- package/types/forty-cdk-drawer.d.ts +871 -0
- package/types/forty-cdk-dropdown-menu.d.ts +242 -0
- package/types/forty-cdk-field.d.ts +236 -0
- package/types/forty-cdk-fieldset.d.ts +119 -0
- package/types/forty-cdk-file-upload.d.ts +124 -0
- package/types/forty-cdk-hover-card.d.ts +320 -0
- package/types/forty-cdk-input.d.ts +169 -0
- package/types/forty-cdk-internationalized-date.d.ts +1 -1
- package/types/forty-cdk-listbox.d.ts +513 -0
- package/types/forty-cdk-menu.d.ts +629 -0
- package/types/forty-cdk-menubar.d.ts +451 -0
- package/types/forty-cdk-meter.d.ts +122 -0
- package/types/forty-cdk-navigation-menu.d.ts +514 -0
- package/types/forty-cdk-number-input.d.ts +319 -0
- package/types/forty-cdk-otp-input.d.ts +248 -0
- package/types/forty-cdk-pagination.d.ts +214 -0
- package/types/forty-cdk-pane-resizer.d.ts +145 -0
- package/types/forty-cdk-popover.d.ts +509 -0
- package/types/forty-cdk-progress.d.ts +143 -0
- package/types/forty-cdk-radio-group.d.ts +222 -0
- package/types/forty-cdk-scroll-area.d.ts +258 -0
- package/types/forty-cdk-search.d.ts +142 -0
- package/types/forty-cdk-select.d.ts +899 -0
- package/types/forty-cdk-separator.d.ts +59 -0
- package/types/forty-cdk-signal-forms.d.ts +58 -0
- package/types/forty-cdk-slider.d.ts +379 -0
- package/types/forty-cdk-stepper.d.ts +650 -0
- package/types/forty-cdk-switch.d.ts +87 -0
- package/types/forty-cdk-table.d.ts +723 -0
- package/types/forty-cdk-tabs.d.ts +235 -0
- package/types/forty-cdk-time-field.d.ts +307 -0
- package/types/forty-cdk-time-picker.d.ts +578 -0
- package/types/forty-cdk-toast.d.ts +598 -0
- package/types/forty-cdk-toggle.d.ts +310 -0
- package/types/forty-cdk-toolbar.d.ts +217 -0
- package/types/forty-cdk-tooltip.d.ts +436 -0
- package/types/forty-cdk-tree.d.ts +688 -0
- package/types/forty-cdk.d.ts +1 -19743
|
@@ -0,0 +1,871 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken, Signal, Type, Injector, Provider } from '@angular/core';
|
|
3
|
+
import { ForDrawerSide, VetoableEvent, VetoableNativeEvent, OverlayRef, OverlayManagerEntry, OverlayManagerCore } from 'forty-cdk/core';
|
|
4
|
+
export { ForDrawerSide } from 'forty-cdk/core';
|
|
5
|
+
import * as forty_cdk_drawer from 'forty-cdk/drawer';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A snap point. Three accepted shapes:
|
|
9
|
+
*
|
|
10
|
+
* - `number ∈ [0, 1]` — fraction of the dimension along the dismissal axis.
|
|
11
|
+
* - `'NN%'` — equivalent to a fraction, e.g. `'50%' === 0.5`.
|
|
12
|
+
* - `'NNpx'` — absolute pixel size measured from the anchored edge.
|
|
13
|
+
*/
|
|
14
|
+
type ForDrawerSnapPoint = number | `${number}%` | `${number}px`;
|
|
15
|
+
/**
|
|
16
|
+
* Reasons emitted via the `(dismiss)` output. A single drawer instance can
|
|
17
|
+
* cycle through any of these — the consumer typically just flips its
|
|
18
|
+
* `@if`-gating signal off, but may choose to skip the unmount on specific
|
|
19
|
+
* reasons (e.g. ignore `'pointerDownOutside'` for a sticky drawer).
|
|
20
|
+
*/
|
|
21
|
+
type ForDrawerCloseReason = 'escape' | 'backdrop' | 'pointerDownOutside' | 'focusOutside' | 'closeButton' | 'swipe' | 'programmatic';
|
|
22
|
+
/**
|
|
23
|
+
* Coordination contract owned by `ForDrawer` (declarative) or by the
|
|
24
|
+
* `ForDrawerManager.open()` machinery (programmatic). Title / Description
|
|
25
|
+
* register their generated ids so the drawer wires `aria-labelledby` /
|
|
26
|
+
* `aria-describedby` reactively. Backdrop, Close button and Handle hook
|
|
27
|
+
* into the same surface to request close / register themselves.
|
|
28
|
+
*
|
|
29
|
+
* The drawer's "openness" isn't part of this contract: the directive is
|
|
30
|
+
* mounted iff the drawer is open, so descendants don't need an open
|
|
31
|
+
* signal to coordinate.
|
|
32
|
+
*/
|
|
33
|
+
interface ForDrawerContext {
|
|
34
|
+
readonly dismissible: Signal<boolean>;
|
|
35
|
+
readonly modal: Signal<boolean>;
|
|
36
|
+
readonly alert: Signal<boolean>;
|
|
37
|
+
readonly side: Signal<ForDrawerSide>;
|
|
38
|
+
readonly activeSnapPoint: Signal<ForDrawerSnapPoint | null>;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the backdrop should reflect `data-fade-from-active`. True
|
|
41
|
+
* when `fadeFromIndex` is set and the active snap point is at or past
|
|
42
|
+
* that index. Computed by the root.
|
|
43
|
+
*/
|
|
44
|
+
readonly fadeFromActive: Signal<boolean>;
|
|
45
|
+
/**
|
|
46
|
+
* `true` while a pointer drag gesture is in flight. Mirrors the host's
|
|
47
|
+
* `data-dragging` attribute so pieces portaled away from the surface
|
|
48
|
+
* (the backdrop) can suppress their own transitions during the gesture.
|
|
49
|
+
*/
|
|
50
|
+
readonly dragging: Signal<boolean>;
|
|
51
|
+
/**
|
|
52
|
+
* Progress of the current drag *toward the anchored edge* (dismiss
|
|
53
|
+
* direction), as a fraction `∈ [0, 1]` of the drawer's dimension along
|
|
54
|
+
* the dismissal axis. `0` at rest and while growing away from the edge
|
|
55
|
+
* (with snap points). The backdrop publishes this as the
|
|
56
|
+
* `--for-drawer-drag-progress` custom property so consumers can fade it
|
|
57
|
+
* out as the surface is dragged off-screen — `opacity: calc(1 - var(--for-drawer-drag-progress))`.
|
|
58
|
+
*/
|
|
59
|
+
readonly dragProgress: Signal<number>;
|
|
60
|
+
readonly labelledBy: Signal<string | null>;
|
|
61
|
+
readonly describedBy: Signal<string | null>;
|
|
62
|
+
/**
|
|
63
|
+
* Portal target shared with the backdrop so both resolve the same
|
|
64
|
+
* container. `null` ⇒ `document.body`. Set via the drawer's `container`
|
|
65
|
+
* input; read once per mount.
|
|
66
|
+
*/
|
|
67
|
+
readonly container: Signal<HTMLElement | null>;
|
|
68
|
+
/**
|
|
69
|
+
* Host element of the drawer surface. Exposed so a nested child can
|
|
70
|
+
* register its parent topology with `ForDrawerStack` without piercing
|
|
71
|
+
* Angular DI to fetch the parent's `ElementRef`. Read-only — pieces
|
|
72
|
+
* never mutate the host directly.
|
|
73
|
+
*/
|
|
74
|
+
readonly hostElement: HTMLElement;
|
|
75
|
+
registerLabel(id: string): void;
|
|
76
|
+
unregisterLabel(id: string): void;
|
|
77
|
+
registerDescription(id: string): void;
|
|
78
|
+
unregisterDescription(id: string): void;
|
|
79
|
+
/**
|
|
80
|
+
* Register the visual handle element so that `handleOnly === true`
|
|
81
|
+
* gates the swipe gesture to gestures starting on this element. Pass
|
|
82
|
+
* `null` to unregister.
|
|
83
|
+
*/
|
|
84
|
+
registerHandle(el: HTMLElement | null): void;
|
|
85
|
+
/**
|
|
86
|
+
* Register the backdrop element so the dismissable layer treats it as
|
|
87
|
+
* part of the drawer surface (`exemptElements`) — without this, a
|
|
88
|
+
* `pointerdown` on the portaled backdrop would fire `pointerDownOutside`
|
|
89
|
+
* before the backdrop's `click` handler runs, so the consumer would see
|
|
90
|
+
* close-reason `'pointerDownOutside'` instead of `'backdrop'` (WebKit
|
|
91
|
+
* was the first to surface this; Chromium happened to dispatch the
|
|
92
|
+
* events in an order that masked it). Pass `null` to unregister.
|
|
93
|
+
*/
|
|
94
|
+
registerBackdrop(el: HTMLElement | null): void;
|
|
95
|
+
/**
|
|
96
|
+
* Request that the drawer close. Reasons:
|
|
97
|
+
* - `'escape'` / `'backdrop'` / `'pointerDownOutside'` / `'focusOutside'` /
|
|
98
|
+
* `'swipe'`: honored only when `dismissible()` is true.
|
|
99
|
+
* - `'closeButton'`: always honored.
|
|
100
|
+
* - `'programmatic'`: always honored, used by `ForDrawerManager.open()`
|
|
101
|
+
* consumers that drive close imperatively from a child component.
|
|
102
|
+
*
|
|
103
|
+
* `value` is the close result, propagated to `ForDrawerRef.close(value)`
|
|
104
|
+
* in programmatic mode. Ignored in declarative mode.
|
|
105
|
+
*/
|
|
106
|
+
requestClose(reason: ForDrawerCloseReason, value?: unknown): void;
|
|
107
|
+
}
|
|
108
|
+
declare const FOR_DRAWER_CONTEXT: InjectionToken<ForDrawerContext>;
|
|
109
|
+
/**
|
|
110
|
+
* Drag/release event payloads. Surfaced through `(dragMove)` / `(release)`
|
|
111
|
+
* so consumers can drive bespoke visualizations (e.g. a separate "scaled
|
|
112
|
+
* background" effect, a debug HUD); the directive itself owns transform
|
|
113
|
+
* application and snap resolution.
|
|
114
|
+
*/
|
|
115
|
+
interface ForDrawerDragEvent {
|
|
116
|
+
readonly percentageDragged: number;
|
|
117
|
+
readonly originalEvent: PointerEvent;
|
|
118
|
+
}
|
|
119
|
+
interface ForDrawerReleaseEvent {
|
|
120
|
+
readonly willClose: boolean;
|
|
121
|
+
readonly nextSnapPoint: ForDrawerSnapPoint | null;
|
|
122
|
+
readonly originalEvent: PointerEvent;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Headless implementation of the [WAI-ARIA Modal Dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/),
|
|
127
|
+
* specialised as a side / bottom-sheet drawer with optional swipe-to-dismiss
|
|
128
|
+
* and snap points.
|
|
129
|
+
*
|
|
130
|
+
* Apply `[forDrawer]` on the drawer surface itself — not on a wrapper. The
|
|
131
|
+
* directive moves the host to `document.body` (portal), traps focus, locks
|
|
132
|
+
* body scroll, listens for Escape, and (when `swipeToDismiss` is on) attaches
|
|
133
|
+
* pointer-based swipe handlers that translate the surface and resolve to the
|
|
134
|
+
* nearest snap point or a dismiss on release. `aria-labelledby` and
|
|
135
|
+
* `aria-describedby` wire automatically via `[forDrawerTitle]` /
|
|
136
|
+
* `[forDrawerDescription]`; pass `ariaLabel` instead if you don't render
|
|
137
|
+
* a visible title.
|
|
138
|
+
*
|
|
139
|
+
* Mount/unmount is the consumer's responsibility — the directive does not
|
|
140
|
+
* manage `[hidden]`. Wrap with `@if (open())` and let `animate.enter` /
|
|
141
|
+
* `animate.leave` handle transitions.
|
|
142
|
+
*
|
|
143
|
+
* For programmatic use (open arbitrary components imperatively, manage
|
|
144
|
+
* lifecycle externally), see `ForDrawerManager.open()`.
|
|
145
|
+
*/
|
|
146
|
+
declare class ForDrawer implements ForDrawerContext {
|
|
147
|
+
#private;
|
|
148
|
+
/**
|
|
149
|
+
* Edge the drawer is anchored to. Default `'bottom'` — the most common
|
|
150
|
+
* mobile-first pattern. The keyboard navigation axis (for swipe direction)
|
|
151
|
+
* derives from this, as does the `data-side` attribute on the host.
|
|
152
|
+
*/
|
|
153
|
+
readonly side: _angular_core.InputSignal<ForDrawerSide>;
|
|
154
|
+
/**
|
|
155
|
+
* When true (default), Escape, backdrop click, pointer-down outside,
|
|
156
|
+
* focus outside, and a swipe past the close threshold all emit `(dismiss)`.
|
|
157
|
+
* Disable for confirm flows that must be answered explicitly.
|
|
158
|
+
*/
|
|
159
|
+
readonly dismissible: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
160
|
+
/**
|
|
161
|
+
* When true (default), sets `aria-modal="true"`, locks body scroll, traps
|
|
162
|
+
* focus, and inerts body siblings. Set to `false` for a non-modal
|
|
163
|
+
* navigation drawer that coexists with the rest of the page.
|
|
164
|
+
*/
|
|
165
|
+
readonly modal: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
166
|
+
/** When true, role becomes `alertdialog` (interrupts assistive tech). */
|
|
167
|
+
readonly alert: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
168
|
+
/** When true (default), focus returns to the previously focused element on close. */
|
|
169
|
+
readonly returnFocus: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
170
|
+
/**
|
|
171
|
+
* Where to send focus on mount. `'first'` (default) finds the first
|
|
172
|
+
* focusable descendant; `'container'` focuses the drawer surface itself
|
|
173
|
+
* (useful when there's nothing focusable inside).
|
|
174
|
+
*/
|
|
175
|
+
readonly initialFocus: _angular_core.InputSignal<"first" | "container">;
|
|
176
|
+
/** Manual `aria-label`. Use this when no visible title element exists. */
|
|
177
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
178
|
+
/**
|
|
179
|
+
* Portal target for the surface. Defaults to `document.body`. Pass a
|
|
180
|
+
* positioned (`position: relative`) container — paired with
|
|
181
|
+
* `[modal]="false"` — for a drawer scoped to a region instead of the
|
|
182
|
+
* viewport. Read once at mount (the portal moves the host once); changing
|
|
183
|
+
* it after open has no effect. The backdrop portals to the same container.
|
|
184
|
+
*/
|
|
185
|
+
readonly container: _angular_core.InputSignal<HTMLElement | null>;
|
|
186
|
+
/**
|
|
187
|
+
* Callback invoked just before focus moves into the drawer on mount.
|
|
188
|
+
* `event.preventDefault()` skips the imperative move (Tab cycling and
|
|
189
|
+
* return-focus capture still wire up). See Dialog for the same shape and
|
|
190
|
+
* the rationale for `input<>` rather than `output<>` on free-floating
|
|
191
|
+
* overlays.
|
|
192
|
+
*/
|
|
193
|
+
readonly autoFocusOnOpen: _angular_core.InputSignal<((event: VetoableEvent) => void) | undefined>;
|
|
194
|
+
/**
|
|
195
|
+
* Callback invoked just before focus returns to the previously focused
|
|
196
|
+
* element on unmount. `event.preventDefault()` skips the return-focus.
|
|
197
|
+
*/
|
|
198
|
+
readonly autoFocusOnClose: _angular_core.InputSignal<((event: VetoableEvent) => void) | undefined>;
|
|
199
|
+
/** When true (default), swipe toward the anchored edge dismisses past `closeThreshold`. */
|
|
200
|
+
readonly swipeToDismiss: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
201
|
+
/**
|
|
202
|
+
* Fraction past which a release dismisses instead of snapping back.
|
|
203
|
+
* Default `0.25`. Without `snapPoints` it is a fraction of the
|
|
204
|
+
* full drawer dimension along the dismissal axis (dragged > 25% of the
|
|
205
|
+
* surface size toward the edge dismisses); with `snapPoints` it is a
|
|
206
|
+
* fraction of the **lowest snap's** extent, so a small "peek" snap stays
|
|
207
|
+
* dismissable without dragging it entirely off-screen.
|
|
208
|
+
*/
|
|
209
|
+
readonly closeThreshold: _angular_core.InputSignal<number>;
|
|
210
|
+
/**
|
|
211
|
+
* When true, the swipe gesture only arms on a pointerdown that started on
|
|
212
|
+
* the registered `[forDrawerHandle]` element. Useful when the surface
|
|
213
|
+
* contains scrollable content that should keep its scroll gesture.
|
|
214
|
+
*/
|
|
215
|
+
readonly handleOnly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
216
|
+
/**
|
|
217
|
+
* When true, asks the registered `[forDrawerWrapper]` to scale and
|
|
218
|
+
* translate behind this drawer (the "scale background" effect). No
|
|
219
|
+
* effect under `prefers-reduced-motion: reduce`, and a no-op if no
|
|
220
|
+
* wrapper is mounted. Default `false` so existing consumers are
|
|
221
|
+
* untouched.
|
|
222
|
+
*/
|
|
223
|
+
readonly scaleBackground: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
224
|
+
/**
|
|
225
|
+
* When true (default) and `scaleBackground` is active, paints
|
|
226
|
+
* `<body>` with `scaleBackgroundColor` so the gap between the scaled
|
|
227
|
+
* wrapper and the viewport edge does not show through. Only applies
|
|
228
|
+
* when `scaleBackground` is `true`.
|
|
229
|
+
*/
|
|
230
|
+
readonly setBackgroundColorOnScale: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
231
|
+
/**
|
|
232
|
+
* Snap points: each entry is a `number ∈ [0, 1]`,
|
|
233
|
+
* a `'NN%'` string, or a `'NNpx'` string. Strictly increasing
|
|
234
|
+
* (closest-to-edge first). The surface settles at the nearest snap on
|
|
235
|
+
* release; dragging past the lowest snap by `closeThreshold` of that
|
|
236
|
+
* snap's own extent dismisses.
|
|
237
|
+
*/
|
|
238
|
+
readonly snapPoints: _angular_core.InputSignal<readonly ForDrawerSnapPoint[] | undefined>;
|
|
239
|
+
/**
|
|
240
|
+
* Active snap point. Two-way bindable: write via `[(activeSnapPoint)]`
|
|
241
|
+
* to drive the surface programmatically, or just read for analytics.
|
|
242
|
+
* Initialised to `snapPoints?.[0]` on mount when the consumer left it
|
|
243
|
+
* `null`. The implicit `(activeSnapPointChange)` emitter fires on
|
|
244
|
+
* internal transitions (mount-time default and drag release), and
|
|
245
|
+
* stays silent on consumer writes through `[(activeSnapPoint)]`.
|
|
246
|
+
*/
|
|
247
|
+
readonly activeSnapPoint: _angular_core.ModelSignal<ForDrawerSnapPoint | null>;
|
|
248
|
+
/**
|
|
249
|
+
* First index of `snapPoints` from which the backdrop should reflect
|
|
250
|
+
* `data-fade-from-active`. Consumers tie a CSS opacity transition to
|
|
251
|
+
* that attribute. Out-of-range values throw on mount.
|
|
252
|
+
*/
|
|
253
|
+
readonly fadeFromIndex: _angular_core.InputSignal<number | undefined>;
|
|
254
|
+
/**
|
|
255
|
+
* Emitted when the drawer wants to close. Consumer wires this to flip
|
|
256
|
+
* the signal that gates the surrounding `@if`.
|
|
257
|
+
*/
|
|
258
|
+
readonly dismiss: _angular_core.OutputEmitterRef<ForDrawerCloseReason>;
|
|
259
|
+
/** Vetoable Escape. `preventDefault()` suppresses the auto `(dismiss)`. */
|
|
260
|
+
readonly escapeKeyDown: _angular_core.OutputEmitterRef<VetoableNativeEvent<KeyboardEvent>>;
|
|
261
|
+
/** Vetoable pointer-down outside. `preventDefault()` suppresses the auto `(dismiss)`. */
|
|
262
|
+
readonly pointerDownOutside: _angular_core.OutputEmitterRef<VetoableNativeEvent<PointerEvent>>;
|
|
263
|
+
/** Vetoable focus-outside. `preventDefault()` suppresses the auto `(dismiss)`. */
|
|
264
|
+
readonly focusOutside: _angular_core.OutputEmitterRef<VetoableNativeEvent<FocusEvent>>;
|
|
265
|
+
/**
|
|
266
|
+
* Composite event: fires alongside `pointerDownOutside` and `focusOutside`
|
|
267
|
+
* and shares their veto state — `preventDefault()` on either suppresses
|
|
268
|
+
* the auto `(dismiss)`.
|
|
269
|
+
*/
|
|
270
|
+
readonly interactOutside: _angular_core.OutputEmitterRef<VetoableNativeEvent<PointerEvent | FocusEvent>>;
|
|
271
|
+
/** Drag stream. `percentageDragged` ∈ `[0, 1]`. */
|
|
272
|
+
readonly dragMove: _angular_core.OutputEmitterRef<ForDrawerDragEvent>;
|
|
273
|
+
/** Release event. The directive has already updated `activeSnapPoint` / requested close. */
|
|
274
|
+
readonly release: _angular_core.OutputEmitterRef<ForDrawerReleaseEvent>;
|
|
275
|
+
readonly labelledBy: _angular_core.Signal<string | null>;
|
|
276
|
+
readonly describedBy: _angular_core.Signal<string | null>;
|
|
277
|
+
readonly activeSnapPointAttr: _angular_core.Signal<string | null>;
|
|
278
|
+
readonly fadeFromActive: _angular_core.Signal<boolean>;
|
|
279
|
+
/**
|
|
280
|
+
* `true` while a pointer drag gesture is in flight. Mirrors the host's
|
|
281
|
+
* `data-dragging` attribute; surfaced through `ForDrawerContext` so pieces
|
|
282
|
+
* portaled away from the surface (the backdrop) can suppress their own
|
|
283
|
+
* transitions during the gesture.
|
|
284
|
+
*/
|
|
285
|
+
readonly dragging: _angular_core.Signal<boolean>;
|
|
286
|
+
/**
|
|
287
|
+
* Progress of the current drag toward the anchored edge, `∈ [0, 1]`.
|
|
288
|
+
* Surfaced through `ForDrawerContext` so the backdrop can publish it as the
|
|
289
|
+
* `--for-drawer-drag-progress` custom property.
|
|
290
|
+
*/
|
|
291
|
+
readonly dragProgress: _angular_core.Signal<number>;
|
|
292
|
+
/**
|
|
293
|
+
* Live drag displacement as a CSS `translate` value (`"<x> <y>"`),
|
|
294
|
+
* published on the host as the `--for-drawer-translate` custom property by
|
|
295
|
+
* the gesture engine. The consumer composes it on the surface with
|
|
296
|
+
* `translate: var(--for-drawer-translate, 0px 0px)`.
|
|
297
|
+
*
|
|
298
|
+
* A **custom property** is used (rather than writing `translate` /
|
|
299
|
+
* `transform` directly) because `transform` is reserved for
|
|
300
|
+
* `ForDrawerScaleCoordinator` and a directly-written inline `translate` is
|
|
301
|
+
* dropped by Angular when the consumer also binds a template `[style.*]` on
|
|
302
|
+
* the same host. `"0px 0px"` at rest; the write rides the same change-
|
|
303
|
+
* detection pass as the `data-dragging` / `data-active-snap-point` changes
|
|
304
|
+
* on release so the consumer's `transition: translate` animates back in
|
|
305
|
+
* lockstep with the snap transition rather than jumping to the old rest
|
|
306
|
+
* position first.
|
|
307
|
+
*/
|
|
308
|
+
readonly dragTranslate: _angular_core.Signal<string>;
|
|
309
|
+
/** Host element of this drawer surface — exposed via `ForDrawerContext`. */
|
|
310
|
+
get hostElement(): HTMLElement;
|
|
311
|
+
readonly depthAttr: _angular_core.Signal<string>;
|
|
312
|
+
/**
|
|
313
|
+
* `true` while at least one descendant `[forDrawer]` is registered with
|
|
314
|
+
* `ForDrawerStack` underneath this one — reflected as
|
|
315
|
+
* `data-state-nested="true"`. The actual nested-visual transform
|
|
316
|
+
* (`scale + translate3d`) on the parent surface is owned by
|
|
317
|
+
* `ForDrawerScaleCoordinator`, which subscribes to the same stack
|
|
318
|
+
* signal and applies the inline `style.transform` once per affected
|
|
319
|
+
* host. The check is one-level (direct child) because the visual
|
|
320
|
+
* contract only cares about whether *some* child is currently covering
|
|
321
|
+
* this drawer; deeper descendants cascade naturally through their own
|
|
322
|
+
* ancestor chain.
|
|
323
|
+
*/
|
|
324
|
+
readonly hasChild: _angular_core.Signal<boolean>;
|
|
325
|
+
/**
|
|
326
|
+
* Reflected as `data-scale-background` on the host: `true` when the
|
|
327
|
+
* directive opted into the effect AND the coordinator is currently
|
|
328
|
+
* applying it (wrapper registered, not under reduced-motion). Lets
|
|
329
|
+
* consumers style the drawer differently in scale mode (e.g. larger
|
|
330
|
+
* corner radii) without polling the coordinator.
|
|
331
|
+
*/
|
|
332
|
+
readonly scaleBackgroundActive: _angular_core.Signal<boolean>;
|
|
333
|
+
constructor();
|
|
334
|
+
registerLabel(id: string): void;
|
|
335
|
+
unregisterLabel(id: string): void;
|
|
336
|
+
registerDescription(id: string): void;
|
|
337
|
+
unregisterDescription(id: string): void;
|
|
338
|
+
registerHandle(el: HTMLElement | null): void;
|
|
339
|
+
registerBackdrop(el: HTMLElement | null): void;
|
|
340
|
+
requestClose(reason: ForDrawerCloseReason, value?: unknown): void;
|
|
341
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForDrawer, never>;
|
|
342
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForDrawer, "[forDrawer]", ["forDrawer"], { "side": { "alias": "side"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "alert": { "alias": "alert"; "required": false; "isSignal": true; }; "returnFocus": { "alias": "returnFocus"; "required": false; "isSignal": true; }; "initialFocus": { "alias": "initialFocus"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "container": { "alias": "container"; "required": false; "isSignal": true; }; "autoFocusOnOpen": { "alias": "autoFocusOnOpen"; "required": false; "isSignal": true; }; "autoFocusOnClose": { "alias": "autoFocusOnClose"; "required": false; "isSignal": true; }; "swipeToDismiss": { "alias": "swipeToDismiss"; "required": false; "isSignal": true; }; "closeThreshold": { "alias": "closeThreshold"; "required": false; "isSignal": true; }; "handleOnly": { "alias": "handleOnly"; "required": false; "isSignal": true; }; "scaleBackground": { "alias": "scaleBackground"; "required": false; "isSignal": true; }; "setBackgroundColorOnScale": { "alias": "setBackgroundColorOnScale"; "required": false; "isSignal": true; }; "snapPoints": { "alias": "snapPoints"; "required": false; "isSignal": true; }; "activeSnapPoint": { "alias": "activeSnapPoint"; "required": false; "isSignal": true; }; "fadeFromIndex": { "alias": "fadeFromIndex"; "required": false; "isSignal": true; }; }, { "activeSnapPoint": "activeSnapPointChange"; "dismiss": "dismiss"; "escapeKeyDown": "escapeKeyDown"; "pointerDownOutside": "pointerDownOutside"; "focusOutside": "focusOutside"; "interactOutside": "interactOutside"; "dragMove": "dragMove"; "release": "release"; }, never, never, true, never>;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Button that toggles the drawer when clicked. Apply on a focusable element —
|
|
347
|
+
* preferably a `<button>` — so keyboard users can reach it.
|
|
348
|
+
*
|
|
349
|
+
* Wires `aria-haspopup="dialog"`, `aria-expanded`, `aria-controls`, and
|
|
350
|
+
* `data-state` on the host. Two-way bind `[(open)]` to the same signal that
|
|
351
|
+
* gates the surrounding `@if` around `[forDrawer]`. Focus return is owned
|
|
352
|
+
* by `[forDrawer]` (modal mode captures the previously-focused element on
|
|
353
|
+
* mount and restores it on destroy).
|
|
354
|
+
*
|
|
355
|
+
* ```html
|
|
356
|
+
* <button forDrawerTrigger [(open)]="drawerOpen" controls="my-drawer">Open</button>
|
|
357
|
+
* @if (drawerOpen()) {
|
|
358
|
+
* <div forDrawer id="my-drawer" (dismiss)="drawerOpen.set(false)">…</div>
|
|
359
|
+
* }
|
|
360
|
+
* ```
|
|
361
|
+
*/
|
|
362
|
+
declare class ForDrawerTrigger {
|
|
363
|
+
#private;
|
|
364
|
+
/**
|
|
365
|
+
* Two-way bindable. Bind to the same signal that gates the surrounding
|
|
366
|
+
* `@if` around `[forDrawer]`. The `model()` change emitter
|
|
367
|
+
* (`(openChange)`) fires only on internal transitions (trigger click).
|
|
368
|
+
*/
|
|
369
|
+
readonly open: _angular_core.ModelSignal<boolean>;
|
|
370
|
+
/**
|
|
371
|
+
* Id of the controlled drawer surface. Mirrored to `aria-controls` while
|
|
372
|
+
* the drawer is open. The consumer is responsible for setting the same
|
|
373
|
+
* `id` on `[forDrawer]`.
|
|
374
|
+
*/
|
|
375
|
+
readonly controls: _angular_core.InputSignal<string | null>;
|
|
376
|
+
/**
|
|
377
|
+
* When true, click is ignored and the host reflects `data-disabled=""`,
|
|
378
|
+
* `aria-disabled="true"`, and the native `disabled` attribute so the
|
|
379
|
+
* trigger is announced as disabled by assistive tech and dropped from
|
|
380
|
+
* the tab order.
|
|
381
|
+
*/
|
|
382
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
383
|
+
constructor();
|
|
384
|
+
protected onClick(): void;
|
|
385
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForDrawerTrigger, never>;
|
|
386
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForDrawerTrigger, "[forDrawerTrigger]", ["forDrawerTrigger"], { "open": { "alias": "open"; "required": false; "isSignal": true; }; "controls": { "alias": "controls"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "open": "openChange"; }, never, never, true, never>;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Optional backdrop overlay. Portaled to `document.body` so it sits
|
|
391
|
+
* underneath the drawer regardless of where it's declared. While mounted
|
|
392
|
+
* the backdrop is visible; mount/unmount it alongside the drawer with the
|
|
393
|
+
* same `@if` so `animate.enter` / `animate.leave` works on both.
|
|
394
|
+
*
|
|
395
|
+
* Reflects `data-fade-from-active` when `fadeFromIndex` on the drawer root
|
|
396
|
+
* is set and the active snap point is at or past that index — consumers
|
|
397
|
+
* tie this to a CSS opacity transition for the "backdrop fades
|
|
398
|
+
* in once you snap up past N" effect.
|
|
399
|
+
*
|
|
400
|
+
* Publishes the live drag progress toward the anchored edge as the
|
|
401
|
+
* `--for-drawer-drag-progress` custom property (`0` at rest → `1` fully
|
|
402
|
+
* dragged off-screen) and mirrors the surface's `data-dragging` attribute.
|
|
403
|
+
* Together these drive the "backdrop fades out as you swipe to
|
|
404
|
+
* dismiss" effect with pure CSS:
|
|
405
|
+
*
|
|
406
|
+
* ```css
|
|
407
|
+
* [forDrawerBackdrop] {
|
|
408
|
+
* opacity: calc(1 - var(--for-drawer-drag-progress, 0));
|
|
409
|
+
* transition: opacity 0.3s ease;
|
|
410
|
+
* }
|
|
411
|
+
* [forDrawerBackdrop][data-dragging] {
|
|
412
|
+
* transition: none; \/* track the pointer 1:1 *\/
|
|
413
|
+
* }
|
|
414
|
+
* ```
|
|
415
|
+
*
|
|
416
|
+
* The directive applies no visual styles itself.
|
|
417
|
+
*/
|
|
418
|
+
declare class ForDrawerBackdrop {
|
|
419
|
+
#private;
|
|
420
|
+
protected readonly ctx: forty_cdk_drawer.ForDrawerContext;
|
|
421
|
+
/**
|
|
422
|
+
* Per-instance drawer id when opened through `ForDrawerManager` (reflected
|
|
423
|
+
* as `data-for-drawer-id` so the manager can pair this portaled backdrop
|
|
424
|
+
* with its drawer and drive its exit animation). `null` in the declarative
|
|
425
|
+
* path, where the host binding emits no attribute.
|
|
426
|
+
*/
|
|
427
|
+
protected readonly instanceId: string | null;
|
|
428
|
+
constructor();
|
|
429
|
+
protected onClick(event: MouseEvent): void;
|
|
430
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForDrawerBackdrop, never>;
|
|
431
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForDrawerBackdrop, "[forDrawerBackdrop]", ["forDrawerBackdrop"], {}, {}, never, never, true, never>;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Visual swipe handle (the "grabber" pill at the top of a bottom sheet).
|
|
436
|
+
* Registers itself with the drawer so that `[handleOnly]="true"` can scope
|
|
437
|
+
* the swipe gesture to gestures starting on this element. Reflects
|
|
438
|
+
* `aria-hidden="true"` because the handle is a decorative styling target —
|
|
439
|
+
* keyboard users dismiss via Escape / a `[forDrawerClose]` button.
|
|
440
|
+
*
|
|
441
|
+
* Apply on the visual handle element. Applies no styles itself; the
|
|
442
|
+
* consumer is responsible for sizing, positioning, and color.
|
|
443
|
+
*/
|
|
444
|
+
declare class ForDrawerHandle {
|
|
445
|
+
#private;
|
|
446
|
+
constructor();
|
|
447
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForDrawerHandle, never>;
|
|
448
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForDrawerHandle, "[forDrawerHandle]", ["forDrawerHandle"], {}, {}, never, never, true, never>;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Convenience: gives the host element a stable id and registers it as the
|
|
453
|
+
* drawer's accessible name (`aria-labelledby`). Apply on a heading element
|
|
454
|
+
* (`<h2>`, `<h3>`...) inside `[forDrawer]`.
|
|
455
|
+
*
|
|
456
|
+
* If you don't render visible title text, omit this and pass `ariaLabel`
|
|
457
|
+
* on the drawer root instead.
|
|
458
|
+
*/
|
|
459
|
+
declare class ForDrawerTitle {
|
|
460
|
+
protected readonly id: _angular_core.Signal<string>;
|
|
461
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForDrawerTitle, never>;
|
|
462
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForDrawerTitle, "[forDrawerTitle]", ["forDrawerTitle"], {}, {}, never, never, true, never>;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Convenience: gives the host element a stable id and registers it as the
|
|
467
|
+
* drawer's accessible description (`aria-describedby`). Apply on a `<p>` or
|
|
468
|
+
* other element inside `[forDrawer]`. Optional — only use when there's
|
|
469
|
+
* non-title supporting copy.
|
|
470
|
+
*/
|
|
471
|
+
declare class ForDrawerDescription {
|
|
472
|
+
protected readonly id: _angular_core.Signal<string>;
|
|
473
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForDrawerDescription, never>;
|
|
474
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForDrawerDescription, "[forDrawerDescription]", ["forDrawerDescription"], {}, {}, never, never, true, never>;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Button that closes the surrounding drawer when clicked. Apply on a
|
|
479
|
+
* `<button>` inside `[forDrawer]`. Pass `[closeWith]` to propagate a return
|
|
480
|
+
* value to `ForDrawerRef.close()` in programmatic usage; ignored in
|
|
481
|
+
* declarative usage.
|
|
482
|
+
*/
|
|
483
|
+
declare class ForDrawerClose {
|
|
484
|
+
#private;
|
|
485
|
+
/** Optional value passed to `ForDrawerRef.close()` (programmatic mode). */
|
|
486
|
+
readonly closeWith: _angular_core.InputSignal<unknown>;
|
|
487
|
+
protected onClick(): void;
|
|
488
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForDrawerClose, never>;
|
|
489
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForDrawerClose, "[forDrawerClose]", ["forDrawerClose"], { "closeWith": { "alias": "closeWith"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Marks the consumer's app-shell wrapper so {@link ForDrawer}'s
|
|
494
|
+
* `scaleBackground` effect can transform the rest of the page when a
|
|
495
|
+
* drawer opens — applied through Angular DI rather than a global selector.
|
|
496
|
+
*
|
|
497
|
+
* Apply on the element that contains everything the drawer should appear
|
|
498
|
+
* to recede behind (typically the root shell). Reflects
|
|
499
|
+
* `data-state="scaled"` while the effect is active and `"idle"` at rest
|
|
500
|
+
* — useful for layering CSS styling without re-querying the coordinator.
|
|
501
|
+
*
|
|
502
|
+
* Only one wrapper may be registered at a time; mounting a second
|
|
503
|
+
* `[forDrawerWrapper]` while another is alive throws. Drawers that opt
|
|
504
|
+
* into `scaleBackground` without a registered wrapper are a no-op (no
|
|
505
|
+
* effect applied) so test composition and partial consumer adoption
|
|
506
|
+
* remain safe.
|
|
507
|
+
*/
|
|
508
|
+
declare class ForDrawerWrapper {
|
|
509
|
+
#private;
|
|
510
|
+
/** `'scaled'` while the coordinator is applying the effect, otherwise `'idle'`. */
|
|
511
|
+
readonly state: _angular_core.Signal<"scaled" | "idle">;
|
|
512
|
+
constructor();
|
|
513
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForDrawerWrapper, never>;
|
|
514
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ForDrawerWrapper, "[forDrawerWrapper]", ["forDrawerWrapper"], {}, {}, never, never, true, never>;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Handle returned by `ForDrawerManager.open()`. Inject inside the opened
|
|
519
|
+
* component to drive close imperatively. Both reactive (`isClosed`, `result`)
|
|
520
|
+
* and awaitable (`closed`) APIs are exposed — pick what fits the call site.
|
|
521
|
+
*
|
|
522
|
+
* `R` is the close-result type. Default `unknown`; specify it on
|
|
523
|
+
* `manager.open<C, R>(...)` to get type safety.
|
|
524
|
+
*/
|
|
525
|
+
declare class ForDrawerRef<R = unknown> extends OverlayRef<R> {
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Shape of a single open drawer entry stored in the manager.
|
|
530
|
+
*
|
|
531
|
+
* Internal — not re-exported from `public-api.ts`.
|
|
532
|
+
*/
|
|
533
|
+
interface ForDrawerEntry extends OverlayManagerEntry {
|
|
534
|
+
readonly component: Type<unknown>;
|
|
535
|
+
readonly hostClass: string;
|
|
536
|
+
readonly side: ForDrawerSide | undefined;
|
|
537
|
+
readonly dismissible: boolean | undefined;
|
|
538
|
+
readonly modal: boolean | undefined;
|
|
539
|
+
readonly alert: boolean | undefined;
|
|
540
|
+
readonly returnFocus: boolean | undefined;
|
|
541
|
+
readonly initialFocus: 'first' | 'container' | undefined;
|
|
542
|
+
readonly ariaLabel: string | undefined;
|
|
543
|
+
readonly container: HTMLElement | null | undefined;
|
|
544
|
+
readonly animateEnter: string | undefined;
|
|
545
|
+
readonly autoFocusOnOpen: ((e: VetoableEvent) => void) | undefined;
|
|
546
|
+
readonly autoFocusOnClose: ((e: VetoableEvent) => void) | undefined;
|
|
547
|
+
readonly swipeToDismiss: boolean | undefined;
|
|
548
|
+
readonly closeThreshold: number | undefined;
|
|
549
|
+
readonly handleOnly: boolean | undefined;
|
|
550
|
+
readonly scaleBackground: boolean | undefined;
|
|
551
|
+
readonly setBackgroundColorOnScale: boolean | undefined;
|
|
552
|
+
readonly snapPoints: ReadonlyArray<ForDrawerSnapPoint> | undefined;
|
|
553
|
+
readonly activeSnapPoint: ForDrawerSnapPoint | undefined;
|
|
554
|
+
readonly fadeFromIndex: number | undefined;
|
|
555
|
+
readonly escapeKeyDown: ((e: VetoableNativeEvent<KeyboardEvent>) => void) | undefined;
|
|
556
|
+
readonly pointerDownOutside: ((e: VetoableNativeEvent<PointerEvent>) => void) | undefined;
|
|
557
|
+
readonly focusOutside: ((e: VetoableNativeEvent<FocusEvent>) => void) | undefined;
|
|
558
|
+
readonly interactOutside: ((e: VetoableNativeEvent<PointerEvent | FocusEvent>) => void) | undefined;
|
|
559
|
+
readonly onDrag: ((e: ForDrawerDragEvent) => void) | undefined;
|
|
560
|
+
readonly onRelease: ((e: ForDrawerReleaseEvent) => void) | undefined;
|
|
561
|
+
readonly onActiveSnapPointChange: ((snap: ForDrawerSnapPoint | null) => void) | undefined;
|
|
562
|
+
handleClose(value: unknown): void;
|
|
563
|
+
injectorFor(parent: Injector): Injector;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Injection token for the `data` payload passed to `ForDrawerManager.open(component, { data })`.
|
|
568
|
+
* Inject inside the opened component:
|
|
569
|
+
*
|
|
570
|
+
* ```ts
|
|
571
|
+
* readonly data = inject(FOR_DRAWER_DATA) as MyShape;
|
|
572
|
+
* ```
|
|
573
|
+
*
|
|
574
|
+
* Prefer `injectDrawerData<T>()` for typed access without manual casts.
|
|
575
|
+
*/
|
|
576
|
+
declare const FOR_DRAWER_DATA: InjectionToken<unknown>;
|
|
577
|
+
/** Typed accessor for the `data` payload. Equivalent to `inject(FOR_DRAWER_DATA) as T`. */
|
|
578
|
+
declare function injectDrawerData<T = unknown>(): T;
|
|
579
|
+
interface ForDrawerOpenConfig<D = unknown> {
|
|
580
|
+
/** Payload available inside the drawer component via `injectDrawerData<T>()`. */
|
|
581
|
+
data?: D;
|
|
582
|
+
/** Edge the drawer is anchored to. Default `'bottom'`. */
|
|
583
|
+
side?: ForDrawerSide;
|
|
584
|
+
/** When true (default), Escape / backdrop / pointer-down outside / swipe close the drawer. */
|
|
585
|
+
dismissible?: boolean;
|
|
586
|
+
/** When true (default), set `aria-modal`, lock body scroll, trap focus. */
|
|
587
|
+
modal?: boolean;
|
|
588
|
+
/** When true, role becomes `alertdialog` instead of `dialog`. Default `false`. */
|
|
589
|
+
alert?: boolean;
|
|
590
|
+
/** When true (default), focus returns to the previously focused element on close. */
|
|
591
|
+
returnFocus?: boolean;
|
|
592
|
+
/** Where to send focus on open. Default `'first'`. */
|
|
593
|
+
initialFocus?: 'first' | 'container';
|
|
594
|
+
/** Manual `aria-label`. Use when no visible title element is rendered. */
|
|
595
|
+
ariaLabel?: string;
|
|
596
|
+
/**
|
|
597
|
+
* Portal target for the surface + backdrop. Defaults to `document.body`.
|
|
598
|
+
* Pair with `modal: false` for a drawer scoped to a positioned region
|
|
599
|
+
* instead of the viewport.
|
|
600
|
+
*/
|
|
601
|
+
container?: HTMLElement | null;
|
|
602
|
+
/**
|
|
603
|
+
* CSS class applied (via `animate.enter`) to the overlay root the moment it
|
|
604
|
+
* mounts, so a programmatic drawer plays an enter animation just like a
|
|
605
|
+
* declarative `<div forDrawer animate.enter="…">`. The class lands on the
|
|
606
|
+
* same `[forDrawer]` host as {@link class}. Falls back to
|
|
607
|
+
* `provideForDrawerDefaults({ animateEnter })`.
|
|
608
|
+
*/
|
|
609
|
+
animateEnter?: string;
|
|
610
|
+
/**
|
|
611
|
+
* CSS class applied to the overlay root when `close()` is called. The manager
|
|
612
|
+
* keeps the host mounted with this class until its CSS animations /
|
|
613
|
+
* transitions finish, then tears the drawer down — so a programmatic drawer
|
|
614
|
+
* plays an exit animation. `close()` still resolves its promise and flips
|
|
615
|
+
* `isClosed()` immediately; only the visual teardown waits. With no class (or
|
|
616
|
+
* no animation, or under `prefers-reduced-motion`), close is immediate. Falls
|
|
617
|
+
* back to `provideForDrawerDefaults({ animateLeave })`.
|
|
618
|
+
*/
|
|
619
|
+
animateLeave?: string;
|
|
620
|
+
/**
|
|
621
|
+
* Exit-animation class for the portaled `[forDrawerBackdrop]`: the manager
|
|
622
|
+
* adds it when `close()` is called and keeps the backdrop mounted until the
|
|
623
|
+
* animation finishes, so the backdrop fades out in lockstep with the host.
|
|
624
|
+
*
|
|
625
|
+
* The split with the enter animation is intentional, not an oversight.
|
|
626
|
+
* Declare the backdrop's **enter** with `animate.enter="…"` on the element
|
|
627
|
+
* itself — it fires on mount, which Angular runs normally even inside the
|
|
628
|
+
* manager's `ngComponentOutlet` — and declare only its **leave** here. A
|
|
629
|
+
* template `animate.leave` on the backdrop never fires under the manager:
|
|
630
|
+
* Angular does not run leave animations across the `ngComponentOutlet` the
|
|
631
|
+
* opened component is mounted through. (The host sheet is symmetric — both
|
|
632
|
+
* `animateEnter` and `animateLeave` are config, since the manager owns that
|
|
633
|
+
* element.) Falls back to `provideForDrawerDefaults({ backdropAnimateLeave })`.
|
|
634
|
+
*/
|
|
635
|
+
backdropAnimateLeave?: string;
|
|
636
|
+
/** When true (default), pointer drag past `closeThreshold` dismisses. */
|
|
637
|
+
swipeToDismiss?: boolean;
|
|
638
|
+
/** Fraction of dimension past which a release dismisses. Default `0.25`. */
|
|
639
|
+
closeThreshold?: number;
|
|
640
|
+
/** When true, swipe only arms on a registered handle element. Default `false`. */
|
|
641
|
+
handleOnly?: boolean;
|
|
642
|
+
/**
|
|
643
|
+
* When true, asks the registered `[forDrawerWrapper]` to scale and translate
|
|
644
|
+
* behind this drawer (the "scale background" effect). No effect under
|
|
645
|
+
* `prefers-reduced-motion: reduce`, and a no-op if no wrapper is mounted.
|
|
646
|
+
*/
|
|
647
|
+
scaleBackground?: boolean;
|
|
648
|
+
/**
|
|
649
|
+
* When true (default) and `scaleBackground` is active, paints `<body>` with
|
|
650
|
+
* `scaleBackgroundColor` so the gap between the scaled wrapper and the
|
|
651
|
+
* viewport edge does not show through.
|
|
652
|
+
*/
|
|
653
|
+
setBackgroundColorOnScale?: boolean;
|
|
654
|
+
/** Snap points. Optional. */
|
|
655
|
+
snapPoints?: ReadonlyArray<ForDrawerSnapPoint>;
|
|
656
|
+
/** Initial snap point at open time. Defaults to `snapPoints?.[0]`. */
|
|
657
|
+
defaultSnapPoint?: ForDrawerSnapPoint;
|
|
658
|
+
/** First snap-point index from which the backdrop reflects `data-fade-from-active`. */
|
|
659
|
+
fadeFromIndex?: number;
|
|
660
|
+
/**
|
|
661
|
+
* Consumer CSS class(es) applied to the overlay root (the `[forDrawer]`
|
|
662
|
+
* host). Pass a single class (`'my-drawer'`) or a space-separated string.
|
|
663
|
+
* Merged with the directive's own host attributes — it never clobbers
|
|
664
|
+
* `data-side` / `data-state` / the `--for-drawer-translate` custom property.
|
|
665
|
+
*
|
|
666
|
+
* Use this to carry design-system classes onto a programmatic drawer,
|
|
667
|
+
* including positioning CSS keyed on `data-side` (e.g.
|
|
668
|
+
* `.my-drawer[data-side='bottom']`). It replaces the
|
|
669
|
+
* `inject(FOR_DRAWER_CONTEXT).hostElement.classList.add(...)` workaround.
|
|
670
|
+
* For multiple classes as an array, prefer {@link classList}.
|
|
671
|
+
*/
|
|
672
|
+
class?: string;
|
|
673
|
+
/**
|
|
674
|
+
* Consumer CSS class(es) applied to the overlay root, as an array
|
|
675
|
+
* (`['my-drawer', 'my-drawer--lg']`) or a space-separated string. Merged
|
|
676
|
+
* with {@link class} and with the directive's own host attributes.
|
|
677
|
+
*/
|
|
678
|
+
classList?: string | readonly string[];
|
|
679
|
+
/** Extra providers for the opened component's injector. */
|
|
680
|
+
providers?: Provider[];
|
|
681
|
+
/**
|
|
682
|
+
* Fires just before the drawer moves focus into itself on mount.
|
|
683
|
+
* Call `event.preventDefault()` to skip the imperative focus move.
|
|
684
|
+
*/
|
|
685
|
+
autoFocusOnOpen?: (event: VetoableEvent) => void;
|
|
686
|
+
/**
|
|
687
|
+
* Fires just before focus returns to the previously focused element
|
|
688
|
+
* on unmount. Call `event.preventDefault()` to skip the return-focus.
|
|
689
|
+
*/
|
|
690
|
+
autoFocusOnClose?: (event: VetoableEvent) => void;
|
|
691
|
+
/**
|
|
692
|
+
* Per-channel dismiss hook mirroring the declarative `(escapeKeyDown)`
|
|
693
|
+
* output. Fires when Escape is pressed while this drawer is the topmost
|
|
694
|
+
* dismissable layer. Call `event.preventDefault()` on the veto to suppress
|
|
695
|
+
* the implicit close while keeping the other dismiss channels live. The
|
|
696
|
+
* original `KeyboardEvent` is on `.event`.
|
|
697
|
+
*/
|
|
698
|
+
escapeKeyDown?: (event: VetoableNativeEvent<KeyboardEvent>) => void;
|
|
699
|
+
/**
|
|
700
|
+
* Per-channel dismiss hook mirroring the declarative `(pointerDownOutside)`
|
|
701
|
+
* output. Fires when a pointer goes down outside the drawer. Call
|
|
702
|
+
* `event.preventDefault()` on the veto to suppress the implicit close. The
|
|
703
|
+
* native `PointerEvent` is on `.event`.
|
|
704
|
+
*/
|
|
705
|
+
pointerDownOutside?: (event: VetoableNativeEvent<PointerEvent>) => void;
|
|
706
|
+
/**
|
|
707
|
+
* Per-channel dismiss hook mirroring the declarative `(focusOutside)`
|
|
708
|
+
* output. Fires when focus moves outside the drawer. Call
|
|
709
|
+
* `event.preventDefault()` on the veto to suppress the implicit close. The
|
|
710
|
+
* native `FocusEvent` is on `.event`.
|
|
711
|
+
*/
|
|
712
|
+
focusOutside?: (event: VetoableNativeEvent<FocusEvent>) => void;
|
|
713
|
+
/**
|
|
714
|
+
* Composite dismiss hook mirroring the declarative `(interactOutside)`
|
|
715
|
+
* output. Fires alongside `pointerDownOutside` / `focusOutside` and shares
|
|
716
|
+
* their veto state — `event.preventDefault()` on either suppresses the
|
|
717
|
+
* implicit close. Use this to keep a programmatic floater open on outside
|
|
718
|
+
* interaction while leaving Escape live (set `dismissible: true` and veto
|
|
719
|
+
* here). The native `PointerEvent | FocusEvent` is on `.event`.
|
|
720
|
+
*/
|
|
721
|
+
interactOutside?: (event: VetoableNativeEvent<PointerEvent | FocusEvent>) => void;
|
|
722
|
+
/**
|
|
723
|
+
* Mirrors the declarative `(dragMove)` output: invoked on every pointer-move
|
|
724
|
+
* frame of a swipe gesture with `percentageDragged` ∈ `[0, 1]`. Lets a
|
|
725
|
+
* programmatic consumer drive bespoke drag visualizations the way the
|
|
726
|
+
* directive consumer can.
|
|
727
|
+
*/
|
|
728
|
+
onDrag?: (event: ForDrawerDragEvent) => void;
|
|
729
|
+
/**
|
|
730
|
+
* Mirrors the declarative `(release)` output: invoked once the pointer is
|
|
731
|
+
* released, after the directive has resolved the next snap point / close
|
|
732
|
+
* decision. Read `willClose` and `nextSnapPoint` from the payload.
|
|
733
|
+
*/
|
|
734
|
+
onRelease?: (event: ForDrawerReleaseEvent) => void;
|
|
735
|
+
/**
|
|
736
|
+
* Mirrors the declarative `(activeSnapPointChange)` output: invoked with
|
|
737
|
+
* the landed snap point whenever the drawer transitions internally
|
|
738
|
+
* (mount-time default and drag release). Use this to read back the active
|
|
739
|
+
* snap that the declarative API exposes via `[(activeSnapPoint)]`.
|
|
740
|
+
*/
|
|
741
|
+
onActiveSnapPointChange?: (snapPoint: ForDrawerSnapPoint | null) => void;
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* Programmatic drawer opener — symmetric with `ForDialogManager`. Inject
|
|
745
|
+
* anywhere, call `open(MyComponent, { data, side, ... })` and get a
|
|
746
|
+
* `ForDrawerRef<R>` back. Internally the manager renders the user component
|
|
747
|
+
* inside a manager-owned `@for` outlet, so Angular's control-flow unmount
|
|
748
|
+
* fires `animate.leave` before the node leaves the DOM — identical to the
|
|
749
|
+
* declarative `@if (open()) { <div forDrawer animate.leave="…"> }` path.
|
|
750
|
+
*
|
|
751
|
+
* Inside the opened component the usual drawer pieces work without any extra
|
|
752
|
+
* wiring: `[forDrawerTitle]`, `[forDrawerDescription]`, `[forDrawerBackdrop]`,
|
|
753
|
+
* `[forDrawerHandle]`, `[forDrawerClose]`. `[forDrawerClose] [closeWith]`
|
|
754
|
+
* propagates through to `ForDrawerRef.close(value)`.
|
|
755
|
+
*
|
|
756
|
+
* Inject `ForDrawerRef` to drive close imperatively and `FOR_DRAWER_DATA` (or
|
|
757
|
+
* `injectDrawerData<T>()`) for the payload.
|
|
758
|
+
*/
|
|
759
|
+
declare class ForDrawerManager extends OverlayManagerCore<ForDrawerEntry> {
|
|
760
|
+
#private;
|
|
761
|
+
constructor();
|
|
762
|
+
open<C, R = unknown, D = unknown>(component: Type<C>, config?: ForDrawerOpenConfig<D>): ForDrawerRef<R>;
|
|
763
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForDrawerManager, never>;
|
|
764
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ForDrawerManager>;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* Defaults inherited by descendant drawers in the surrounding injector
|
|
769
|
+
* scope. Configure with `provideForDrawerDefaults`. Keys map 1:1 to the
|
|
770
|
+
* directive inputs of the same name; the directive picks
|
|
771
|
+
* `consumerInput ?? defaults[key] ?? hardcoded fallback` per key.
|
|
772
|
+
*/
|
|
773
|
+
interface ForDrawerDefaults {
|
|
774
|
+
/** Default `'bottom'`. */
|
|
775
|
+
side?: ForDrawerSide;
|
|
776
|
+
/** Default `true`. Modal locks scroll, traps focus, applies `aria-modal`. */
|
|
777
|
+
modal?: boolean;
|
|
778
|
+
/** Default `true`. Whether dismiss interactions (Escape, backdrop, swipe) close. */
|
|
779
|
+
dismissible?: boolean;
|
|
780
|
+
/** Default `true`. Pointer drag gesture toward the anchored edge dismisses. */
|
|
781
|
+
swipeToDismiss?: boolean;
|
|
782
|
+
/**
|
|
783
|
+
* Default `0.25`. Fraction past which a release dismisses instead of
|
|
784
|
+
* snapping back: of the full dimension without snap points, of the lowest
|
|
785
|
+
* snap's extent with them (see
|
|
786
|
+
* `_internal/snap-points/resolveSnapTarget`).
|
|
787
|
+
*/
|
|
788
|
+
closeThreshold?: number;
|
|
789
|
+
/** Default `'first'`. Where to send focus on mount. */
|
|
790
|
+
initialFocus?: 'first' | 'container';
|
|
791
|
+
/** Default `true`. Restore focus to the previously focused element on close. */
|
|
792
|
+
returnFocus?: boolean;
|
|
793
|
+
/**
|
|
794
|
+
* Default `false`. When `true` the swipe gesture only arms on the
|
|
795
|
+
* registered `[forDrawerHandle]` element instead of the whole surface.
|
|
796
|
+
*/
|
|
797
|
+
handleOnly?: boolean;
|
|
798
|
+
/**
|
|
799
|
+
* Default `false`. When `true`, an open drawer asks
|
|
800
|
+
* `[forDrawerWrapper]` to scale + translate behind it (the "scale
|
|
801
|
+
* background" effect). Suppressed under
|
|
802
|
+
* `prefers-reduced-motion: reduce`.
|
|
803
|
+
*/
|
|
804
|
+
scaleBackground?: boolean;
|
|
805
|
+
/**
|
|
806
|
+
* Default `true`. When `scaleBackground` is active, paints the body
|
|
807
|
+
* with `scaleBackgroundColor` so the sliver of viewport between the
|
|
808
|
+
* scaled wrapper and the screen edge does not show through.
|
|
809
|
+
*/
|
|
810
|
+
setBackgroundColorOnScale?: boolean;
|
|
811
|
+
/** Default `0.95`. Scale factor applied to the wrapper. */
|
|
812
|
+
scaleAmount?: number;
|
|
813
|
+
/**
|
|
814
|
+
* Default `14`. Vertical translation (in CSS pixels) added to
|
|
815
|
+
* `env(safe-area-inset-top)` while the wrapper is scaled.
|
|
816
|
+
*/
|
|
817
|
+
scaleTranslateYpx?: number;
|
|
818
|
+
/** Default `8`. Border radius applied to the wrapper while scaled. */
|
|
819
|
+
scaleBorderRadiusPx?: number;
|
|
820
|
+
/**
|
|
821
|
+
* Default `'black'`. Body background colour applied while
|
|
822
|
+
* `setBackgroundColorOnScale` is active.
|
|
823
|
+
*/
|
|
824
|
+
scaleBackgroundColor?: string;
|
|
825
|
+
/**
|
|
826
|
+
* Default `0.93`. Scale factor applied to a parent drawer while a
|
|
827
|
+
* nested child drawer is active. Composes with the wrapper-level
|
|
828
|
+
* `scaleBackground` effect when both opt in. Suppressed under
|
|
829
|
+
* `prefers-reduced-motion: reduce`.
|
|
830
|
+
*/
|
|
831
|
+
nestedScaleAmount?: number;
|
|
832
|
+
/**
|
|
833
|
+
* Default `8`. Pixels of additional translation applied to a parent
|
|
834
|
+
* drawer while a nested child is active, in the direction *away* from
|
|
835
|
+
* the parent's anchored edge (so a `bottom` drawer slides up by this
|
|
836
|
+
* amount when its child opens).
|
|
837
|
+
*/
|
|
838
|
+
nestedTranslateYpx?: number;
|
|
839
|
+
/**
|
|
840
|
+
* CSS class applied (via `animate.enter`) to the programmatic overlay host
|
|
841
|
+
* when it mounts, so it plays an enter animation. The class lands on the
|
|
842
|
+
* `[forDrawer]` host that also carries the consumer `class`. No default.
|
|
843
|
+
*/
|
|
844
|
+
animateEnter?: string;
|
|
845
|
+
/**
|
|
846
|
+
* CSS class applied to the programmatic overlay host when `close()` is
|
|
847
|
+
* called, kept on the still-mounted host until its CSS animations finish so
|
|
848
|
+
* an exit transition plays before teardown. No default (close is immediate).
|
|
849
|
+
*/
|
|
850
|
+
animateLeave?: string;
|
|
851
|
+
/**
|
|
852
|
+
* CSS class applied to the portaled `[forDrawerBackdrop]` when `close()` is
|
|
853
|
+
* called, so the backdrop plays an exit animation in lockstep with the
|
|
854
|
+
* host. Needed because a backdrop declared inside the opened component plays
|
|
855
|
+
* its `animate.enter` on mount but cannot run its template `animate.leave` —
|
|
856
|
+
* Angular does not process leave animations across the `ngComponentOutlet`
|
|
857
|
+
* boundary the manager mounts the component through. No default.
|
|
858
|
+
*/
|
|
859
|
+
backdropAnimateLeave?: string;
|
|
860
|
+
}
|
|
861
|
+
/** Token holding the resolved drawer defaults for the current scope. */
|
|
862
|
+
declare const FOR_DRAWER_DEFAULTS: _angular_core.InjectionToken<ForDrawerDefaults>;
|
|
863
|
+
/**
|
|
864
|
+
* Configures forty-cdk drawer defaults for this injector scope. Partial
|
|
865
|
+
* overrides inherit unspecified keys from the parent scope (or library
|
|
866
|
+
* defaults at the root).
|
|
867
|
+
*/
|
|
868
|
+
declare function provideForDrawerDefaults(defaults?: Partial<ForDrawerDefaults>): Provider[];
|
|
869
|
+
|
|
870
|
+
export { FOR_DRAWER_CONTEXT, FOR_DRAWER_DATA, FOR_DRAWER_DEFAULTS, ForDrawer, ForDrawerBackdrop, ForDrawerClose, ForDrawerDescription, ForDrawerHandle, ForDrawerManager, ForDrawerRef, ForDrawerTitle, ForDrawerTrigger, ForDrawerWrapper, injectDrawerData, provideForDrawerDefaults };
|
|
871
|
+
export type { ForDrawerCloseReason, ForDrawerContext, ForDrawerDefaults, ForDrawerDragEvent, ForDrawerOpenConfig, ForDrawerReleaseEvent, ForDrawerSnapPoint };
|