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QACJ,kBAAkB,CAAA,GAAA,yCAAS,EACzB,CAAA,GAAA,oDAAW,GACX,gCACA;QAEF,MAAK;QAGR,cAAc,UAAU,UAAU,0BACjC,gCAAC,CAAA,GAAA,sCAAe;QACd,kBAAkB,CAAA,GAAA,yCAAS,EACzB,CAAA,GAAA,oDAAW,GACX,gCACA;;AAOd","sources":["packages/@adobe/react-spectrum/src/numberfield/StepButton.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 Add from '@spectrum-icons/workflow/Add';\nimport {AriaButtonProps, useButton} from 'react-aria/useButton';\nimport ChevronDownSmall from '@spectrum-icons/ui/ChevronDownSmall';\nimport ChevronUpSmall from '@spectrum-icons/ui/ChevronUpSmall';\nimport {classNames} from '../utils/classNames';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from 'react-aria/FocusRing';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {ReactElement} from 'react';\nimport Remove from '@spectrum-icons/workflow/Remove';\nimport stepperStyle from '@adobe/spectrum-css-temp/components/stepper/vars.css';\nimport {useFocusableRef} from '../utils/useDOMRef';\nimport {useHover} from 'react-aria/useHover';\nimport {useProvider, useProviderProps} from '../provider/Provider';\n\ninterface StepButtonProps extends AriaButtonProps {\n  isQuiet?: boolean;\n  direction: 'up' | 'down';\n}\n\n/**\n * Buttons for NumberField.\n */\nexport const StepButton = React.forwardRef(function StepButton(\n  props: StepButtonProps,\n  ref: FocusableRef<HTMLDivElement>\n) {\n  props = useProviderProps(props);\n  let {scale} = useProvider();\n  let {direction, isDisabled, isQuiet} = props;\n  let domRef = useFocusableRef(ref);\n  /**\n   * Must use div for now because Safari pointer event bugs on disabled form elements.\n   * Link https://bugs.webkit.org/show_bug.cgi?id=219188.\n   */\n  let {buttonProps, isPressed} = useButton({...props, elementType: 'div'}, domRef);\n  let {hoverProps, isHovered} = useHover(props);\n  return (\n    <FocusRing focusRingClass={classNames(stepperStyle, 'focus-ring')}>\n      <div\n        className={classNames(stepperStyle, 'spectrum-Stepper-button', {\n          'spectrum-Stepper-button--stepUp': direction === 'up',\n          'spectrum-Stepper-button--stepDown': direction === 'down',\n          'spectrum-Stepper-button--isQuiet': isQuiet,\n          'is-hovered': isHovered,\n          'is-active': isPressed,\n          'is-disabled': isDisabled\n        })}\n        {...mergeProps(hoverProps, buttonProps)}\n        ref={domRef}>\n        {direction === 'up' && scale === 'large' && (\n          <Add\n            UNSAFE_className={classNames(\n              stepperStyle,\n              'spectrum-Stepper-button-icon',\n              'spectrum-Stepper-stepUpIcon'\n            )}\n            size=\"S\"\n          />\n        )}\n        {direction === 'up' && scale === 'medium' && (\n          <ChevronUpSmall\n            UNSAFE_className={classNames(\n              stepperStyle,\n              'spectrum-Stepper-button-icon',\n              'spectrum-Stepper-stepUpIcon'\n            )}\n          />\n        )}\n        {direction === 'down' && scale === 'large' && (\n          <Remove\n            UNSAFE_className={classNames(\n              stepperStyle,\n              'spectrum-Stepper-button-icon',\n              'spectrum-Stepper-stepDownIcon'\n            )}\n            size=\"S\"\n          />\n        )}\n        {direction === 'down' && scale === 'medium' && (\n          <ChevronDownSmall\n            UNSAFE_className={classNames(\n              stepperStyle,\n              'spectrum-Stepper-button-icon',\n              'spectrum-Stepper-stepDownIcon'\n            )}\n          />\n        )}\n      </div>\n    </FocusRing>\n  );\n}) as (props: StepButtonProps & {ref?: FocusableRef<HTMLDivElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"StepButton.mjs.map"}