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DAAS,GAAG;OAAuC;AAM1F","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 {\n    item,\n    itemCount,\n    itemHeight,\n    density\n  } = props;\n\n  let isDraggingMultiple = itemCount > 1;\n\n  return (\n    <div\n      style={{height: itemHeight}}\n      className={\n        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      }>\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: {UNSAFE_className: listStyles['react-spectrum-ListViewItem-actions'], isQuiet: true},\n            actionGroup: {\n              UNSAFE_className: listStyles['react-spectrum-ListViewItem-actions'],\n              isQuiet: true,\n              density: 'compact'\n            },\n            actionMenu: {UNSAFE_className: listStyles['react-spectrum-ListViewItem-actionmenu'], isQuiet: true}\n          }}>\n          {typeof item.rendered === 'string' ? <Text>{item.rendered}</Text> : item.rendered}\n          {isDraggingMultiple &&\n            <div className={classNames(listStyles, 'react-spectrum-ListViewItem-badge')}>{itemCount}</div>\n          }\n        </SlotProvider>\n      </Grid>\n    </div>\n  );\n}\n"],"names":[],"version":3,"file":"DragPreview.cjs.map"}