{"mappings":";;;AAAA;;;;;;;;;;CAUC;;AASM,MAAM,0DAAiB,CAAA,GAAA,oBAAY,EAAkD,CAAC;AAEtF,MAAM,0DAAU,CAAA,GAAA,iBAAS,EAAE,SAAS,QAAQ,KAAmB,EAAE,GAAqC;IAC3G,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,YAAC,QAAQ,SAAE,QAAQ,cAAG,SAAS,EAAE,GAAG,UAAS,GAAG;IACpD,IAAI,UAAU,CAAA,GAAA,yCAAE,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC;IAE9B,qBACE,gCAAC;QAAS,GAAG,QAAQ;QAAE,KAAK;QAAK,WAAW,aAAa;OACtD;AAGP","sources":["packages/react-aria-components/src/Heading.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 {ContextValue, dom, DOMRenderProps, useContextProps} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes} from 'react';\n\nexport interface HeadingProps extends HTMLAttributes<HTMLElement>, DOMRenderProps<'h1', undefined> {\n  level?: number\n}\n\nexport const HeadingContext = createContext<ContextValue<HeadingProps, HTMLHeadingElement>>({});\n\nexport const Heading = forwardRef(function Heading(props: HeadingProps, ref: ForwardedRef<HTMLHeadingElement>) {\n  [props, ref] = useContextProps(props, ref, HeadingContext);\n  let {children, level = 3, className, ...domProps} = props;\n  let Element = dom[`h${level}`];\n\n  return (\n    <Element {...domProps} ref={ref} className={className ?? 'react-aria-Heading'}>\n      {children}\n    </Element>\n  );\n});\n"],"names":[],"version":3,"file":"Heading.mjs.map"}