UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

73 lines (72 loc) 2.88 kB
/// <reference path="../../index.d.ts" /> import type { PublicLitElement as LitElement } from "@arcgis/lumina"; import type { Layout, Scale, Status } from "../interfaces.js"; import type { IconName } from "../calcite-icon/interfaces.js"; import type { RadioButton } from "../calcite-radio-button/customElement.js"; /** * @cssproperty [--calcite-radio-button-group-gap] - Specifies the space between slotted components in the component. * @cssproperty [--calcite-radio-button-input-message-spacing] - Specifies the margin spacing at the top of the `calcite-input-message`. * @slot - A slot for adding `calcite-radio-button`s. * @slot [label-content] - A slot for rendering content next to the component's `labelText`. */ export abstract class RadioButtonGroup extends LitElement { /** * When `true`, interaction is prevented and the component is displayed with lower opacity. * * @default false */ accessor disabled: boolean; /** Specifies the component's label text. */ accessor labelText: string; /** * Specifies the layout of the component. * * @default "horizontal" */ accessor layout: Extract<"horizontal" | "vertical", Layout>; /** Overrides individual strings used by the component. */ accessor messageOverrides: { required?: string; }; /** * Specifies the name of the component. Required to pass the component's `value` on form submission. * * @required */ accessor name: string; /** * When `true` and the component resides in a form, * the component must have a value in order for the form to submit. * * @default false */ accessor required: boolean; /** * Specifies the size of the component. * * @default "m" */ accessor scale: Scale; /** Specifies the component's selected item. */ get selectedItem(): RadioButton; /** * Specifies the status of the validation message. * * @default "idle" */ accessor status: Status; /** Specifies the validation icon to display under the component. */ accessor validationIcon: IconName | boolean; /** Specifies the validation message to display under the component. */ accessor validationMessage: string; /** * Sets focus on the fist focusable `calcite-radio-button` element in the component. * * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component. * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options) */ setFocus(options?: FocusOptions): Promise<void>; /** Fires when the component has changed. */ readonly calciteRadioButtonGroupChange: import("@arcgis/lumina").TargetedEvent<this, void>; readonly "@eventTypes": { calciteRadioButtonGroupChange: RadioButtonGroup["calciteRadioButtonGroupChange"]["detail"]; }; }