/** * DTRadioGroup — Hexagonal radio buttons. * * Uses a custom span for the hexagon indicator since ::before pseudo-elements * on are unreliable in Chromium/Electron. * * CSS reference: forms-dt.css .dt-radio-hex, .dt-radio-option */ import { useId, type CSSProperties } from 'react'; import { cx } from '../utils/cx'; interface DTRadioOption { value: string; label: string; } interface DTRadioGroupProps { options: DTRadioOption[]; value: string; onChange: (value: string) => void; name?: string; className?: string; style?: CSSProperties; } export { type DTRadioOption }; export function DTRadioGroup({ options, value, onChange, name, className, style, }: DTRadioGroupProps) { const groupId = useId(); const groupName = name || `dt-radio-${groupId}`; return (