UNPKG

2.31 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Akveo. All Rights Reserved.
4 * Licensed under the MIT License. See License.txt in the project root for license information.
5 */
6import { Subject } from 'rxjs';
7import { NbBooleanInput } from '../helpers';
8/**
9 * An accordion allows to toggle the display of sections of content
10 *
11 * Basic example
12 * @stacked-example(Showcase, accordion/accordion-showcase.component)
13 *
14 * ```ts
15 * <nb-accordion>
16 * <nb-accordion-item>
17 * <nb-accordion-item-header>Product Details</nb-accordion-item-header>
18 * <nb-accordion-item-body>
19 * Item Content
20 * </nb-accordion-item-body>
21 * </nb-accordion-item>
22 * </nb-accordion>
23 * ```
24 * ### Installation
25 *
26 * Import `NbAccordionModule` to your feature module.
27 * ```ts
28 * @NgModule({
29 * imports: [
30 * // ...
31 * NbAccordionModule,
32 * ],
33 * })
34 * export class PageModule { }
35 * ```
36 * ### Usage
37 *
38 * With `multi` mode accordion can have multiple items expanded:
39 * @stacked-example(Multiple expanded items, accordion/accordion-multi.component)
40 *
41 * `NbAccordionItemComponent` has several methods, for example it is possible to trigger item click/toggle:
42 * @stacked-example(Expand API, accordion/accordion-toggle.component)
43 *
44 * @styles
45 *
46 * accordion-border-radius:
47 * accordion-padding:
48 * accordion-shadow:
49 * accordion-header-text-color:
50 * accordion-header-text-font-family:
51 * accordion-header-text-font-size:
52 * accordion-header-text-font-weight:
53 * accordion-header-text-line-height:
54 * accordion-header-disabled-text-color:
55 * accordion-header-border-color:
56 * accordion-header-border-style:
57 * accordion-header-border-width:
58 * accordion-item-background-color:
59 * accordion-item-text-color:
60 * accordion-item-text-font-family:
61 * accordion-item-text-font-size:
62 * accordion-item-text-font-weight:
63 * accordion-item-text-line-height:
64 */
65export declare class NbAccordionComponent {
66 openCloseItems: Subject<boolean>;
67 /**
68 * Allow multiple items to be expanded at the same time.
69 * @type {boolean}
70 */
71 get multi(): boolean;
72 set multi(val: boolean);
73 static ngAcceptInputType_multi: NbBooleanInput;
74 private multiValue;
75 /**
76 * Opens all enabled accordion items.
77 */
78 openAll(): void;
79 /**
80 * Closes all enabled accordion items.
81 */
82 closeAll(): void;
83}