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