{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAuBM,MAAM,0DAAc,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,YAAY,KAA+B,EAAE,GAAoC;IACpI,QAAQ,CAAA,GAAA,0CAAe,EAAE;IACzB,IAAI,WACF,OAAO,YACP,QAAQ,cACR,UAAU,aACV,SAAS,EACT,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;QAAe,WAAW;qBACtE,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,CAAA,GAAA,qCAAS,EAAE,aAAa,WAAW;QACvC,KAAK;QACL,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,wBACA;YACE,CAAC,CAAC,sBAAsB,EAAE,SAAS,CAAC,EAAE;YACtC,eAAe;YACf,aAAa;YACb,cAAc;QAChB,GACA,WAAW,SAAS;qBAGxB,0DAAC;QAAK,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OAA2B;AAIvE","sources":["packages/@adobe/react-spectrum/src/button/LogicButton.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 {AriaBaseButtonProps, ButtonProps, useButton} from 'react-aria/useButton';\n\nimport {classNames} from '../utils/classNames';\nimport {FocusableRef, StyleProps} from '@react-types/shared';\nimport {FocusRing} from 'react-aria/FocusRing';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {useFocusableRef} from '../utils/useDOMRef';\nimport {useHover} from 'react-aria/useHover';\nimport {useProviderProps} from '../provider/Provider';\nimport {useStyleProps} from '../utils/styleProps';\n\nexport interface SpectrumLogicButtonProps extends AriaBaseButtonProps, Omit<ButtonProps, 'onClick'>, StyleProps {\n  /** The type of boolean sequence to be represented by the LogicButton. */\n  variant: 'and' | 'or'\n}\n\n/**\n * A LogicButton displays an operator within a boolean logic sequence.\n */\nexport const LogicButton = React.forwardRef(function LogicButton(props: SpectrumLogicButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n  props = useProviderProps(props);\n  let {\n    variant,\n    children,\n    isDisabled,\n    autoFocus,\n    ...otherProps\n  } = props;\n  let domRef = useFocusableRef(ref);\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')} autoFocus={autoFocus}>\n      <button\n        {...styleProps}\n        {...mergeProps(buttonProps, hoverProps)}\n        ref={domRef}\n        className={\n          classNames(\n            styles,\n            'spectrum-LogicButton',\n            {\n              [`spectrum-LogicButton--${variant}`]: variant,\n              'is-disabled': isDisabled,\n              'is-active': isPressed,\n              'is-hovered': isHovered\n            },\n            styleProps.className\n          )\n        }>\n        <span className={classNames(styles, 'spectrum-Button-label')}>{children}</span>\n      </button>\n    </FocusRing>\n  );\n});\n"],"names":[],"version":3,"file":"LogicButton.cjs.map"}