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,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OACjC;AAKX","sources":["packages/@adobe/react-spectrum/src/radio/Radio.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 {AriaRadioProps, useRadio} from 'react-aria/useRadioGroup';\n\nimport {classNames} from '../utils/classNames';\nimport {FocusableRef, StyleProps} from '@react-types/shared';\nimport {FocusRing} from 'react-aria/FocusRing';\nimport React, {forwardRef, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/radio/vars.css';\nimport {useFocusableRef} from '../utils/useDOMRef';\nimport {useHover} from 'react-aria/useHover';\nimport {useRadioProvider} from './context';\nimport {useStyleProps} from '../utils/styleProps';\n\nexport interface SpectrumRadioProps extends Omit<AriaRadioProps, 'onClick'>, StyleProps {}\n\n/**\n * Radio buttons 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 Radio = forwardRef(function Radio(props: SpectrumRadioProps, ref: FocusableRef<HTMLLabelElement>) {\n  let {\n    isDisabled,\n    children,\n    autoFocus,\n    ...otherProps\n  } = props;\n  let {styleProps} = useStyleProps(otherProps);\n  let {hoverProps, isHovered} = useHover({isDisabled});\n\n  let inputRef = useRef<HTMLInputElement>(null);\n  let domRef = useFocusableRef(ref, inputRef);\n\n  let radioGroupProps = useRadioProvider();\n  let {\n    isEmphasized,\n    state\n  } = radioGroupProps;\n\n  let {inputProps} = useRadio({\n    ...props,\n    ...radioGroupProps,\n    isDisabled\n  }, state, inputRef);\n\n  return (\n    <label\n      {...styleProps}\n      {...hoverProps}\n      ref={domRef}\n      className={\n        classNames(\n          styles,\n          'spectrum-Radio',\n          {\n            // Removing. Pending design feedback.\n            // 'spectrum-Radio--labelBelow': labelPosition === 'bottom',\n            'spectrum-Radio--quiet': !isEmphasized,\n            'is-disabled': isDisabled,\n            'is-invalid': state.isInvalid,\n            'is-hovered': isHovered\n          },\n          styleProps.className\n        )\n      }>\n      <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n        <input\n          {...inputProps}\n          ref={inputRef}\n          className={classNames(styles, 'spectrum-Radio-input')} />\n      </FocusRing>\n      <span className={classNames(styles, 'spectrum-Radio-button')} />\n      {children && (\n        <span className={classNames(styles, 'spectrum-Radio-label')}>\n          {children}\n        </span>\n      )}\n    </label>\n  );\n});\n"],"names":[],"version":3,"file":"Radio.cjs.map"}