UNPKG

@alyle/ui

Version:

Minimal Design, a set of components for Angular

129 lines (128 loc) 6.02 kB
import { ElementRef, OnChanges, Renderer2, TemplateRef, ViewContainerRef, AfterViewInit, OnDestroy, ChangeDetectorRef, NgZone } from '@angular/core'; import { LyTheme2, ThemeVariables, Placement, StyleRenderer, ThemeRef, StyleCollection, StyleTemplate, LyClasses, WithStyles } from '@alyle/ui'; import { ViewportRuler } from '@angular/cdk/scrolling'; import { Platform } from '@angular/cdk/platform'; import { BooleanInput } from '@angular/cdk/coercion'; import * as i0 from "@angular/core"; export interface LyDrawerTheme { /** Styles for Button Component */ root?: StyleCollection<((classes: LyClasses<typeof STYLES>) => StyleTemplate)> | ((classes: LyClasses<typeof STYLES>) => StyleTemplate); } export interface LyDrawerVariables { drawer?: LyDrawerTheme; } export type LyDrawerPosition = `${Placement}`; export type LyDrawerMode = 'side' | 'over'; export declare const STYLES: (theme: ThemeVariables & LyDrawerVariables, ref: ThemeRef) => { $name: string; $priority: number; root: () => StyleTemplate; drawerContainer: (_className: string) => string; drawer: (_className: string) => string; drawerContent: (_className: string) => string; drawerOpened: (_className: string) => string; drawerClosed: any; backdrop: (_className: string) => string; transition: (_className: string) => string; }; export declare class LyDrawerContent { private _renderer; private _el; static readonly и = "LyDrawerContent"; constructor(_renderer: Renderer2, _el: ElementRef, drawerContainer: any); _getHostElement(): any; static ɵfac: i0.ɵɵFactoryDeclaration<LyDrawerContent, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<LyDrawerContent, "ly-drawer-content", never, {}, {}, never, never, false, never>; } export declare class LyDrawerContainer implements WithStyles { private _renderer; private _el; readonly sRenderer: StyleRenderer; /** @docs-private */ readonly classes: LyClasses<(theme: ThemeVariables & LyDrawerVariables, ref: ThemeRef) => { $name: string; $priority: number; root: () => StyleTemplate; drawerContainer: (_className: string) => string; drawer: (_className: string) => string; drawerContent: (_className: string) => string; drawerOpened: (_className: string) => string; drawerClosed: any; backdrop: (_className: string) => string; transition: (_className: string) => string; }>; _openDrawers: number; _drawerContent: LyDrawerContent; constructor(_renderer: Renderer2, _el: ElementRef, sRenderer: StyleRenderer); _getHostElement(): any; static ɵfac: i0.ɵɵFactoryDeclaration<LyDrawerContainer, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<LyDrawerContainer, "ly-drawer-container", never, {}, {}, ["_drawerContent"], never, false, never>; } export declare class LyDrawer implements OnChanges, AfterViewInit, OnDestroy { private _theme; private _styleRenderer; private _renderer; private _el; private _drawerContainer; private _vcr; private _viewportRuler; private _cd; private _zone; private _platform; static readonly и = "LyDrawer"; /** * Styles * @docs-private */ readonly classes: LyClasses<(theme: ThemeVariables & LyDrawerVariables, ref: ThemeRef) => { $name: string; $priority: number; root: () => StyleTemplate; drawerContainer: (_className: string) => string; drawer: (_className: string) => string; drawerContent: (_className: string) => string; drawerOpened: (_className: string) => string; drawerClosed: any; backdrop: (_className: string) => string; transition: (_className: string) => string; }>; private _forceModeOverOpened; private _fromToggle; private _opened; private _viewRef?; private _isAnimation; private _hasBackdrop; private _position; private _drawerRootClass; private _drawerClass?; private _drawerContentClass?; private _tabResizeSub; private _isOpen; _backdrop: TemplateRef<any>; set width(_val: string); set height(_val: string); set opened(val: BooleanInput); get opened(): boolean; mode: LyDrawerMode; spacingAbove: string | number; spacingBelow: string | number; spacingBefore: string | number; spacingAfter: string | number; drawerWidth: number | string; drawerHeight: number | string; get hasBackdrop(): BooleanInput; set hasBackdrop(val: BooleanInput); set position(val: LyDrawerPosition); get position(): LyDrawerPosition; [0x1]: string; constructor(_theme: LyTheme2, _styleRenderer: StyleRenderer, _renderer: Renderer2, _el: ElementRef, _drawerContainer: LyDrawerContainer, _vcr: ViewContainerRef, _viewportRuler: ViewportRuler, _cd: ChangeDetectorRef, _zone: NgZone, _platform: Platform); ngOnChanges(): void; ngAfterViewInit(): void; ngOnDestroy(): void; toggle(): void; private _contentHasMargin; private _updateBackdrop; private _updateAnimations; static ɵfac: i0.ɵɵFactoryDeclaration<LyDrawer, never>; static ɵcmp: i0.ɵɵComponentDeclaration<LyDrawer, "ly-drawer", ["lyDrawer"], { "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "spacingAbove": { "alias": "spacingAbove"; "required": false; }; "spacingBelow": { "alias": "spacingBelow"; "required": false; }; "spacingBefore": { "alias": "spacingBefore"; "required": false; }; "spacingAfter": { "alias": "spacingAfter"; "required": false; }; "drawerWidth": { "alias": "drawerWidth"; "required": false; }; "drawerHeight": { "alias": "drawerHeight"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "position": { "alias": "position"; "required": false; }; }, {}, never, ["*"], false, never>; }