import ShoelaceElement from '../../internal/shoelace-element.js'; import SlAnimation from '../animation/animation.component.js'; import SlIcon from '../icon/icon.component.js'; import type { CSSResultGroup } from 'lit'; /** * @summary Shoelace's Radio component, more commonly called **Radio Button**, allows the user to select a single option from a group. Radios should always be nested within a [Radio Group](/components/radio-group). * @documentation https://shoelace.style/components/radio * @status stable * @since 2.0 * @pattern stable * @figma ready * * @dependency sl-icon * * @slot - The radio's label. * @slot description - A description of the radio's label. Serves as help text for individual radio items. Alternatively, you can use the `description` attribute. * @slot selected-content - Use to nest rich content (like an input) inside a selected radio item. Use only with the contained style. * * @event sl-blur - Emitted when the control loses focus. * @event sl-focus - Emitted when the control gains focus. * * @csspart base - The component's base wrapper. * @csspart control - The circular container that wraps the radio's checked state. * @csspart control--checked - The radio control when the radio is checked. * @csspart checked-icon - The checked icon, an `` element. * @csspart label - The container that wraps the radio's label. * @csspart description - The container that wraps the radio's description. * @csspart selected-content - The container that wraps optional content that appears when a radio is selected (checked). */ export default class SlRadio extends ShoelaceElement { static styles: CSSResultGroup; static dependencies: { 'sl-icon': typeof SlIcon; 'sl-animation': typeof SlAnimation; }; private readonly hasSlotController; checked: boolean; protected hasFocus: boolean; /** The radio's value. When selected, the radio group will receive this value. */ value: string; /** * The radio's size. When used inside a radio group, the size will be determined by the radio group's size so this * attribute can typically be omitted. */ size: 'small' | 'medium' | 'large'; /** A description of the radio's label. Serves as help text for individual radio items. If you need to display HTML, use the `description` slot instead. */ description: string; /** Disables the radio. */ disabled: boolean; /** Draws a container around the radio. */ contained: boolean; /** Applies styles relevant to radios in a horizontal layout. */ horizontal: boolean; constructor(); connectedCallback(): void; private handleBlur; private handleClick; private handleFocus; private setInitialAttributes; handleCheckedChange(): void; handleDisabledChange(): void; render(): import("lit-html").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'sl-radio': SlRadio; } }