{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA0BM,MAAM,0DAAO,CAAA,GAAA,uBAAS,EAAE,SAAS,KACtC,KAAmB,EACnB,GAAW;IAEX,QAAQ,CAAA,GAAA,sCAAW,EAAE;IACrB,IAAI,EAAC,aAAa,cAAc,KAAK,YAAE,QAAQ,EAAE,GAAG,YAAW,GAAG;IAClE,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE,OAAO,CAAA,GAAA,wCAAa;IACrD,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,0DAAC;QAAa,GAAG,CAAA,GAAA,6CAAa,EAAE,WAAW;QAAG,GAAG,UAAU;QAAE,KAAK;qBAChE,0DAAC,CAAA,GAAA,oCAAS,SAAG;AAGnB","sources":["packages/@adobe/react-spectrum/src/view/View.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 {ClearSlots, useSlotProps} from '../utils/Slots';\n\nimport {ColorVersion, DOMProps, DOMRef, ViewStyleProps} from '@react-types/shared';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport React, {forwardRef, JSXElementConstructor, ReactElement, ReactNode} from 'react';\nimport {useDOMRef} from '../utils/useDOMRef';\nimport {useStyleProps, viewStyleProps} from '../utils/styleProps';\n\nexport interface ViewProps<C extends ColorVersion> extends ViewStyleProps<C>, DOMProps {\n  /**\n   * The element to render as the node.\n   */\n  elementType?: string | JSXElementConstructor<any>;\n  /**\n   * Children to be displayed in the View.\n   */\n  children?: ReactNode;\n}\n\n/**\n * View is a general purpose container with no specific semantics that can be used for custom\n * styling purposes. It supports Spectrum style props to ensure consistency with other Spectrum\n * components.\n */\nexport const View = forwardRef(function View<C extends ColorVersion>(\n  props: ViewProps<C>,\n  ref: DOMRef\n) {\n  props = useSlotProps(props);\n  let {elementType: ElementType = 'div', children, ...otherProps} = props;\n  let {styleProps} = useStyleProps(props, viewStyleProps);\n  let domRef = useDOMRef(ref);\n\n  return (\n    <ElementType {...filterDOMProps(otherProps)} {...styleProps} ref={domRef}>\n      <ClearSlots>{children}</ClearSlots>\n    </ElementType>\n  );\n}) as <C extends ColorVersion = 5>(props: ViewProps<C> & {ref?: DOMRef}) => ReactElement;\n"],"names":[],"version":3,"file":"View.cjs.map"}