{"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,mBAAW,EAAE,SAAS,IAAI,IAC7C,SAAS,IAAI,GACb,SAAS,gBAAgB,IAAI,SAAS,eAAe;QACzD,gFAAgF;QAChF,IAAI,6BAA6B,iBAAiB,qBAAqB,GAAG,MAAM,GAAG;QACnF,aAAa,iBAAiB,YAAY,GAAG;IAC/C;IAEA,qBACE,gCAAC;QACC,eAAY;QACX,GAAG,UAAU;QACd,8FAA8F;QAC9F,OAAO;YAAC,QAAQ;QAAU;QAC1B,WAAW,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,qDAAa,GAAG,qBAAqB;YACzD,WAAW;YACX,kCAAkC;QACpC;;AAGN","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)\n      ? document.body\n      : 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}\n"],"names":[],"version":3,"file":"Underlay.mjs.map"}