import { Cre8Element } from '../cre8-element'; import '../field-note/field-note'; /** One option in a data-driven radio field. */ export interface Cre8RadioItemData { label: string; value?: string; checked?: boolean; disabled?: boolean; required?: boolean; } /** * Radio Field is the parent container for `radio-field-item`. * It is required to allow for grouping numerous radio fields that need additional context (in the form of ``). * It also provides accessibility roles, aria attributes and field note messaging on the group. * * See [radio-field-item](?path=/story/cre8-components-radio-field-item--default) for more guidance on its usage. * * @slot - The component content, which should be a set of `radio-field-item`s */ export declare class Cre8RadioField extends Cre8Element { static styles: import("lit").CSSResult[]; /** * Radio Field Note * @attr {string} */ fieldNote?: string; /** * Radio container fieldnote aria describe by * @attr {string} */ ariaDescribedBy?: string; /** * Radio container fieldnote icon name * @attr {string} */ fieldNoteIconName?: string; /** * Radio container fieldnote knockout * @attr {boolean} */ fieldNoteKnockout?: boolean; /** * Radio container fieldnote isSuccess * @attr {boolean} */ isSuccess?: boolean; /** * Radio container fieldnote isError * @attr {boolean} */ isError?: boolean; /** * Radio field legend label */ label?: string; /** * Options for a data-driven radio field. Each becomes a * `cre8-radio-field-item` sharing the field's `name`, which is what the form * submits under. Exclusivity is enforced by the field itself — see * `enforceSingleSelection`, and do not assume `name` alone does it. */ items?: Cre8RadioItemData[]; /** Form control name shared by every generated option. */ name?: string; /** The composition the data property stands for. */ private buildComposition; protected updated(changed: Map): void; connectedCallback(): void; disconnectedCallback(): void; /** * Keep the group to one selection. * * A native radio group is formed by `name`, but only within one tree scope — * and each `cre8-radio-field-item` keeps its `input` in its own shadow root, * so the browser never sees them as siblings and every option stays checked * once clicked. That is true of a hand-written field too, not just a generated * one, which is why the fix lives here on the group rather than in the * flattened path. */ private enforceSingleSelection; render(): import("lit-html").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'cre8-radio-field': Cre8RadioField; } } export default Cre8RadioField; //# sourceMappingURL=radio-field.d.ts.map