import React from 'react'; import type { FormMessage } from '@instructure/ui-form-field/latest'; import type { OtherHTMLAttributes } from '@instructure/shared-types'; import type { Spacing } from '@instructure/emotion'; type RadioInputGroupOwnProps = { /** * This prop sets the * [same low level HTML attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio#defining_a_radio_group) * * **Must be unique across the DOM** otherwise groups will interfere with * each other */ name: string; /** * The text above the radio group. Use `ScreenReaderContent` if you don't want it to be visible. */ description: React.ReactNode; /** * value to set on initial render */ defaultValue?: string | number; /** * the selected value (must be accompanied by an `onChange` prop) */ value?: string | number; /** * when used with the `value` prop, the component will not control its own state */ onChange?: (event: React.ChangeEvent, value: string) => void; disabled?: boolean; /** * works just like disabled but keeps the same styles as if it were active */ readOnly?: boolean; /** * Array of objects with shape: `{ * text: ReactNode, * type: One of: ['error', 'newError', 'hint', 'success', 'screenreader-only'] * }` */ messages?: FormMessage[]; variant?: 'simple' | 'toggle'; size?: 'small' | 'medium' | 'large'; layout?: 'stacked' | 'columns' | 'inline'; /** * any children (ones that aren't `RadioInput` are passed through) */ children?: React.ReactNode; /** * Setting this to `true` adds an asterisk after the description (group label) and * sets `aria-required` on the group, so screen readers announce it as required. * It does not turn on native form validation. */ isRequired?: 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; }; type PropKeys = keyof RadioInputGroupOwnProps; type AllowedPropKeys = Readonly>; type RadioInputGroupProps = RadioInputGroupOwnProps & OtherHTMLAttributes; type RadioInputGroupState = { value?: string | number; }; declare const allowedProps: AllowedPropKeys; export type { RadioInputGroupProps, RadioInputGroupState }; export { allowedProps }; //# sourceMappingURL=props.d.ts.map