UNPKG

primeng

Version:

PrimeNG is a premium UI library for Angular featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock,

188 lines (184 loc) 7.28 kB
import { RadioButtonPassThrough, RadioButtonClickEvent } from 'primeng/types/radiobutton'; export * from 'primeng/types/radiobutton'; import * as _angular_core from '@angular/core'; import { Provider, ElementRef, Injector } from '@angular/core'; import { NgControl } from '@angular/forms'; import { BaseEditableHolder } from 'primeng/baseeditableholder'; import * as i1 from 'primeng/bind'; import { Bind } from 'primeng/bind'; import { Nullable } from 'primeng/ts-helpers'; import { InputVariant, InputSize } from 'primeng/types/shared'; import { BaseStyle } from 'primeng/base'; import * as i2 from 'primeng/api'; /** * * RadioButton is an extension to standard radio button element with theming. * * [Live Demo](https://www.primeng.org/radiobutton/) * * @module radiobuttonstyle * */ declare enum RadioButtonClasses { /** * Class name of the root element */ root = "p-radiobutton", /** * Class name of the box element */ box = "p-radiobutton-box", /** * Class name of the input element */ input = "p-radiobutton-input", /** * Class name of the icon element */ icon = "p-radiobutton-icon" } declare class RadioButtonStyle extends BaseStyle { name: string; style: string; classes: { root: ({ instance }: { instance: any; }) => (string | { 'p-radiobutton-checked': any; 'p-disabled': any; 'p-invalid': any; 'p-variant-filled': boolean; 'p-radiobutton-sm p-inputfield-sm': boolean; 'p-radiobutton-lg p-inputfield-lg': boolean; })[]; box: string; input: string; icon: string; }; static ɵfac: _angular_core.ɵɵFactoryDeclaration<RadioButtonStyle, never>; static ɵprov: _angular_core.ɵɵInjectableDeclaration<RadioButtonStyle>; } interface RadioButtonStyle extends BaseStyle { } declare const RADIO_VALUE_ACCESSOR: Provider; declare class RadioControlRegistry { private accessors; add(control: NgControl, accessor: RadioButton): void; remove(accessor: RadioButton): void; select(accessor: RadioButton): void; private isSameGroup; static ɵfac: _angular_core.ɵɵFactoryDeclaration<RadioControlRegistry, never>; static ɵprov: _angular_core.ɵɵInjectableDeclaration<RadioControlRegistry>; } /** * RadioButton is an extension to standard radio button element with theming. * @group Components */ declare class RadioButton extends BaseEditableHolder<RadioButtonPassThrough> { componentName: string; $pcRadioButton: RadioButton | undefined; bindDirectiveInstance: Bind; onAfterViewChecked(): void; /** * Value of the radiobutton. * @group Props */ value: _angular_core.InputSignal<any>; /** * Index of the element in tabbing order. * @group Props */ tabindex: _angular_core.InputSignal<number | undefined>; /** * Identifier of the focus input to match a label defined for the component. * @group Props */ inputId: _angular_core.InputSignal<string | undefined>; /** * Establishes relationships between the component and label(s) where its value should be one or more element IDs. * @group Props */ ariaLabelledBy: _angular_core.InputSignal<string | undefined>; /** * Used to define a string that labels the input element. * @group Props */ ariaLabel: _angular_core.InputSignal<string | undefined>; /** * When present, it specifies that the component should automatically get focus on load. * @group Props */ autofocus: _angular_core.InputSignalWithTransform<boolean, unknown>; /** * Allows to select a boolean value. * @group Props */ binary: _angular_core.InputSignalWithTransform<boolean, unknown>; /** * Specifies the input variant of the component. * @defaultValue undefined * @group Props */ variant: _angular_core.InputSignal<InputVariant | undefined>; /** * Specifies the size of the component. * @defaultValue undefined * @group Props */ size: _angular_core.InputSignal<InputSize | undefined>; /** * Callback to invoke on radio button click. * @param {RadioButtonClickEvent} event - Custom click event. * @group Emits */ onClick: _angular_core.OutputEmitterRef<RadioButtonClickEvent>; /** * Callback to invoke when the receives focus. * @param {Event} event - Browser event. * @group Emits */ onFocus: _angular_core.OutputEmitterRef<Event>; /** * Callback to invoke when the loses focus. * @param {Event} event - Browser event. * @group Emits */ onBlur: _angular_core.OutputEmitterRef<Event>; inputViewChild: _angular_core.Signal<ElementRef<any>>; $variant: _angular_core.Signal<InputVariant | null>; attrRequired: _angular_core.Signal<"" | undefined>; attrDisabled: _angular_core.Signal<"" | undefined>; dataP: _angular_core.Signal<string>; checked: _angular_core.WritableSignal<Nullable<boolean>>; focused: Nullable<boolean>; control: Nullable<NgControl>; _componentStyle: RadioButtonStyle; injector: Injector; registry: RadioControlRegistry; onInit(): void; onChange(event: any): void; select(event: Event): void; onInputFocus(event: Event): void; onInputBlur(event: Event): void; /** * Applies focus to input field. * @group Method */ focus(): void; /** * @override * * @see {@link BaseEditableHolder.writeControlValue} * Writes the value to the control. */ writeControlValue(value: any, setModelValue: (value: any) => void): void; onDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration<RadioButton, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<RadioButton, "p-radiobutton, p-radio-button", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "autofocus": { "alias": "autofocus"; "required": false; "isSignal": true; }; "binary": { "alias": "binary"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "onClick": "onClick"; "onFocus": "onFocus"; "onBlur": "onBlur"; }, never, never, true, [{ directive: typeof i1.Bind; inputs: {}; outputs: {}; }]>; } declare class RadioButtonModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration<RadioButtonModule, never>; static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RadioButtonModule, never, [typeof RadioButton, typeof i2.SharedModule], [typeof RadioButton, typeof i2.SharedModule]>; static ɵinj: _angular_core.ɵɵInjectorDeclaration<RadioButtonModule>; } export { RADIO_VALUE_ACCESSOR, RadioButton, RadioButtonClasses, RadioButtonModule, RadioButtonStyle, RadioControlRegistry };