{"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAmBM,SAAS,0CAAY,KAAuB;IACjD,IAAI,YAAC,QAAQ,SAAE,KAAK,EAAC,GAAG;IACxB,IAAI,YAAY,CAAA,GAAA,mBAAK,EAA2B;IAChD,WAAW,YAAY;IAEvB,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,wCAAa,EACjE;QACE,GAAG,KAAK;kBACR;IACF,GACA;IAGF,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,iCAAO,EAAE,CAAC;IAExC,qBACE,0DAAC,CAAA,GAAA,mCAAQ;QAAE,QAAA;QAAO,gBAAgB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;qBACnD,0DAAC;QACC,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,0BAA0B;YACtD,cAAc;YACd,cAAc;YACd,gBAAgB;QAClB;QACC,GAAG,CAAA,GAAA,qCAAS,EAAE,YAAY,WAAW;QACtC,MAAK;qBACL,0DAAC,CAAA,GAAA,6CAAa,uBACZ,0DAAC;QACC,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAC9B,KAAK;QACJ,GAAG,UAAU;;AAM1B","sources":["packages/@adobe/react-spectrum/src/slider/SliderThumb.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 {AriaSliderThumbProps, useSliderThumb} from 'react-aria/useSlider';\nimport {classNames} from '../utils/classNames';\nimport {FocusRing} from 'react-aria/FocusRing';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {ReactNode, useRef} from 'react';\nimport {RefObject} from '@react-types/shared';\nimport {SliderState} from 'react-stately/useSliderState';\nimport styles from '@adobe/spectrum-css-temp/components/slider/vars.css';\nimport {useHover} from 'react-aria/useHover';\nimport {VisuallyHidden} from 'react-aria/VisuallyHidden';\n\ninterface SliderThumbProps extends AriaSliderThumbProps {\n  trackRef: RefObject<HTMLElement | null>;\n  inputRef?: RefObject<HTMLInputElement | null>;\n  state: SliderState;\n}\n\nexport function SliderThumb(props: SliderThumbProps): ReactNode {\n  let {inputRef, state} = props;\n  let backupRef = useRef<HTMLInputElement | null>(null);\n  inputRef = inputRef || backupRef;\n\n  let {thumbProps, inputProps, isDragging, isFocused} = useSliderThumb(\n    {\n      ...props,\n      inputRef\n    },\n    state\n  );\n\n  let {hoverProps, isHovered} = useHover({});\n\n  return (\n    <FocusRing within focusRingClass={classNames(styles, 'is-focused')}>\n      <div\n        className={classNames(styles, 'spectrum-Slider-handle', {\n          'is-hovered': isHovered,\n          'is-dragged': isDragging,\n          'is-tophandle': isFocused\n        })}\n        {...mergeProps(thumbProps, hoverProps)}\n        role=\"presentation\">\n        <VisuallyHidden>\n          <input\n            className={classNames(styles, 'spectrum-Slider-input')}\n            ref={inputRef}\n            {...inputProps}\n          />\n        </VisuallyHidden>\n      </div>\n    </FocusRing>\n  );\n}\n"],"names":[],"version":3,"file":"SliderThumb.cjs.map"}