igniteui-webcomponents
Version:
Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.
97 lines (96 loc) • 3.48 kB
TypeScript
import { LitElement } from 'lit';
import type { Constructor } from '../common/mixins/constructor.js';
export interface RadioChangeEventArgs {
checked: boolean;
value?: string;
}
export interface IgcRadioEventMap {
igcChange: CustomEvent<RadioChangeEventArgs>;
focus: FocusEvent;
blur: FocusEvent;
}
declare const IgcRadioComponent_base: Constructor<import("../common/mixins/form-associated-required.js").FormRequiredInterface & import("../common/mixins/form-associated.js").FormAssociatedElementInterface> & Constructor<import("../common/mixins/event-emitter.js").EventEmitterInterface<IgcRadioEventMap>> & Constructor<LitElement>;
/**
* @element igc-radio
*
* @slot - The radio label.
*
* @fires igcChange - Emitted when the control's checked state changes.
*
* @csspart base - The radio control base wrapper.
* @csspart control - The radio input control.
* @csspart label - The radio control label.
*/
export default class IgcRadioComponent extends IgcRadioComponent_base {
static readonly tagName = "igc-radio";
protected static styles: import("lit").CSSResult[];
static register(): void;
private static readonly increment;
protected get __validators(): import("../common/validators.js").Validator<IgcRadioComponent>[];
private inputId;
private labelId;
private _kbFocus;
protected _checked: boolean;
protected _value: string;
protected input: HTMLInputElement;
protected label: Array<Node>;
private _tabIndex;
protected hideLabel: boolean;
/** Returns all radio elements from the group, that is having the same name property. */
private get _radios();
/** All sibling radio elements of the one invoking the getter. */
private get _siblings();
/** All non-disabled radio elements from the group. */
private get _active();
/** All checked radio elements from the group. */
private get _checkedRadios();
protected setDefaultValue(): void;
/**
* The value attribute of the control.
* @attr
*/
set value(value: string);
get value(): string;
/**
* The checked state of the control.
* @attr
*/
set checked(value: boolean);
get checked(): boolean;
/**
* The label position of the radio control.
* @attr label-position
*/
labelPosition: 'before' | 'after';
constructor();
protected createRenderRoot(): HTMLElement | DocumentFragment;
connectedCallback(): void;
protected firstUpdated(): Promise<void>;
/** Simulates a click on the radio control. */
click(): void;
/** Sets focus on the radio control. */
focus(options?: FocusOptions): void;
/** Removes focus from the radio control. */
blur(): void;
/**
* Sets a custom validation message for the control.
* As long as `message` is not empty, the control is considered invalid.
*/
setCustomValidity(message: string): void;
protected requiredChange(): void;
private _updateCheckedState;
private _updateUncheckedState;
protected formResetCallback(): void;
/** Called after a form reset callback to restore default keyboard navigation. */
private _resetTabIndexes;
protected handleClick(): void;
protected handleBlur(): void;
protected navigate(idx: number): void;
protected render(): import("lit-html").TemplateResult<1>;
}
declare global {
interface HTMLElementTagNameMap {
'igc-radio': IgcRadioComponent;
}
}
export {};