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 | */
|
6 | import { EventEmitter } from '@angular/core';
|
7 | import { NbStatusService } from '../../services/status.service';
|
8 | import { NbComponentSize } from '../component-size';
|
9 | import { NbComponentOrCustomStatus, NbComponentStatus } from '../component-status';
|
10 | import { NbBooleanInput } from '../helpers';
|
11 | /**
|
12 | * Alert component.
|
13 | *
|
14 | * Basic alert example:
|
15 | * @stacked-example(Showcase, alert/alert-showcase.component)
|
16 | *
|
17 | * Alert configuration:
|
18 | *
|
19 | * ```html
|
20 | * <nb-alert status="success">
|
21 | * You have been successfully authenticated!
|
22 | * </nb-alert>
|
23 | * ```
|
24 | * ### Installation
|
25 | *
|
26 | * Import `NbAlertModule` to your feature module.
|
27 | * ```ts
|
28 | * @NgModule({
|
29 | * imports: [
|
30 | * // ...
|
31 | * NbAlertModule,
|
32 | * ],
|
33 | * })
|
34 | * export class PageModule { }
|
35 | * ```
|
36 | * ### Usage
|
37 | *
|
38 | * Alert could additionally have a `close` button when `closable` property is set:
|
39 | * ```html
|
40 | * <nb-alert status="success" closable (close)="onClose()">
|
41 | * You have been successfully authenticated!
|
42 | * </nb-alert>
|
43 | * ```
|
44 | *
|
45 | * Colored alerts could be simply configured by providing a `status` property:
|
46 | * @stacked-example(Alert status, alert/alert-colors.component)
|
47 | *
|
48 | * It is also possible to assign an `accent` property for a slight alert highlight
|
49 | * as well as combine it with `status`:
|
50 | * @stacked-example(Alert accent, alert/alert-accents.component)
|
51 | *
|
52 | * And `outline` property:
|
53 | * @stacked-example(Outline Alert, alert/alert-outline.component)
|
54 | *
|
55 | * @additional-example(Multiple Sizes, alert/alert-sizes.component)
|
56 | *
|
57 | * @styles
|
58 | *
|
59 | * alert-border-radius:
|
60 | * alert-bottom-margin:
|
61 | * alert-padding:
|
62 | * alert-scrollbar-color:
|
63 | * alert-scrollbar-background-color:
|
64 | * alert-scrollbar-width:
|
65 | * alert-shadow:
|
66 | * alert-text-font-family:
|
67 | * alert-text-font-size:
|
68 | * alert-text-font-weight:
|
69 | * alert-text-line-height:
|
70 | * alert-closable-start-padding:
|
71 | * alert-tiny-height:
|
72 | * alert-small-height:
|
73 | * alert-medium-height:
|
74 | * alert-medium-padding:
|
75 | * alert-large-height:
|
76 | * alert-giant-height:
|
77 | * alert-basic-background-color:
|
78 | * alert-basic-text-color:
|
79 | * alert-primary-background-color:
|
80 | * alert-primary-text-color:
|
81 | * alert-success-background-color:
|
82 | * alert-success-text-color:
|
83 | * alert-info-background-color:
|
84 | * alert-info-text-color:
|
85 | * alert-warning-background-color:
|
86 | * alert-warning-text-color:
|
87 | * alert-danger-background-color:
|
88 | * alert-danger-text-color:
|
89 | * alert-control-background-color:
|
90 | * alert-control-text-color:
|
91 | * alert-accent-basic-color:
|
92 | * alert-accent-primary-color:
|
93 | * alert-accent-info-color:
|
94 | * alert-accent-success-color:
|
95 | * alert-accent-warning-color:
|
96 | * alert-accent-danger-color:
|
97 | * alert-accent-control-color:
|
98 | * alert-outline-width:
|
99 | * alert-outline-basic-color:
|
100 | * alert-outline-primary-color:
|
101 | * alert-outline-info-color:
|
102 | * alert-outline-success-color:
|
103 | * alert-outline-warning-color:
|
104 | * alert-outline-danger-color:
|
105 | * alert-outline-control-color:
|
106 | */
|
107 | export declare class NbAlertComponent {
|
108 | protected statusService: NbStatusService;
|
109 | /**
|
110 | * Alert size, available sizes:
|
111 | * `tiny`, `small`, `medium`, `large`, `giant`
|
112 | * Unset by default.
|
113 | */
|
114 | size: '' | NbComponentSize;
|
115 | /**
|
116 | * Alert status (adds specific styles):
|
117 | * `basic` (default), `primary`, `success`, `info`, `warning`, `danger`, `control`.
|
118 | */
|
119 | status: NbComponentOrCustomStatus;
|
120 | /**
|
121 | * Alert accent (color of the top border):
|
122 | * `basic`, `primary`, `success`, `info`, `warning`, `danger`, `control`.
|
123 | * Unset by default.
|
124 | */
|
125 | accent: '' | NbComponentStatus;
|
126 | /**
|
127 | * Alert outline (color of the border):
|
128 | * `basic`, `primary`, `success`, `info`, `warning`, `danger`, `control`.
|
129 | * Unset by default.
|
130 | */
|
131 | outline: '' | NbComponentStatus;
|
132 | /**
|
133 | * Shows `close` icon
|
134 | */
|
135 | get closable(): boolean;
|
136 | set closable(value: boolean);
|
137 | protected _closable: boolean;
|
138 | static ngAcceptInputType_closable: NbBooleanInput;
|
139 | /**
|
140 | * Emits when chip is removed
|
141 | * @type EventEmitter<any>
|
142 | */
|
143 | close: EventEmitter<any>;
|
144 | constructor(statusService: NbStatusService);
|
145 | /**
|
146 | * Emits the removed chip event
|
147 | */
|
148 | onClose(): void;
|
149 | get tiny(): boolean;
|
150 | get small(): boolean;
|
151 | get medium(): boolean;
|
152 | get large(): boolean;
|
153 | get giant(): boolean;
|
154 | get primary(): boolean;
|
155 | get success(): boolean;
|
156 | get info(): boolean;
|
157 | get warning(): boolean;
|
158 | get danger(): boolean;
|
159 | get basic(): boolean;
|
160 | get control(): boolean;
|
161 | get primaryAccent(): boolean;
|
162 | get successAccent(): boolean;
|
163 | get infoAccent(): boolean;
|
164 | get warningAccent(): boolean;
|
165 | get dangerAccent(): boolean;
|
166 | get basicAccent(): boolean;
|
167 | get controlAccent(): boolean;
|
168 | get primaryOutline(): boolean;
|
169 | get successOutline(): boolean;
|
170 | get infoOutline(): boolean;
|
171 | get warningOutline(): boolean;
|
172 | get dangerOutline(): boolean;
|
173 | get basicOutline(): boolean;
|
174 | get controlOutline(): boolean;
|
175 | get additionalClasses(): string[];
|
176 | }
|