/*! Strand UI | MIT License | dillingerstaffing.com */ import type { JSX } from "preact"; import { forwardRef } from "preact/compat"; import { cx } from "../../internal/index.js"; export interface RadioProps extends Omit, "checked" | "onChange" | "label" | "type"> { /** Controlled state; leave unset to let the input own it. */ checked?: boolean; /** Initial state of an uncontrolled radio. */ defaultChecked?: boolean; onChange?: (e: Event) => void; disabled?: boolean; label?: string; name?: string; value?: string; /** `compact` drops the row to 30px on a fine pointer only (DL 14.7). */ density?: "comfortable" | "compact"; className?: string; } /** * Single-selection control for a radio group; the native input carries the state and the sheet reads it. * * @example * setPlan("pro")} /> */ export const Radio = forwardRef( ({ checked, defaultChecked, onChange, disabled = false, label, name, value, density = "comfortable", className = "", ...rest }, ref) => ( ), ); Radio.displayName = "Radio";