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mDAAS,GAAG;OACpC;AAOf","sources":["packages/@adobe/react-spectrum/src/list/DragPreview.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 */\nimport {classNames} from '../utils/classNames';\n\nimport {Grid} from '../layout/Grid';\nimport {GridNode} from 'react-stately/private/grid/GridCollection';\nimport listStyles from './styles.css';\nimport React, {JSX} from 'react';\nimport {SlotProvider} from '../utils/Slots';\nimport type {SpectrumListViewProps} from './ListView';\nimport {Text} from '../text/Text';\n\ninterface DragPreviewProps<T> {\n  item: GridNode<any>;\n  itemCount: number;\n  itemHeight: number;\n  density: SpectrumListViewProps<T>['density'];\n}\n\nexport function DragPreview(props: DragPreviewProps<unknown>): JSX.Element {\n  let {item, itemCount, itemHeight, density} = props;\n\n  let isDraggingMultiple = itemCount > 1;\n\n  return (\n    <div\n      style={{height: itemHeight}}\n      className={classNames(\n        listStyles,\n        'react-spectrum-ListViewItem',\n        'react-spectrum-ListViewItem-dragPreview',\n        {'react-spectrum-ListViewItem-dragPreview--multiple': isDraggingMultiple},\n        `react-spectrum-ListViewItem-dragPreview--${density}`\n      )}>\n      <Grid UNSAFE_className={listStyles['react-spectrum-ListViewItem-grid']}>\n        <SlotProvider\n          slots={{\n            text: {UNSAFE_className: listStyles['react-spectrum-ListViewItem-content']},\n            description: {UNSAFE_className: listStyles['react-spectrum-ListViewItem-description']},\n            illustration: {UNSAFE_className: listStyles['react-spectrum-ListViewItem-thumbnail']},\n            image: {UNSAFE_className: listStyles['react-spectrum-ListViewItem-thumbnail']},\n            actionButton: {\n              UNSAFE_className: listStyles['react-spectrum-ListViewItem-actions'],\n              isQuiet: true\n            },\n            actionGroup: {\n              UNSAFE_className: listStyles['react-spectrum-ListViewItem-actions'],\n              isQuiet: true,\n              density: 'compact'\n            },\n            actionMenu: {\n              UNSAFE_className: listStyles['react-spectrum-ListViewItem-actionmenu'],\n              isQuiet: true\n            }\n          }}>\n          {typeof item.rendered === 'string' ? <Text>{item.rendered}</Text> : item.rendered}\n          {isDraggingMultiple && (\n            <div className={classNames(listStyles, 'react-spectrum-ListViewItem-badge')}>\n              {itemCount}\n            </div>\n          )}\n        </SlotProvider>\n      </Grid>\n    </div>\n  );\n}\n"],"names":[],"version":3,"file":"DragPreview.cjs.map"}