UNPKG

@synergy-design-system/angular

Version:
88 lines (85 loc) 4.19 kB
import * as i0 from '@angular/core'; import { AfterContentInit, ElementRef, NgZone, EventEmitter } from '@angular/core'; import { SynDetails, SynShowEvent, SynAfterShowEvent, SynHideEvent, SynAfterHideEvent } from '@synergy-design-system/components'; export { SynAfterHideEvent, SynAfterShowEvent, SynHideEvent, SynShowEvent } from '@synergy-design-system/components'; /** * @summary Details show a brief summary and expand to show additional content. * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-details--docs * @status stable * @since 2.0 * * @dependency syn-icon * * @slot - The details' main content. * @slot summary - The details' summary. Alternatively, you can use the `summary` attribute. * @slot expand-icon - Optional expand icon to use instead of the default. Works best with `<syn-icon>`. * @slot collapse-icon - Optional collapse icon to use instead of the default. Works best with `<syn-icon>`. * * @event syn-show - Emitted when the details opens. * @event syn-after-show - Emitted after the details opens and all animations are complete. * @event syn-hide - Emitted when the details closes. * @event syn-after-hide - Emitted after the details closes and all animations are complete. * * @csspart base - The component's base wrapper. * @csspart header - The header that wraps both the summary and the expand/collapse icon. * @csspart summary - The container that wraps the summary. * @csspart summary-icon - The container that wraps the expand/collapse icons. * @csspart content - The details content. * @csspart body - The container that wraps the details content. * * @animation details.show - The animation to use when showing details. You can use `height: auto` with this animation. * @animation details.hide - The animation to use when hiding details. You can use `height: auto` with this animation. */ declare class SynDetailsComponent implements AfterContentInit { nativeElement: SynDetails; private _ngZone; constructor(e: ElementRef, ngZone: NgZone); ngAfterContentInit(): void; /** * Indicates whether or not the details is open. * You can toggle this attribute to show and hide the details, or you can use the `show()` and `hide()` methods and this attribute will reflect the details' open state. */ set open(v: '' | SynDetails['open']); get open(): SynDetails['open']; /** * The summary to show in the header. * If you need to display HTML, use the `summary` slot instead. */ set summary(v: SynDetails['summary']); get summary(): SynDetails['summary']; /** * Disables the details so it can't be toggled. */ set disabled(v: '' | SynDetails['disabled']); get disabled(): SynDetails['disabled']; /** * Draws the details as contained element. */ set contained(v: '' | SynDetails['contained']); get contained(): SynDetails['contained']; /** * The details's size. */ set size(v: SynDetails['size']); get size(): SynDetails['size']; /** * Emitted when the details opens. */ synShowEvent: EventEmitter<SynShowEvent>; /** * Emitted after the details opens and all animations are complete. */ synAfterShowEvent: EventEmitter<SynAfterShowEvent>; /** * Emitted when the details closes. */ synHideEvent: EventEmitter<SynHideEvent>; /** * Emitted after the details closes and all animations are complete. */ synAfterHideEvent: EventEmitter<SynAfterHideEvent>; static ɵfac: i0.ɵɵFactoryDeclaration<SynDetailsComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SynDetailsComponent, "syn-details", never, { "open": { "alias": "open"; "required": false; }; "summary": { "alias": "summary"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "contained": { "alias": "contained"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "synShowEvent": "synShowEvent"; "synAfterShowEvent": "synAfterShowEvent"; "synHideEvent": "synHideEvent"; "synAfterHideEvent": "synAfterHideEvent"; }, never, ["*"], true, never>; } export { SynDetailsComponent };