1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone, Renderer2 } from '@angular/core';
|
7 | import { Observable, Subject } from 'rxjs';
|
8 | import { NbStatusService } from '../../services/status.service';
|
9 | import { NbBooleanInput } from '../helpers';
|
10 | import { NbButton, NbButtonAppearance } from '../button/base-button';
|
11 | import * as i0 from "@angular/core";
|
12 | export type NbButtonToggleAppearance = Exclude<NbButtonAppearance, 'hero'>;
|
13 | export interface NbButtonToggleChange {
|
14 | source: NbButtonToggleDirective;
|
15 | pressed: boolean;
|
16 | }
|
17 |
|
18 |
|
19 |
|
20 | export declare class NbButtonToggleDirective extends NbButton {
|
21 | protected renderer: Renderer2;
|
22 | protected hostElement: ElementRef<HTMLElement>;
|
23 | protected cd: ChangeDetectorRef;
|
24 | protected zone: NgZone;
|
25 | protected statusService: NbStatusService;
|
26 | protected buttonGroup?: any;
|
27 | protected readonly _pressedChange$: Subject<NbButtonToggleChange>;
|
28 | get pressedChange$(): Observable<NbButtonToggleChange>;
|
29 | appearance: NbButtonToggleAppearance;
|
30 | |
31 |
|
32 |
|
33 | value: any;
|
34 | |
35 |
|
36 |
|
37 | get pressed(): boolean;
|
38 | set pressed(value: boolean);
|
39 | protected _pressed: boolean;
|
40 | static ngAcceptInputType_pressed: NbBooleanInput;
|
41 | |
42 |
|
43 |
|
44 | readonly pressedChange: EventEmitter<boolean>;
|
45 | get basic(): boolean;
|
46 | get primary(): boolean;
|
47 | get success(): boolean;
|
48 | get info(): boolean;
|
49 | get warning(): boolean;
|
50 | get danger(): boolean;
|
51 | get control(): boolean;
|
52 | get additionalClasses(): string[];
|
53 | onClick(): void;
|
54 | constructor(renderer: Renderer2, hostElement: ElementRef<HTMLElement>, cd: ChangeDetectorRef, zone: NgZone, statusService: NbStatusService, buttonGroup?: any);
|
55 | /**
|
56 | * @docs-private
|
57 | */
|
58 | _updatePressed(value: boolean): void;
|
59 | static ɵfac: i0.ɵɵFactoryDeclaration<NbButtonToggleDirective, [null, null, null, null, null, { optional: true; }]>;
|
60 | static ɵdir: i0.ɵɵDirectiveDeclaration<NbButtonToggleDirective, "button[nbButtonToggle]", ["nbButtonToggle"], { "appearance": { "alias": "appearance"; "required": false; }; "value": { "alias": "value"; "required": false; }; "pressed": { "alias": "pressed"; "required": false; }; }, { "pressedChange": "pressedChange"; }, never, never, false, never>;
|
61 | }
|