@alyle/ui
Version:
Minimal Design, a set of components for Angular
78 lines (77 loc) • 3.41 kB
TypeScript
import { ElementRef, OnInit, Renderer2 } from '@angular/core';
import { ThemeVariables, LyTheme2, ThemeRef, LyClasses, StyleTemplate, StyleRenderer } from '@alyle/ui';
import { Subject } from 'rxjs';
import { BooleanInput } from '@angular/cdk/coercion';
import * as i0 from "@angular/core";
export interface ExpansionConfig {
root?: (classes: LyClasses<typeof STYLES>) => StyleTemplate;
defaultConfig?: {
appearance?: keyof ExpansionConfig['appearance'];
};
appearance: {
popOut: (classes: LyClasses<typeof STYLES>) => StyleTemplate;
};
}
export interface ExpansionVariables {
expansion?: ExpansionConfig;
}
export declare const STYLES: (theme: ThemeVariables & ExpansionVariables, ref: ThemeRef) => {
$priority: number;
$name: string;
$global: () => (_className: string) => string;
root: () => StyleTemplate;
panel: () => (_className: string) => string;
panelHeader: () => (_className: string) => string;
panelHeaderContent: (_className: string) => string;
panelContent: (_className: string) => string;
panelBody: (_className: string) => string;
panelTitle: (_className: string) => string;
panelDescription: (_className: string) => string;
panelActionRow: (_className: string) => string;
expanded: () => (_className: string) => string;
disabled: (_className: string) => string;
};
export declare class LyAccordion implements OnInit {
readonly sRenderer: StyleRenderer;
private _theme;
private _renderer;
private _el;
/** @docs-private */
static readonly и = "LyAccordion";
/** @docs-private */
readonly classes: LyClasses<(theme: ThemeVariables & ExpansionVariables, ref: ThemeRef) => {
$priority: number;
$name: string;
$global: () => (_className: string) => string;
root: () => StyleTemplate;
panel: () => (_className: string) => string;
panelHeader: () => (_className: string) => string;
panelHeaderContent: (_className: string) => string;
panelContent: (_className: string) => string;
panelBody: (_className: string) => string;
panelTitle: (_className: string) => string;
panelDescription: (_className: string) => string;
panelActionRow: (_className: string) => string;
expanded: () => (_className: string) => string;
disabled: (_className: string) => string;
}>;
private _appearance;
private _multiple;
private _hasToggle;
private _appearanceClass;
/** Stream that emits true/false when openAll/closeAll is triggered. */
readonly _openCloseAllActions: Subject<boolean>;
set appearance(val: string);
get appearance(): string;
set multiple(val: BooleanInput);
get multiple(): boolean;
set hasToggle(val: BooleanInput);
get hasToggle(): boolean;
constructor(sRenderer: StyleRenderer, _theme: LyTheme2, _renderer: Renderer2, _el: ElementRef);
ngOnInit(): void;
closeAll(): void;
openAll(): void;
private _openCloseAll;
static ɵfac: i0.ɵɵFactoryDeclaration<LyAccordion, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<LyAccordion, "ly-accordion", ["lyAccordion"], { "appearance": { "alias": "appearance"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "hasToggle": { "alias": "hasToggle"; "required": false; }; }, {}, never, never, false, never>;
}