@buddhacognitivelab/theme-glassmorphic
Version:
Enhanced glassmorphic theme package with dual-mode support, advanced glass effects, interactive UI components, and gesture-based interactions
54 lines (53 loc) • 1.73 kB
TypeScript
/**
* @fileoverview RadioGroup component for managing multiple radio buttons
*/
import React from 'react';
import { RadioProps } from '../Radio/Radio';
import type { GlassIntensity } from '../../types/theme';
export interface RadioOption {
/** Option value */
value: string | number;
/** Option label */
label: string;
/** Whether option is disabled */
disabled?: boolean;
/** Helper text for this option */
helperText?: string;
}
export interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
/** Radio group name */
name: string;
/** Current selected value */
value?: string | number;
/** Default selected value */
defaultValue?: string | number;
/** Callback when selection changes */
onChange?: (value: string | number) => void;
/** Radio options */
options: RadioOption[];
/** Radio size */
size?: RadioProps['size'];
/** Glass effect intensity */
glassIntensity?: GlassIntensity;
/** Radio group state */
state?: RadioProps['state'];
/** Radio group label */
label?: string;
/** Helper text */
helperText?: string;
/** Error message */
error?: string;
/** Whether entire group is disabled */
disabled?: boolean;
/** Whether any radio is loading */
loading?: boolean;
/** Layout direction */
direction?: 'horizontal' | 'vertical';
/** Gap between radio buttons */
gap?: 'small' | 'medium' | 'large';
/** Additional CSS class */
className?: string;
/** Required field indicator */
required?: boolean;
}
export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;