{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AA+BM,MAAM,0DAAa,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,WAAW,KAA8B,EAAE,GAAwB;IACrH,QAAQ,CAAA,GAAA,0CAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,sCAAW,EAAE;IACrB,IAAI,gBACF,YAAY,YACZ,QAAQ,eACR,cAAc,YACf,GAAG;IAEJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,QAAQ,CAAA,GAAA,wDAAiB,EAAE;IAC/B,IAAI,mBAAC,eAAe,EAAE,GAAG,YAAW,GAAG,CAAA,GAAA,2CAAY,EAAE,OAAO;IAE5D,qBACE,0DAAC,CAAA,GAAA,+BAAI;QACF,GAAG,KAAK;QACR,GAAG,UAAU;QACd,KAAK;QACL,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QACrC,aAAY;qBACZ,0DAAC;QACE,GAAG,eAAe;QACnB,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,6BACA;YACE,yCAAyC,gBAAgB;QAC3D;qBAGJ,0DAAC,CAAA,GAAA,sCAAW,EAAE,QAAQ;QACpB,OAAO;0BACL;mBACA;QACF;OACC;AAKX","sources":["packages/@adobe/react-spectrum/src/radio/RadioGroup.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaRadioGroupProps, RadioProps, useRadioGroup} from 'react-aria/useRadioGroup';\n\nimport {classNames} from '../utils/classNames';\nimport {DOMRef, SpectrumHelpTextProps, SpectrumLabelableProps, StyleProps} from '@react-types/shared';\nimport {Field} from '../label/Field';\nimport {RadioContext} from './context';\nimport React, {ReactElement} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/fieldgroup/vars.css';\nimport {useDOMRef} from '../utils/useDOMRef';\nimport {useFormProps} from '../form/Form';\nimport {useProviderProps} from '../provider/Provider';\nimport {useRadioGroupState} from 'react-stately/useRadioGroupState';\n\nexport interface SpectrumRadioGroupProps extends AriaRadioGroupProps, SpectrumLabelableProps, StyleProps, SpectrumHelpTextProps {\n  /**\n   * The Radio(s) contained within the RadioGroup.\n   */\n  children: ReactElement<RadioProps> | ReactElement<RadioProps>[],\n  /**\n   * By default, radio buttons are not emphasized (gray).\n   * The emphasized (blue) version provides visual prominence.\n   */\n  isEmphasized?: boolean\n}\n\n/**\n * Radio groups allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nexport const RadioGroup = React.forwardRef(function RadioGroup(props: SpectrumRadioGroupProps, ref: DOMRef<HTMLElement>) {\n  props = useProviderProps(props);\n  props = useFormProps(props);\n  let {\n    isEmphasized,\n    children,\n    orientation = 'vertical'\n  } = props;\n\n  let domRef = useDOMRef(ref);\n  let state = useRadioGroupState(props);\n  let {radioGroupProps, ...otherProps} = useRadioGroup(props, state);\n\n  return (\n    <Field\n      {...props}\n      {...otherProps}\n      ref={domRef}\n      wrapperClassName={classNames(styles, 'spectrum-FieldGroup')}\n      elementType=\"span\">\n      <div\n        {...radioGroupProps}\n        className={\n          classNames(\n            styles,\n            'spectrum-FieldGroup-group',\n            {\n              'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'\n            }\n          )\n        }>\n        <RadioContext.Provider\n          value={{\n            isEmphasized,\n            state\n          }}>\n          {children}\n        </RadioContext.Provider>\n      </div>\n    </Field>\n  );\n});\n"],"names":[],"version":3,"file":"RadioGroup.cjs.map"}