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