import { ComponentDefaultProps } from '@justeattakeaway/pie-webc-core'; import { CSSResult } from 'lit'; import { FormControlInterface } from '@justeattakeaway/pie-webc-core'; import { GenericConstructor } from '@justeattakeaway/pie-webc-core'; import { PieElement } from '@justeattakeaway/pie-webc-core/src/internals/PieElement'; import { RTLInterface } from '@justeattakeaway/pie-webc-core'; import { TemplateResult } from 'lit-html'; export declare type DefaultProps = ComponentDefaultProps>; export declare const defaultProps: DefaultProps; /** * @tagname pie-radio * @event {InputEvent} input - Should fire whenever a user toggles the radio. * @event {CustomEvent} change - Fires when the radio is checked (but not when unchecked). */ export declare class PieRadio extends PieRadio_base implements RadioProps { private _disabledByParent; private _isAnimationAllowed; private _contextAria?; checked: boolean; defaultChecked: boolean; disabled: boolean; name: RadioProps['name']; required: boolean; value: RadioProps['value']; status: "default" | "error"; private _radio; private _abortController; connectedCallback(): void; disconnectedCallback(): void; /** * Ensures that the form value is in sync with the component. */ private _handleFormAssociation; /** * Captures the native change event and wraps it in a custom event. * @param {Event} event - This should be the change event that was listened for on an input element with `type="radio"`. */ private _handleChange; /** * (Read-only) returns a ValidityState with the validity states that this element is in. * https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/validity */ get validity(): ValidityState; /** * Called when the form that contains this component is reset. * If the current checked state is different to the default checked state, * the checked state is reset to the default checked state and a `change` event is emitted. */ formResetCallback(): void; private _handleClick; updated(): void; /** * When an ancestor provides ARIA (for example a `pie-list-item`), applies the name and * description to the host, which carries `role="radio"` and so is the element assistive tech * announces. Guarded to only run when a provider exists (in a list), so a standalone radio's * consumer-set `aria-*` is never removed. */ private _applyContextAria; render(): TemplateResult<1>; static styles: CSSResult; } declare const PieRadio_base: GenericConstructor & GenericConstructor & typeof PieElement; export declare interface RadioProps { /** * The checked state of the radio. */ checked?: boolean; /** * The default checked state of the radio (not necessarily the same as the current checked state). * Used when the radio is part of a form that is reset. */ defaultChecked?: boolean; /** * Same as the HTML disabled attribute - indicates whether or not the radio is disabled. */ disabled?: boolean; /** * The name of the radio (used as a key/value pair with `value`). This is required in order to work properly with forms. */ name?: string; /** * Same as native required attribute. If any radio button in a same-named group of radio buttons has the required attribute, * a radio button in that group must be checked, although it doesn't have to be the one with the attribute applied. */ required?: boolean; /** * The value of the radio (used as a key/value pair in HTML forms with `name`). */ value: string; /** * The status of the radio component. Can be default or error. */ status?: typeof statusTypes[number]; } export declare const statusTypes: readonly ["default", "error"]; export { }