{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAYM,SAAS,0CAAS,UAAC,MAAM,iBAAE,aAAa,EAAE,GAAG,YAA0B;IAC5E,IAAI,aAAiC;IACrC,IAAI,OAAO,aAAa,aAAa;QACnC,IAAI,mBAAmB,CAAA,GAAA,qDAAW,EAAE,SAAS,IAAI,IAAI,SAAS,IAAI,GAAG,SAAS,gBAAgB,IAAI,SAAS,eAAe;QAC1H,gFAAgF;QAChF,IAAI,6BAA6B,iBAAiB,qBAAqB,GAAG,MAAM,GAAG;QACnF,aAAa,iBAAiB,YAAY,GAAG;IAC/C;IAEA,qBACE,0DAAC;QACC,eAAY;QACX,GAAG,UAAU;QACd,8FAA8F;QAC9F,OAAO;YAAC,QAAQ;QAAU;QAC1B,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAa,GAAG,qBAAqB;YACzD,WAAW;YACX,kCAAkC;QACpC;;AAEN","sources":["packages/@adobe/react-spectrum/src/overlays/Underlay.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 {classNames} from '../utils/classNames';\nimport {isScrollable} from 'react-aria/private/utils/isScrollable';\nimport React, {JSX} from 'react';\nimport underlayStyles from '@adobe/spectrum-css-temp/components/underlay/vars.css';\n\ninterface UnderlayProps {\n  isOpen?: boolean,\n  isTransparent?: boolean\n}\n\nexport function Underlay({isOpen, isTransparent, ...otherProps}: UnderlayProps): JSX.Element {\n  let pageHeight: number | undefined = undefined;\n  if (typeof document !== 'undefined') {\n    let scrollingElement = isScrollable(document.body) ? document.body : document.scrollingElement || document.documentElement;\n    // Prevent Firefox from adding scrollbars when the page has a fractional height.\n    let fractionalHeightDifference = scrollingElement.getBoundingClientRect().height % 1;\n    pageHeight = scrollingElement.scrollHeight - fractionalHeightDifference;\n  }\n\n  return (\n    <div\n      data-testid=\"underlay\"\n      {...otherProps}\n      // Cover the entire document so iOS 26 Safari doesn't clip the underlay to the inner viewport.\n      style={{height: pageHeight}}\n      className={classNames(underlayStyles, 'spectrum-Underlay', {\n        'is-open': isOpen,\n        'spectrum-Underlay--transparent': isTransparent\n      })} />\n  );\n}\n"],"names":[],"version":3,"file":"Underlay.cjs.map"}