UNPKG

@visa/nova-angular

Version:

Visa Product Design System Nova Angular library

106 lines (105 loc) 4.05 kB
/** * Copyright (c) 2025 Visa, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * **/ import { BooleanInput } from '@angular/cdk/coercion'; import { ElementRef, EventEmitter } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { AppReadyService } from '../_utilities/services/app-stable-check.service'; import { UUIDService } from '../_utilities/services/uuid.service'; import { BaseInteractiveDirective } from '../_utilities/angular-specific-directives/base-interactive.directive'; import * as i0 from "@angular/core"; export declare class RadioDirective extends BaseInteractiveDirective implements ControlValueAccessor { private uuidService; private appReadyService; _disabledEmitter: EventEmitter<any>; _invalidEmitter: EventEmitter<any>; /** * Value of radio input. */ radioValue: string | number; get hostValue(): string | number; /** * Sets custom id. * @default uuidService.getUUID('v-radio-') * @builtin true */ id: string; get hostId(): string; /** * @ignore */ formName: string; /** * @ignore */ name: string; get hostName(): string | void; /** * Provides custom class&#40;es&#41; for custom styling. * @default .v-radio */ class: string; get hostClasses(): string; get hostType(): string; /** * Sets radio as disabled when true. * @default false */ get disabled(): boolean; set disabled(value: BooleanInput); _disabled: boolean; get hostDisabled(): "disabled" | null; /** Fires when a formControl's disabled state updates. */ setDisabledState(isDisabled: boolean): void; /** * Marks radio as invalid when true. * @default false */ get invalid(): boolean; set invalid(value: BooleanInput); _invalid: boolean; get hostAriaInvalid(): boolean; /** * Marks component as required when true. * @default false */ get required(): boolean; set required(value: BooleanInput); _required: boolean; get hostRequired(): "required" | null; /** * Sets checked state of component. * @default false */ get checked(): boolean; set checked(value: BooleanInput); _checked: boolean; _isToggle: boolean; get hostStyle(): "fixed" | "unset"; val: string | number | null; set value(value: string | number); handleChange(event: Event): void; handleFocus(event: Event): void; handleBlur(event: Event): void; constructor(el: ElementRef, uuidService: UUIDService, appReadyService: AppReadyService); onChange: (_: string | number) => void; onTouched: (_: string | number) => void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; writeValue(value: string | number): void; static ɵfac: i0.ɵɵFactoryDeclaration<RadioDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<RadioDirective, "[v-radio]", never, { "radioValue": { "alias": "value"; "required": false; }; "id": { "alias": "id"; "required": false; }; "formName": { "alias": "formControlName"; "required": false; }; "name": { "alias": "name"; "required": false; }; "class": { "alias": "class"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "required": { "alias": "required"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; }, {}, never, never, true, never>; }