@almoamendev/ngx-md3 0.3.7 → 0.4.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/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { ViewContainerRef, Injector, ElementRef, AfterViewInit, OnDestroy, OnInit, Renderer2, Signal, InputSignal, InjectionToken, Type, AfterContentInit, ComponentRef, TemplateRef } from '@angular/core';
|
|
3
3
|
import { FlexibleConnectedPositionStrategyOrigin, ConnectedPosition, OverlayRef } from '@angular/cdk/overlay';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
4
5
|
import * as i1 from '@angular/cdk/scrolling';
|
|
5
6
|
import { AbstractControl } from '@angular/forms';
|
|
6
7
|
import * as i1$1 from '@angular/router';
|
|
7
8
|
import { CdkDialogContainer, DialogRef as DialogRef$1 } from '@angular/cdk/dialog';
|
|
8
|
-
import { Observable } from 'rxjs';
|
|
9
9
|
import { CdkPortalOutlet } from '@angular/cdk/portal';
|
|
10
10
|
|
|
11
11
|
type TextSize = 'large' | 'medium' | 'small';
|
|
@@ -226,6 +226,34 @@ interface SideSheetContainer {
|
|
|
226
226
|
setHidden(value: boolean): void;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
+
interface BottomSheetConfig<D = unknown> {
|
|
230
|
+
data?: D;
|
|
231
|
+
bindDataToInputs?: boolean;
|
|
232
|
+
/** Shows the MD3 drag handle centered above the sheet's content. */
|
|
233
|
+
handle?: boolean;
|
|
234
|
+
/** Lets the sheet be dragged down, and flung, to dismiss it. */
|
|
235
|
+
gestures?: boolean;
|
|
236
|
+
scheme?: 'inherit' | 'dark' | 'light';
|
|
237
|
+
direction?: null | 'ltr' | 'rtl';
|
|
238
|
+
viewContainerRef?: ViewContainerRef;
|
|
239
|
+
injector?: Injector;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* What BottomSheetRef needs from the shell hosting a bottom sheet, mirroring
|
|
243
|
+
* DialogContainer: a bottom sheet is a CDK dialog container underneath, not a
|
|
244
|
+
* side-sheet-style outlet.
|
|
245
|
+
*/
|
|
246
|
+
interface BottomSheetContainer {
|
|
247
|
+
readonly surfaceElement: HTMLElement | null;
|
|
248
|
+
/** Emits when a drag gesture asks for the sheet to be dismissed. */
|
|
249
|
+
readonly dismissed: Observable<void>;
|
|
250
|
+
/** Emits how far a drag has taken the sheet towards being dismissed, from 0 to 1. */
|
|
251
|
+
readonly dragProgress: Observable<number>;
|
|
252
|
+
startEnterAnimation(): void;
|
|
253
|
+
setActive(value: boolean): void;
|
|
254
|
+
recaptureFocus(): void;
|
|
255
|
+
}
|
|
256
|
+
|
|
229
257
|
type SnackbarPoliteness = 'polite' | 'assertive';
|
|
230
258
|
interface SnackbarConfig<D = unknown> {
|
|
231
259
|
/**
|
|
@@ -1842,6 +1870,70 @@ declare class SideSheetActions {
|
|
|
1842
1870
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SideSheetActions, "md3-side-sheet-actions", never, { "showDivider": { "alias": "show-divider"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1843
1871
|
}
|
|
1844
1872
|
|
|
1873
|
+
declare const BOTTOM_SHEET_DATA: InjectionToken<unknown>;
|
|
1874
|
+
declare const BOTTOM_SHEET_CONFIG: InjectionToken<BottomSheetConfig<unknown>>;
|
|
1875
|
+
declare const BOTTOM_SHEET_COMPONENT: InjectionToken<Type<unknown>>;
|
|
1876
|
+
/**
|
|
1877
|
+
* A bottom sheet is a single modal overlay, not a stack like dialogs can be,
|
|
1878
|
+
* so this is a smaller version of DialogRef: no hide/show, no full screen
|
|
1879
|
+
* variant, closing is always the only way out.
|
|
1880
|
+
*/
|
|
1881
|
+
declare class BottomSheetRef<T = unknown, R = unknown> {
|
|
1882
|
+
private readonly cdkRef;
|
|
1883
|
+
private readonly closed;
|
|
1884
|
+
private closeStarted;
|
|
1885
|
+
private closeSettled;
|
|
1886
|
+
/** Shell hosting the sheet. Filled by BottomSheetService once it is created. */
|
|
1887
|
+
sheetInstance?: BottomSheetContainer;
|
|
1888
|
+
/** Filled by BottomSheetService after the sheet component is attached. */
|
|
1889
|
+
componentInstance?: T;
|
|
1890
|
+
/** Overlay hosting the sheet, useful to reach the panel and the scrim. */
|
|
1891
|
+
get overlayRef(): OverlayRef;
|
|
1892
|
+
/** Whether the sheet started closing. */
|
|
1893
|
+
get isClosing(): boolean;
|
|
1894
|
+
constructor(cdkRef: DialogRef$1<R, T>);
|
|
1895
|
+
/** Closes the sheet. The promise resolves once the exit animation is done. */
|
|
1896
|
+
close(result?: R): Promise<void>;
|
|
1897
|
+
afterClosed(): Observable<R | undefined>;
|
|
1898
|
+
/**
|
|
1899
|
+
* Wires the shell to this reference. Called by BottomSheetService, since the shell is
|
|
1900
|
+
* created by the CDK before this reference exists and cannot reach it through DI.
|
|
1901
|
+
*/
|
|
1902
|
+
attachContainer(container: BottomSheetContainer): void;
|
|
1903
|
+
/** Fades the scrim along with the sheet being dragged, and hands it back to CSS on release. */
|
|
1904
|
+
private trackDragProgress;
|
|
1905
|
+
private connectCloseEvents;
|
|
1906
|
+
private startCloseAnimation;
|
|
1907
|
+
/** Resolves when the surface finished animating, with a timeout as a safety net. */
|
|
1908
|
+
private waitForSurfaceAnimation;
|
|
1909
|
+
/** Emits the result once the CDK reference is closed. Focus is restored by the container. */
|
|
1910
|
+
private settle;
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
/**
|
|
1914
|
+
* Opens bottom sheets as CDK dialogs anchored to the bottom of the viewport.
|
|
1915
|
+
* A bottom sheet is always a modal overlay, the same way a regular dialog is
|
|
1916
|
+
* always an overlay, so this mirrors DialogService rather than the side sheet
|
|
1917
|
+
* outlet model: there is no docked variant and nothing to register from the
|
|
1918
|
+
* scaffold.
|
|
1919
|
+
*/
|
|
1920
|
+
declare class BottomSheetService {
|
|
1921
|
+
private readonly cdkDialog;
|
|
1922
|
+
private readonly overlay;
|
|
1923
|
+
private readonly injector;
|
|
1924
|
+
/** Only one bottom sheet is ever open at a time. */
|
|
1925
|
+
private ref?;
|
|
1926
|
+
open<T, D = unknown, R = unknown>(component: Type<T>, config?: BottomSheetConfig<D>): BottomSheetRef<T, R>;
|
|
1927
|
+
/** Closes the bottom sheet that is open, if there is one. */
|
|
1928
|
+
close<R = unknown>(result?: R): void;
|
|
1929
|
+
private startOpenAnimation;
|
|
1930
|
+
private mergeConfig;
|
|
1931
|
+
private bindDataToInputs;
|
|
1932
|
+
private canBindDataToInputs;
|
|
1933
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BottomSheetService, never>;
|
|
1934
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<BottomSheetService>;
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1845
1937
|
declare class Snackbar implements OnInit, OnDestroy {
|
|
1846
1938
|
private readonly el;
|
|
1847
1939
|
private readonly snackbarRef;
|
|
@@ -1937,5 +2029,5 @@ declare class SnackbarService {
|
|
|
1937
2029
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SnackbarService>;
|
|
1938
2030
|
}
|
|
1939
2031
|
|
|
1940
|
-
export { AppBar, AppBarLogo, Avatar, Badge, Button, ButtonGroup, CAROUSEL_STRATEGIES, Card, Carousel, CarouselItem, Checkbox, ChipAvatar, Chips, CircularProgressIndicator, DIALOG_COMPONENT, DIALOG_CONFIG, DIALOG_DATA, Dialog, DialogActions, DialogBody, DialogHeader, DialogRef, DialogService, Divider, FloatingActionButton, FullScreenDialog, FullScreenDialogHeader, Grid, GridItem, IconButton, IconElement, InputElement, LayoutService, LinearProgressIndicator, List, ListItem, ListItemPrimaryAction, ListLeading, ListSlot, LoadingIndicator, MENU_COMPONENT, MENU_CONFIG, MENU_DATA, MaterialIcon, Menu, MenuGroup, MenuItem, MenuRef, MenuService, NavigationBar, NavigationGroup, NavigationItem, NavigationRail, RadioButton, SIDE_SHEET_COMPONENT, SIDE_SHEET_CONFIG, SIDE_SHEET_DATA, SNACKBAR_ACTION_LABEL, SNACKBAR_CONFIG, SNACKBAR_MESSAGE, Scaffold, ScaffoldBar, ScaffoldPane, ScaffoldRail, SheetsService, SideSheetActions, SideSheetBody, SideSheetHeader, SideSheetRef, Slider, Snackbar, SnackbarRef, SnackbarService, SplitButton, StateComponent, SupportingText, Switch, TextField, TypeBody, TypeDisplay, TypeHeadline, TypeLabel, TypeTitle, buildGeometry, clampIndex, indexForScrollOffset, multiBrowseStrategy, parseCarouselAspectRatio, resolveItemGeometry, resolveState, scrollOffsetForIndex, sizeBandFor };
|
|
1941
|
-
export type { AppBarScrollingStyle, AppBarType, ButtonGroupSelection, ButtonGroupType, ButtonSize, ButtonType, CardType, CarouselAlignment, CarouselArrangement, CarouselGeometry, CarouselItemGeometry, CarouselItemSize, CarouselKeyline, CarouselKeylineState, CarouselLayout, CarouselOrientation, CarouselStrategy, CarouselStrategyContext, ChipStyle, ChipType, DialogConfig, DialogContainer, DialogRole, FabSize, FabType, FullScreenDialogConfig, IconButtonType, IconButtonWidth, ListLeadingSize, ListLeadingType, Md3NavigationMode, MenuConfig, MenuPositionOrigin, MenuPositionX, MenuPositionY, MenuScrollStrategy, PreviousDialog, SideSheetConfig, SideSheetContainer, SideSheetSide, SideSheetType, SliderSize, SnackbarConfig, SnackbarDismiss, SnackbarDismissReason, SnackbarPoliteness, SplitButtonType, TextColor, TextSize };
|
|
2032
|
+
export { AppBar, AppBarLogo, Avatar, BOTTOM_SHEET_COMPONENT, BOTTOM_SHEET_CONFIG, BOTTOM_SHEET_DATA, Badge, BottomSheetRef, BottomSheetService, Button, ButtonGroup, CAROUSEL_STRATEGIES, Card, Carousel, CarouselItem, Checkbox, ChipAvatar, Chips, CircularProgressIndicator, DIALOG_COMPONENT, DIALOG_CONFIG, DIALOG_DATA, Dialog, DialogActions, DialogBody, DialogHeader, DialogRef, DialogService, Divider, FloatingActionButton, FullScreenDialog, FullScreenDialogHeader, Grid, GridItem, IconButton, IconElement, InputElement, LayoutService, LinearProgressIndicator, List, ListItem, ListItemPrimaryAction, ListLeading, ListSlot, LoadingIndicator, MENU_COMPONENT, MENU_CONFIG, MENU_DATA, MaterialIcon, Menu, MenuGroup, MenuItem, MenuRef, MenuService, NavigationBar, NavigationGroup, NavigationItem, NavigationRail, RadioButton, SIDE_SHEET_COMPONENT, SIDE_SHEET_CONFIG, SIDE_SHEET_DATA, SNACKBAR_ACTION_LABEL, SNACKBAR_CONFIG, SNACKBAR_MESSAGE, Scaffold, ScaffoldBar, ScaffoldPane, ScaffoldRail, SheetsService, SideSheetActions, SideSheetBody, SideSheetHeader, SideSheetRef, Slider, Snackbar, SnackbarRef, SnackbarService, SplitButton, StateComponent, SupportingText, Switch, TextField, TypeBody, TypeDisplay, TypeHeadline, TypeLabel, TypeTitle, buildGeometry, clampIndex, indexForScrollOffset, multiBrowseStrategy, parseCarouselAspectRatio, resolveItemGeometry, resolveState, scrollOffsetForIndex, sizeBandFor };
|
|
2033
|
+
export type { AppBarScrollingStyle, AppBarType, BottomSheetConfig, BottomSheetContainer, ButtonGroupSelection, ButtonGroupType, ButtonSize, ButtonType, CardType, CarouselAlignment, CarouselArrangement, CarouselGeometry, CarouselItemGeometry, CarouselItemSize, CarouselKeyline, CarouselKeylineState, CarouselLayout, CarouselOrientation, CarouselStrategy, CarouselStrategyContext, ChipStyle, ChipType, DialogConfig, DialogContainer, DialogRole, FabSize, FabType, FullScreenDialogConfig, IconButtonType, IconButtonWidth, ListLeadingSize, ListLeadingType, Md3NavigationMode, MenuConfig, MenuPositionOrigin, MenuPositionX, MenuPositionY, MenuScrollStrategy, PreviousDialog, SideSheetConfig, SideSheetContainer, SideSheetSide, SideSheetType, SliderSize, SnackbarConfig, SnackbarDismiss, SnackbarDismissReason, SnackbarPoliteness, SplitButtonType, TextColor, TextSize };
|