import React from 'react'; import type { InputHTMLAttributes } from 'react'; import type { OtherHTMLAttributes } from '@instructure/shared-types'; import type { ComponentStyle, NewThemeOverrideProp, Spacing } from '@instructure/emotion'; import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'; import type { NewComponentTypes } from '@instructure/ui-themes'; type RadioInputOwnProps = { /** * The label displayed next to the checkbox */ label: React.ReactNode; /** * This maps to the low level HTML attribute * [with the same name](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio#value) */ value?: string | number; /** * The id of the input element. If not provided, a unique id will be generated. */ id?: string; /** * The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio#defining_a_radio_group) * defines which group it belongs to, it's managed by the `RadioInputGroup` * this component belongs to. * * Do not set it manually. */ name?: string; /** * Sets the `checked` prop of the underlying input element. If left undefined, * the component will control its own state. */ checked?: boolean; /** * Whether to disable the input */ disabled?: boolean; /** * Works just like disabled but keeps the same styles as if it were active */ readOnly?: boolean; /** * The visual style of the radio button */ variant?: 'simple' | 'toggle'; size?: 'small' | 'medium' | 'large'; /** * Sets the background color of the radio button when `variant="toggle"` */ context?: 'success' | 'warning' | 'danger' | 'off'; /** * Sets the `display:inline-flex` in CSS */ inline?: boolean; /** * Valid values are `0`, `none`, `auto`, and Spacing token values, * see https://instructure.design/layout-spacing. Apply these values via * familiar CSS-like shorthand. For example, `margin="general.spaceMd auto"`. */ margin?: Spacing; onClick?: (event: React.MouseEvent) => void; /** * Callback fired when the input fires a change event. * event.target.value will contain the new value. It will always be a string. */ onChange?: (event: React.ChangeEvent) => void; /** * A function that provides a reference to the actual underlying input element */ inputRef?: (inputElement: HTMLInputElement | null) => void; }; type PropKeys = keyof RadioInputOwnProps; type AllowedPropKeys = Readonly>; type RadioInputProps = RadioInputOwnProps & NewThemeOverrideProp> & OtherHTMLAttributes> & WithDeterministicIdProps; type RadioInputStyle = ComponentStyle<'radioInput' | 'input' | 'label'>; type RadioInputState = { checked?: boolean; }; declare const allowedProps: AllowedPropKeys; export type { RadioInputProps, RadioInputState, RadioInputStyle }; export { allowedProps }; //# sourceMappingURL=props.d.ts.map