{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAwBM,MAAM,0DAAc,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,YAAY,KAAuB,EAAE,GAAiB;IACzG,QAAQ,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC5B,IAAI,WACF,OAAO,cACP,UAAU,mBACV,eAAe,aACf,SAAS,YACT,QAAQ,aACR,SAAS,YACT,QAAQ,kBACR,cAAc,EACd,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE;IAC7B,IAAI,eAAC,WAAW,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,mCAAQ,EAAE,OAAO;IAChD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,iCAAO,EAAE;oBAAC;IAAU;IAClD,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAEjC,qBACE,0DAAC,CAAA,GAAA,mCAAQ;QAAE,gBAAgB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,cAAc;QAAiB,WAAW;qBACtF,0DAAC;QACE,GAAG,CAAA,GAAA,qCAAS,EAAE,aAAa,WAAW;QACvC,KAAK;QACL,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,wBACA;YACE,+BAA+B;YAC/B,aAAa,YAAY;YACzB,eAAe;YACf,iCAAiC,aAAa,oBAAoB;YAClE,cAAc;QAChB,GACA,WAAW,SAAS;qBAGxB,0DAAC,CAAA,GAAA,sCAAW;QACV,OAAO;YACL,MAAM;gBACJ,MAAM;gBACN,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;YACvC;QACF;OACC;AAKX","sources":["packages/@adobe/react-spectrum/src/button/FieldButton.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 {ButtonProps, useButton} from 'react-aria/useButton';\n\nimport {classNames} from '../utils/classNames';\nimport {DOMProps, FocusableRef, RefObject, StyleProps} from '@react-types/shared';\nimport {FocusRing} from 'react-aria/FocusRing';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React from 'react';\nimport {SlotProvider, useSlotProps} from '../utils/Slots';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {useFocusableRef} from '../utils/useDOMRef';\nimport {useHover} from 'react-aria/useHover';\nimport {useStyleProps} from '../utils/styleProps';\n\ninterface FieldButtonProps extends ButtonProps, DOMProps, StyleProps {\n  isQuiet?: boolean,\n  isActive?: boolean,\n  validationState?: 'valid' | 'invalid',\n  isInvalid?: boolean,\n  focusRingClass?: string\n}\n\n// @private\nexport const FieldButton = React.forwardRef(function FieldButton(props: FieldButtonProps, ref: FocusableRef) {\n  props = useSlotProps(props, 'button');\n  let {\n    isQuiet,\n    isDisabled,\n    validationState,\n    isInvalid,\n    children,\n    autoFocus,\n    isActive,\n    focusRingClass,\n    ...otherProps\n  } = props;\n  let domRef = useFocusableRef(ref) as RefObject<HTMLButtonElement | null>;\n  let {buttonProps, isPressed} = useButton(props, domRef);\n  let {hoverProps, isHovered} = useHover({isDisabled});\n  let {styleProps} = useStyleProps(otherProps);\n\n  return (\n    <FocusRing focusRingClass={classNames(styles, 'focus-ring', focusRingClass)} autoFocus={autoFocus}>\n      <button\n        {...mergeProps(buttonProps, hoverProps)}\n        ref={domRef}\n        className={\n          classNames(\n            styles,\n            'spectrum-FieldButton',\n            {\n              'spectrum-FieldButton--quiet': isQuiet,\n              'is-active': isActive || isPressed,\n              'is-disabled': isDisabled,\n              'spectrum-FieldButton--invalid': isInvalid || validationState === 'invalid',\n              'is-hovered': isHovered\n            },\n            styleProps.className\n          )\n        }>\n        <SlotProvider\n          slots={{\n            icon: {\n              size: 'S',\n              UNSAFE_className: classNames(styles, 'spectrum-Icon')\n            }\n          }}>\n          {children}\n        </SlotProvider>\n      </button>\n    </FocusRing>\n  );\n});\n"],"names":[],"version":3,"file":"FieldButton.cjs.map"}