UNPKG

@ownclouders/design-system

Version:

ownCloud Design System is based on VueDesign Systems and is used to design ownCloud UI components

48 lines (47 loc) 1.84 kB
import { AvailableSizeType } from '../../helpers'; /** * OcRadio Component * * A radio button component that can be grouped to allow users to select one option from a set. * * @component * @name OcRadio * @status ready * @release 1.0.0 * * @props * @prop {string} [id] - Id for the radio button. If not provided, a unique id will be generated. * @prop {boolean} [disabled=false] - Disables the radio button. * @prop {unknown} [modelValue=false] - The model value of the radio button or group. Determines if the radio button is checked. * @prop {unknown} [option=null] - The value of this radio button. Used when part of a group. * @prop {string} [label=null] - Label for the radio button. Required for accessibility. * @prop {boolean} [hideLabel=false] - Hides the label visually but keeps it for screen readers. * @prop { 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge' } [size='medium'] - Size of the radio button. * * @emits * @event update:modelValue - Emitted when the model value changes. * * @example * <oc-radio * v-for="o in availableOptions" * :key="'option-' + o" * v-model="selectedOption" * :option="o" * :label="o" * /> */ interface Props { id?: string; disabled?: boolean; modelValue?: unknown; option?: unknown; label?: string; hideLabel?: boolean; size?: AvailableSizeType; } declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & { "update:modelValue": (value: unknown) => any; }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{ "onUpdate:modelValue"?: (value: unknown) => any; }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLSpanElement>; export default _default;