import React, { useEffect, useRef } from 'react'; import { hostProps } from '../utils/host-props'; import { useBooleanProperty } from '../utils/use-boolean-prop'; type BuiltinFlavor = 'primary' | 'success' | 'danger' | 'warning' | 'neutral'; type ShadedFlavor = BuiltinFlavor | `${BuiltinFlavor}+` | `${BuiltinFlavor}-`; export interface TyRadioProps extends React.HTMLAttributes { /** Form field value (selected by parent ty-radio-group when matches its `value`) */ value?: string; /** * Selected state. Usually managed by the parent `` based on its * own `value`; set explicitly only when using `ty-radio` outside a group. */ checked?: boolean; /** Disable this individual radio */ disabled?: boolean; /** Radio size — typically inherited from the parent group */ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'; /** Semantic styling variant — typically inherited from the parent group */ flavor?: ShadedFlavor | (string & {}); /** Label content (wrap in a `