{"version":3,"sources":["../src/components/RadioGroup/RadioGroup.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type RadioGroupSlots = {\n  /**\n   * The radio group root.\n   */\n  root: NonNullable<Slot<'div'>>;\n};\n\nexport type RadioGroupProps = Omit<ComponentProps<Partial<RadioGroupSlots>>, 'onChange'> & {\n  /**\n   * The name of this radio group. This name is applied to all Radio items inside this group.\n   *\n   * If no name is provided, one will be generated so that all of the Radio items have the same name.\n   */\n  name?: string;\n\n  /**\n   * The selected Radio item in this group.\n   *\n   * This should be the `value` prop of one of the Radio items inside this group.\n   */\n  value?: string;\n\n  /**\n   * The default selected Radio item in this group.\n   *\n   * This should be the `value` prop of one of the Radio items inside this group.\n   */\n  defaultValue?: string;\n\n  /**\n   * Callback when the selected Radio item changes.\n   */\n  // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n  onChange?: (ev: React.FormEvent<HTMLDivElement>, data: RadioGroupOnChangeData) => void;\n\n  /**\n   * How the radio items are laid out in the group.\n   *\n   * @default vertical\n   */\n  layout?: 'vertical' | 'horizontal' | 'horizontal-stacked';\n\n  /**\n   * Disable all Radio items in this group.\n   */\n  disabled?: boolean;\n\n  /**\n   * Require a selection in this group. Adds the `required` prop to all child Radio items.\n   */\n  required?: boolean;\n};\n\nexport type RadioGroupBaseProps = Omit<RadioGroupProps, 'layout'>;\n\n/**\n * Data for the onChange event for RadioGroup.\n */\nexport type RadioGroupOnChangeData = {\n  /**\n   * The value of the newly selected Radio item.\n   */\n  value: string;\n};\n\n/**\n * State used in rendering RadioGroup\n */\nexport type RadioGroupState = ComponentState<RadioGroupSlots> &\n  Required<Pick<RadioGroupProps, 'layout'>> &\n  Pick<RadioGroupProps, 'name' | 'value' | 'defaultValue' | 'disabled' | 'layout' | 'required'>;\n\nexport type RadioGroupBaseState = Omit<RadioGroupState, 'layout'>;\n\nexport type RadioGroupContextValue = Pick<\n  RadioGroupProps,\n  'name' | 'value' | 'defaultValue' | 'disabled' | 'layout' | 'required' | 'aria-describedby'\n>;\n\nexport type RadioGroupContextValues = {\n  radioGroup: RadioGroupContextValue;\n};\n"],"names":[],"mappings":""}