{"mappings":";;;AAAA;;;;;;;;;;CAUC;;AA6BM,SAAS,0CAAsB,KAA+B,EAAE,KAAmB,EAAE,GAAkC;IAC5H,IAAI,EAAC,cAAc,SAAS,EAAC,GAAG;IAChC,IAAI,YAAY,CAAA,GAAA,yCAAQ;IACxB,IAAI,aAAa,CAAA,GAAA,yCAAQ,EAAE;QACzB,cAAc;QACd,mBAAmB;IACrB;IAEA,OAAO;QACL,UAAU;YACR,MAAM;QACR;QACA,gBAAgB;YACd,IAAI;YACJ,MAAM;QACR;QACA,eAAe;YACb,MAAM;YACN,GAAG,UAAU;QACf;IACF;AACF","sources":["packages/react-aria/src/gridlist/useGridListSection.ts"],"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 {DOMAttributes, RefObject} from '@react-types/shared';\nimport type {ListState} from 'react-stately/useListState';\nimport {useLabels} from '../utils/useLabels';\nimport {useSlotId} from '../utils/useId';\n\nexport interface AriaGridListSectionProps {\n  /** An accessibility label for the section. Required if `heading` is not present. */\n  'aria-label'?: string\n}\n\nexport interface GridListSectionAria {\n  /** Props for the wrapper list item. */\n  rowProps: DOMAttributes,\n\n  /** Props for the heading element, if any. */\n  rowHeaderProps: DOMAttributes,\n\n  /** Props for the grid's row group element. */\n  rowGroupProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a section in a grid list.\n * See `useGridList` for more details about grid list.\n * @param props - Props for the section.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function useGridListSection<T>(props: AriaGridListSectionProps, state: ListState<T>, ref: RefObject<HTMLElement | null>): GridListSectionAria {\n  let {'aria-label': ariaLabel} = props;\n  let headingId = useSlotId();\n  let labelProps = useLabels({\n    'aria-label': ariaLabel,\n    'aria-labelledby': headingId\n  });\n\n  return {\n    rowProps: {\n      role: 'row'\n    },\n    rowHeaderProps: {\n      id: headingId,\n      role: 'rowheader'\n    },\n    rowGroupProps: {\n      role: 'rowgroup',\n      ...labelProps\n    }\n  };\n}\n"],"names":[],"version":3,"file":"useGridListSection.mjs.map"}