UNPKG

3.89 kBTypeScriptView Raw
1import { AfterContentChecked, AfterViewInit, ChangeDetectorRef, ElementRef, NgZone, QueryList, Renderer2 } from '@angular/core';
2import { NbStatusService } from '../../services/status.service';
3import { NbBooleanInput } from '../helpers';
4import { NbComponentSize } from '../component-size';
5import { NbComponentOrCustomStatus } from '../component-status';
6import { NbComponentShape } from '../component-shape';
7import * as i0 from "@angular/core";
8export type NbButtonAppearance = 'filled' | 'outline' | 'ghost' | 'hero';
9export type NbButtonProperties = Pick<NbButton, 'appearance' | 'size' | 'shape' | 'status' | 'disabled'> & Object;
10export declare abstract class NbButton implements AfterContentChecked, AfterViewInit {
11 protected renderer: Renderer2;
12 protected hostElement: ElementRef<HTMLElement>;
13 protected cd: ChangeDetectorRef;
14 protected zone: NgZone;
15 protected statusService: NbStatusService;
16 /**
17 * Button size, available sizes:
18 * `tiny`, `small`, `medium`, `large`, `giant`
19 */
20 size: NbComponentSize;
21 /**
22 * Button status (adds specific styles):
23 * `primary`, `info`, `success`, `warning`, `danger`
24 */
25 status: NbComponentOrCustomStatus;
26 /**
27 * Button shapes: `rectangle`, `round`, `semi-round`
28 */
29 shape: NbComponentShape;
30 /**
31 * Button appearance: `filled`, `outline`, `ghost`, `hero`
32 */
33 appearance: NbButtonAppearance;
34 /**
35 * Sets `filled` appearance
36 */
37 get filled(): boolean;
38 set filled(value: boolean);
39 static ngAcceptInputType_filled: NbBooleanInput;
40 /**
41 * Sets `outline` appearance
42 */
43 get outline(): boolean;
44 set outline(value: boolean);
45 static ngAcceptInputType_outline: NbBooleanInput;
46 /**
47 * Sets `ghost` appearance
48 */
49 get ghost(): boolean;
50 set ghost(value: boolean);
51 static ngAcceptInputType_ghost: NbBooleanInput;
52 /**
53 * If set element will fill its container
54 */
55 get fullWidth(): boolean;
56 set fullWidth(value: boolean);
57 private _fullWidth;
58 static ngAcceptInputType_fullWidth: NbBooleanInput;
59 /**
60 * Disables the button
61 */
62 get disabled(): boolean;
63 set disabled(value: boolean);
64 private _disabled;
65 static ngAcceptInputType_disabled: NbBooleanInput;
66 /**
67 * Tabindex of the button.
68 */
69 tabIndex: number;
70 get tabbable(): string;
71 get tiny(): boolean;
72 get small(): boolean;
73 get medium(): boolean;
74 get large(): boolean;
75 get giant(): boolean;
76 get rectangle(): boolean;
77 get round(): boolean;
78 get semiRound(): boolean;
79 iconLeft: boolean;
80 iconRight: boolean;
81 get additionalClasses(): string[];
82 icons: QueryList<ElementRef>;
83 protected constructor(renderer: Renderer2, hostElement: ElementRef<HTMLElement>, cd: ChangeDetectorRef, zone: NgZone, statusService: NbStatusService);
84 ngAfterContentChecked(): void;
85 ngAfterViewInit(): void;
86 /**
87 * @docs-private
88 **/
89 updateProperties(config: Partial<NbButtonProperties>): void;
90 get iconElement(): Element;
91 protected get nodes(): Node[];
92 protected isIconExist(node: Node): boolean;
93 static ɵfac: i0.ɵɵFactoryDeclaration<NbButton, never>;
94 static ɵdir: i0.ɵɵDirectiveDeclaration<NbButton, never, never, { "size": { "alias": "size"; "required": false; }; "status": { "alias": "status"; "required": false; }; "shape": { "alias": "shape"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "filled": { "alias": "filled"; "required": false; }; "outline": { "alias": "outline"; "required": false; }; "ghost": { "alias": "ghost"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, ["icons"], never, false, never>;
95}