{"version":3,"file":"radioGroup.types.mjs","names":[],"sources":["../../../../package/common/radioGroup/radioGroup.types.ts"],"sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\nimport type { FormValidator } from 'services/formValidation';\nimport type { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types';\n\nexport type RadioValue = string | number;\n\nexport enum RadioGroupOrientation {\n  Vertical = 'vertical',\n  Horizontal = 'horizontal',\n}\n\nexport interface RadioOption {\n  value: RadioValue;\n  /** Visible label; falls back to `value` when omitted. */\n  label?: ReactNode;\n  /** Secondary description shown under the label. */\n  description?: ReactNode;\n  /** Disable just this option. */\n  disabled?: boolean;\n}\n\nexport type RadioGroupSlots = 'root' | 'groupLabel' | 'options' | 'option' | 'radio' | 'dot' | 'label' | 'description';\n\nexport interface RadioGroupProps extends Omit<HtmlProps, 'onChange'> {\n  /** The selectable options. */\n  options: RadioOption[];\n  /** Visible label above the options. Names the group for screen readers, and the field in its validator's messages. */\n  label?: string;\n  /** Controlled selected value. Omit for uncontrolled. */\n  value?: RadioValue;\n  /** Initial value when uncontrolled. */\n  defaultValue?: RadioValue;\n  /** Fires with the newly selected value. */\n  onChange?: (value: RadioValue, event?: React.MouseEvent | React.KeyboardEvent) => void;\n  /** Layout direction (default `Vertical`). */\n  orientation?: RadioGroupOrientation;\n  /** Disable the whole group. */\n  disabled?: boolean;\n  /** Diameter of the radio circle. Defaults to `1.125em` of `--default-font-size`, 18px at a 16px base. */\n  size?: string;\n  /** Tab index of the active (roving) option. */\n  tabIndex?: number;\n  formValidator?: FormValidator | null;\n  /** Manual error message shown in a tooltip (used when there's no `formValidator`, or to force one). */\n  errorMessage?: string;\n  /** Manual valid state when not using a `formValidator` (default `true`). */\n  isValid?: boolean;\n\n  className?: string;\n  style?: CSSProperties;\n  classNames?: SlotClassNames<RadioGroupSlots>;\n  styles?: SlotStyles<RadioGroupSlots>;\n}\n"],"mappings":"aAMA,IAAY,EAAL,SAAA,EAAA,OACL,GAAA,SAAA,WACA,EAAA,WAAA,cACF,EAAA,CAAA,CAAA"}