{"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAmBM,SAAS,0CAAY,KAAuB;IACjD,IAAI,YACF,QAAQ,SACR,KAAK,EACN,GAAG;IACJ,IAAI,YAAY,CAAA,GAAA,mBAAK,EAA2B;IAChD,WAAW,YAAY;IAEvB,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,wCAAa,EAAE;QACnE,GAAG,KAAK;kBACR;IACF,GAAG;IAEH,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,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,0BACA;YACE,cAAc;YACd,cAAc;YACd,gBAAgB;QAClB;QAGH,GAAG,CAAA,GAAA,qCAAS,EAAE,YAAY,WAAW;QACtC,MAAK;qBACL,0DAAC,CAAA,GAAA,6CAAa,uBACZ,0DAAC;QAAM,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAA0B,KAAK;QAAW,GAAG,UAAU;;AAKtG","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 {\n    inputRef,\n    state\n  } = props;\n  let backupRef = useRef<HTMLInputElement | null>(null);\n  inputRef = inputRef || backupRef;\n\n  let {thumbProps, inputProps, isDragging, isFocused} = useSliderThumb({\n    ...props,\n    inputRef\n  }, state);\n\n  let {hoverProps, isHovered} = useHover({});\n\n  return (\n    <FocusRing within focusRingClass={classNames(styles, 'is-focused')}>\n      <div\n        className={\n          classNames(\n            styles,\n            'spectrum-Slider-handle',\n            {\n              'is-hovered': isHovered,\n              'is-dragged': isDragging,\n              'is-tophandle': isFocused\n            }\n          )\n        }\n        {...mergeProps(thumbProps, hoverProps)}\n        role=\"presentation\">\n        <VisuallyHidden>\n          <input className={classNames(styles, 'spectrum-Slider-input')} ref={inputRef} {...inputProps} />\n        </VisuallyHidden>\n      </div>\n    </FocusRing>\n  );\n}\n"],"names":[],"version":3,"file":"SliderThumb.cjs.map"}