{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAcM,MAAM,0DAAU,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,QAC/C,KAA8B,EAC9B,GAA2B;IAE3B,IAAI,QAAQ,CAAA,GAAA,4CAAW,EAAE;IACzB,IAAI,SAAS,CAAA,GAAA,0CAAe;IAC5B,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBAAO,0DAAC,CAAA,GAAA,qCAAU;QAAG,GAAG,KAAK;QAAE,KAAK;QAAQ,OAAO;QAAO,QAAQ;;AACpE","sources":["packages/@adobe/react-spectrum/src/listbox/ListBox.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 {DOMRef} from '@react-types/shared';\nimport {ListBoxBase, SpectrumListBoxProps, useListBoxLayout} from './ListBoxBase';\nimport React, {ReactElement} from 'react';\nimport {useDOMRef} from '../utils/useDOMRef';\nimport {useListState} from 'react-stately/useListState';\n\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\n\n/**\n * A list of options that can allow selection of one or more.\n */\nexport const ListBox = React.forwardRef(function ListBox<T extends object>(\n  props: SpectrumListBoxProps<T>,\n  ref: DOMRef<HTMLDivElement>\n) {\n  let state = useListState(props);\n  let layout = useListBoxLayout();\n  let domRef = useDOMRef(ref);\n\n  return <ListBoxBase {...props} ref={domRef} state={state} layout={layout} />;\n}) as <T>(props: SpectrumListBoxProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"ListBox.cjs.map"}