1 | import { ChangeDetectorRef, EventEmitter, ElementRef, Renderer2 } from '@angular/core';
|
2 | import { NbStatusService } from '../../services/status.service';
|
3 | import { NbBooleanInput } from '../helpers';
|
4 | import { NbComponentOrCustomStatus } from '../component-status';
|
5 | import * as i0 from "@angular/core";
|
6 | /**
|
7 | * The `NbRadioComponent` provides the same functionality as native `<input type="radio">`
|
8 | * with Nebular styles and animations.
|
9 | *
|
10 | * @stacked-example(Showcase, radio/radio-showcase.component)
|
11 | *
|
12 | * ### Installation
|
13 | *
|
14 | * Import `NbRadioModule` to your feature module.
|
15 | *
|
16 | * ```ts
|
17 | * @NgModule({
|
18 | * imports: [
|
19 | * // ...
|
20 | * NbRadioModule,
|
21 | * ],
|
22 | * })
|
23 | * export class PageModule { }
|
24 | * ```
|
25 | *
|
26 | * ### Usage
|
27 | *
|
28 | * Radio buttons should be wrapped in `nb-radio-group` to provide form bindings.
|
29 | *
|
30 | * ```html
|
31 | * <nb-radio-group [(ngModel)]="selectedOption">
|
32 | * <nb-radio value="1">Option 1</nb-radio>
|
33 | * <nb-radio value="2">Option 2</nb-radio>
|
34 | * <nb-radio value="3">Option 3</nb-radio>
|
35 | * </nb-radio-group>
|
36 | * ```
|
37 | *
|
38 | * You can disable some radios in the group using a `disabled` attribute.
|
39 | *
|
40 | * @stacked-example(Disabled, radio/radio-disabled.component)
|
41 | *
|
42 | *
|
43 | * @styles
|
44 | *
|
45 | * radio-width:
|
46 | * radio-height:
|
47 | * radio-border-style:
|
48 | * radio-border-width:
|
49 | * radio-text-font-family:
|
50 | * radio-text-font-size:
|
51 | * radio-text-font-weight:
|
52 | * radio-text-line-height:
|
53 | * radio-outline-color:
|
54 | * radio-outline-width:
|
55 | * radio-basic-text-color:
|
56 | * radio-basic-border-color:
|
57 | * radio-basic-background-color:
|
58 | * radio-basic-checked-background-color:
|
59 | * radio-basic-checked-border-color:
|
60 | * radio-basic-inner-circle-color:
|
61 | * radio-basic-focus-border-color:
|
62 | * radio-basic-focus-inner-circle-color:
|
63 | * radio-basic-hover-background-color:
|
64 | * radio-basic-hover-border-color:
|
65 | * radio-basic-hover-inner-circle-color:
|
66 | * radio-basic-hover-checked-background-color:
|
67 | * radio-basic-active-border-color:
|
68 | * radio-basic-active-inner-circle-color:
|
69 | * radio-basic-disabled-background-color:
|
70 | * radio-basic-disabled-border-color:
|
71 | * radio-basic-disabled-text-color:
|
72 | * radio-basic-disabled-checked-background-color:
|
73 | * radio-basic-disabled-checked-border-color:
|
74 | * radio-basic-disabled-checked-inner-circle-color:
|
75 | * radio-primary-text-color:
|
76 | * radio-primary-border-color:
|
77 | * radio-primary-background-color:
|
78 | * radio-primary-checked-background-color:
|
79 | * radio-primary-checked-border-color:
|
80 | * radio-primary-inner-circle-color:
|
81 | * radio-primary-focus-border-color:
|
82 | * radio-primary-focus-inner-circle-color:
|
83 | * radio-primary-hover-background-color:
|
84 | * radio-primary-hover-border-color:
|
85 | * radio-primary-hover-inner-circle-color:
|
86 | * radio-primary-hover-checked-background-color:
|
87 | * radio-primary-active-border-color:
|
88 | * radio-primary-active-inner-circle-color:
|
89 | * radio-primary-disabled-background-color:
|
90 | * radio-primary-disabled-border-color:
|
91 | * radio-primary-disabled-text-color:
|
92 | * radio-primary-disabled-checked-background-color:
|
93 | * radio-primary-disabled-checked-border-color:
|
94 | * radio-primary-disabled-checked-inner-circle-color:
|
95 | * radio-success-text-color:
|
96 | * radio-success-border-color:
|
97 | * radio-success-background-color:
|
98 | * radio-success-checked-background-color:
|
99 | * radio-success-checked-border-color:
|
100 | * radio-success-inner-circle-color:
|
101 | * radio-success-focus-border-color:
|
102 | * radio-success-focus-inner-circle-color:
|
103 | * radio-success-hover-background-color:
|
104 | * radio-success-hover-border-color:
|
105 | * radio-success-hover-inner-circle-color:
|
106 | * radio-success-hover-checked-background-color:
|
107 | * radio-success-active-border-color:
|
108 | * radio-success-active-inner-circle-color:
|
109 | * radio-success-disabled-background-color:
|
110 | * radio-success-disabled-border-color:
|
111 | * radio-success-disabled-text-color:
|
112 | * radio-success-disabled-checked-background-color:
|
113 | * radio-success-disabled-checked-border-color:
|
114 | * radio-success-disabled-checked-inner-circle-color:
|
115 | * radio-info-text-color:
|
116 | * radio-info-border-color:
|
117 | * radio-info-background-color:
|
118 | * radio-info-checked-background-color:
|
119 | * radio-info-checked-border-color:
|
120 | * radio-info-inner-circle-color:
|
121 | * radio-info-focus-border-color:
|
122 | * radio-info-focus-inner-circle-color:
|
123 | * radio-info-hover-background-color:
|
124 | * radio-info-hover-border-color:
|
125 | * radio-info-hover-inner-circle-color:
|
126 | * radio-info-hover-checked-background-color:
|
127 | * radio-info-active-border-color:
|
128 | * radio-info-active-inner-circle-color:
|
129 | * radio-info-disabled-background-color:
|
130 | * radio-info-disabled-border-color:
|
131 | * radio-info-disabled-text-color:
|
132 | * radio-info-disabled-checked-background-color:
|
133 | * radio-info-disabled-checked-border-color:
|
134 | * radio-info-disabled-checked-inner-circle-color:
|
135 | * radio-warning-text-color:
|
136 | * radio-warning-border-color:
|
137 | * radio-warning-background-color:
|
138 | * radio-warning-checked-background-color:
|
139 | * radio-warning-checked-border-color:
|
140 | * radio-warning-inner-circle-color:
|
141 | * radio-warning-focus-border-color:
|
142 | * radio-warning-focus-inner-circle-color:
|
143 | * radio-warning-hover-background-color:
|
144 | * radio-warning-hover-border-color:
|
145 | * radio-warning-hover-inner-circle-color:
|
146 | * radio-warning-hover-checked-background-color:
|
147 | * radio-warning-active-border-color:
|
148 | * radio-warning-active-inner-circle-color:
|
149 | * radio-warning-disabled-background-color:
|
150 | * radio-warning-disabled-border-color:
|
151 | * radio-warning-disabled-text-color:
|
152 | * radio-warning-disabled-checked-background-color:
|
153 | * radio-warning-disabled-checked-border-color:
|
154 | * radio-warning-disabled-checked-inner-circle-color:
|
155 | * radio-danger-text-color:
|
156 | * radio-danger-border-color:
|
157 | * radio-danger-background-color:
|
158 | * radio-danger-checked-background-color:
|
159 | * radio-danger-checked-border-color:
|
160 | * radio-danger-inner-circle-color:
|
161 | * radio-danger-focus-border-color:
|
162 | * radio-danger-focus-inner-circle-color:
|
163 | * radio-danger-hover-background-color:
|
164 | * radio-danger-hover-border-color:
|
165 | * radio-danger-hover-inner-circle-color:
|
166 | * radio-danger-hover-checked-background-color:
|
167 | * radio-danger-active-border-color:
|
168 | * radio-danger-active-inner-circle-color:
|
169 | * radio-danger-disabled-background-color:
|
170 | * radio-danger-disabled-border-color:
|
171 | * radio-danger-disabled-text-color:
|
172 | * radio-danger-disabled-checked-background-color:
|
173 | * radio-danger-disabled-checked-border-color:
|
174 | * radio-danger-disabled-checked-inner-circle-color:
|
175 | * radio-control-text-color:
|
176 | * radio-control-background-color:
|
177 | * radio-control-border-color:
|
178 | * radio-control-checked-background-color:
|
179 | * radio-control-checked-border-color:
|
180 | * radio-control-inner-circle-color:
|
181 | * radio-control-focus-border-color:
|
182 | * radio-control-focus-inner-circle-color:
|
183 | * radio-control-hover-background-color:
|
184 | * radio-control-hover-border-color:
|
185 | * radio-control-hover-inner-circle-color:
|
186 | * radio-control-hover-checked-background-color:
|
187 | * radio-control-active-border-color:
|
188 | * radio-control-active-inner-circle-color:
|
189 | * radio-control-disabled-background-color:
|
190 | * radio-control-disabled-border-color:
|
191 | * radio-control-disabled-text-color:
|
192 | * radio-control-disabled-checked-background-color:
|
193 | * radio-control-disabled-checked-border-color:
|
194 | * radio-control-disabled-checked-inner-circle-color:
|
195 | * */
|
196 | export declare class NbRadioComponent {
|
197 | protected cd: ChangeDetectorRef;
|
198 | protected renderer: Renderer2;
|
199 | protected statusService: NbStatusService;
|
200 | get name(): string;
|
201 | set name(value: string);
|
202 | private _name;
|
203 | get checked(): boolean;
|
204 | set checked(value: boolean);
|
205 | private _checked;
|
206 | static ngAcceptInputType_checked: NbBooleanInput;
|
207 | get value(): any;
|
208 | set value(value: any);
|
209 | private _value;
|
210 | get disabled(): boolean;
|
211 | set disabled(disabled: boolean);
|
212 | private _disabled;
|
213 | static ngAcceptInputType_disabled: NbBooleanInput;
|
214 | status: NbComponentOrCustomStatus;
|
215 | valueChange: EventEmitter<any>;
|
216 | blur: EventEmitter<void>;
|
217 | input: ElementRef<HTMLInputElement>;
|
218 | constructor(cd: ChangeDetectorRef, renderer: Renderer2, statusService: NbStatusService);
|
219 | get isPrimary(): boolean;
|
220 | get isSuccess(): boolean;
|
221 | get isWarning(): boolean;
|
222 | get isDanger(): boolean;
|
223 | get isInfo(): boolean;
|
224 | get isBasic(): boolean;
|
225 | get isControl(): boolean;
|
226 | get additionalClasses(): string[];
|
227 | onChange(event: Event): void;
|
228 | onClick(event: Event): void;
|
229 | _markForCheck(): void;
|
230 | _setName(name: string): void;
|
231 | static ɵfac: i0.ɵɵFactoryDeclaration<NbRadioComponent, never>;
|
232 | static ɵcmp: i0.ɵɵComponentDeclaration<NbRadioComponent, "nb-radio", never, { "name": { "alias": "name"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "status": { "alias": "status"; "required": false; }; }, { "valueChange": "valueChange"; "blur": "blur"; }, never, ["*"], false, never>;
|
233 | }
|