@react-spectrum/list 3.0.0-beta.0 → 3.0.0-nightly-641446f65-240905
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DragPreview.main.js +79 -0
- package/dist/DragPreview.main.js.map +1 -0
- package/dist/DragPreview.mjs +74 -0
- package/dist/DragPreview.module.js +74 -0
- package/dist/DragPreview.module.js.map +1 -0
- package/dist/InsertionIndicator.main.js +49 -0
- package/dist/InsertionIndicator.main.js.map +1 -0
- package/dist/InsertionIndicator.mjs +44 -0
- package/dist/InsertionIndicator.module.js +44 -0
- package/dist/InsertionIndicator.module.js.map +1 -0
- package/dist/ListView.main.js +299 -0
- package/dist/ListView.main.js.map +1 -0
- package/dist/ListView.mjs +293 -0
- package/dist/ListView.module.js +293 -0
- package/dist/ListView.module.js.map +1 -0
- package/dist/ListViewItem.main.js +252 -0
- package/dist/ListViewItem.main.js.map +1 -0
- package/dist/ListViewItem.mjs +247 -0
- package/dist/ListViewItem.module.js +247 -0
- package/dist/ListViewItem.module.js.map +1 -0
- package/dist/ListViewLayout.main.js +69 -0
- package/dist/ListViewLayout.main.js.map +1 -0
- package/dist/ListViewLayout.mjs +64 -0
- package/dist/ListViewLayout.module.js +64 -0
- package/dist/ListViewLayout.module.js.map +1 -0
- package/dist/RootDropIndicator.main.js +46 -0
- package/dist/RootDropIndicator.main.js.map +1 -0
- package/dist/RootDropIndicator.mjs +37 -0
- package/dist/RootDropIndicator.module.js +37 -0
- package/dist/RootDropIndicator.module.js.map +1 -0
- package/dist/ar-AE.main.js +7 -0
- package/dist/ar-AE.main.js.map +1 -0
- package/dist/ar-AE.mjs +9 -0
- package/dist/ar-AE.module.js +9 -0
- package/dist/ar-AE.module.js.map +1 -0
- package/dist/bg-BG.main.js +7 -0
- package/dist/bg-BG.main.js.map +1 -0
- package/dist/bg-BG.mjs +9 -0
- package/dist/bg-BG.module.js +9 -0
- package/dist/bg-BG.module.js.map +1 -0
- package/dist/cs-CZ.main.js +7 -0
- package/dist/cs-CZ.main.js.map +1 -0
- package/dist/cs-CZ.mjs +9 -0
- package/dist/cs-CZ.module.js +9 -0
- package/dist/cs-CZ.module.js.map +1 -0
- package/dist/da-DK.main.js +7 -0
- package/dist/da-DK.main.js.map +1 -0
- package/dist/da-DK.mjs +9 -0
- package/dist/da-DK.module.js +9 -0
- package/dist/da-DK.module.js.map +1 -0
- package/dist/de-DE.main.js +7 -0
- package/dist/de-DE.main.js.map +1 -0
- package/dist/de-DE.mjs +9 -0
- package/dist/de-DE.module.js +9 -0
- package/dist/de-DE.module.js.map +1 -0
- package/dist/el-GR.main.js +7 -0
- package/dist/el-GR.main.js.map +1 -0
- package/dist/el-GR.mjs +9 -0
- package/dist/el-GR.module.js +9 -0
- package/dist/el-GR.module.js.map +1 -0
- package/dist/en-US.main.js +7 -0
- package/dist/en-US.main.js.map +1 -0
- package/dist/en-US.mjs +9 -0
- package/dist/en-US.module.js +9 -0
- package/dist/en-US.module.js.map +1 -0
- package/dist/es-ES.main.js +7 -0
- package/dist/es-ES.main.js.map +1 -0
- package/dist/es-ES.mjs +9 -0
- package/dist/es-ES.module.js +9 -0
- package/dist/es-ES.module.js.map +1 -0
- package/dist/et-EE.main.js +7 -0
- package/dist/et-EE.main.js.map +1 -0
- package/dist/et-EE.mjs +9 -0
- package/dist/et-EE.module.js +9 -0
- package/dist/et-EE.module.js.map +1 -0
- package/dist/fi-FI.main.js +7 -0
- package/dist/fi-FI.main.js.map +1 -0
- package/dist/fi-FI.mjs +9 -0
- package/dist/fi-FI.module.js +9 -0
- package/dist/fi-FI.module.js.map +1 -0
- package/dist/fr-FR.main.js +7 -0
- package/dist/fr-FR.main.js.map +1 -0
- package/dist/fr-FR.mjs +9 -0
- package/dist/fr-FR.module.js +9 -0
- package/dist/fr-FR.module.js.map +1 -0
- package/dist/he-IL.main.js +7 -0
- package/dist/he-IL.main.js.map +1 -0
- package/dist/he-IL.mjs +9 -0
- package/dist/he-IL.module.js +9 -0
- package/dist/he-IL.module.js.map +1 -0
- package/dist/hr-HR.main.js +7 -0
- package/dist/hr-HR.main.js.map +1 -0
- package/dist/hr-HR.mjs +9 -0
- package/dist/hr-HR.module.js +9 -0
- package/dist/hr-HR.module.js.map +1 -0
- package/dist/hu-HU.main.js +7 -0
- package/dist/hu-HU.main.js.map +1 -0
- package/dist/hu-HU.mjs +9 -0
- package/dist/hu-HU.module.js +9 -0
- package/dist/hu-HU.module.js.map +1 -0
- package/dist/import.mjs +19 -0
- package/dist/intlStrings.main.js +108 -0
- package/dist/intlStrings.main.js.map +1 -0
- package/dist/intlStrings.mjs +110 -0
- package/dist/intlStrings.module.js +110 -0
- package/dist/intlStrings.module.js.map +1 -0
- package/dist/it-IT.main.js +7 -0
- package/dist/it-IT.main.js.map +1 -0
- package/dist/it-IT.mjs +9 -0
- package/dist/it-IT.module.js +9 -0
- package/dist/it-IT.module.js.map +1 -0
- package/dist/ja-JP.main.js +7 -0
- package/dist/ja-JP.main.js.map +1 -0
- package/dist/ja-JP.mjs +9 -0
- package/dist/ja-JP.module.js +9 -0
- package/dist/ja-JP.module.js.map +1 -0
- package/dist/ko-KR.main.js +7 -0
- package/dist/ko-KR.main.js.map +1 -0
- package/dist/ko-KR.mjs +9 -0
- package/dist/ko-KR.module.js +9 -0
- package/dist/ko-KR.module.js.map +1 -0
- package/dist/lt-LT.main.js +7 -0
- package/dist/lt-LT.main.js.map +1 -0
- package/dist/lt-LT.mjs +9 -0
- package/dist/lt-LT.module.js +9 -0
- package/dist/lt-LT.module.js.map +1 -0
- package/dist/lv-LV.main.js +7 -0
- package/dist/lv-LV.main.js.map +1 -0
- package/dist/lv-LV.mjs +9 -0
- package/dist/lv-LV.module.js +9 -0
- package/dist/lv-LV.module.js.map +1 -0
- package/dist/main.js +14 -962
- package/dist/main.js.map +1 -1
- package/dist/module.js +12 -964
- package/dist/module.js.map +1 -1
- package/dist/nb-NO.main.js +7 -0
- package/dist/nb-NO.main.js.map +1 -0
- package/dist/nb-NO.mjs +9 -0
- package/dist/nb-NO.module.js +9 -0
- package/dist/nb-NO.module.js.map +1 -0
- package/dist/nl-NL.main.js +7 -0
- package/dist/nl-NL.main.js.map +1 -0
- package/dist/nl-NL.mjs +9 -0
- package/dist/nl-NL.module.js +9 -0
- package/dist/nl-NL.module.js.map +1 -0
- package/dist/pl-PL.main.js +7 -0
- package/dist/pl-PL.main.js.map +1 -0
- package/dist/pl-PL.mjs +9 -0
- package/dist/pl-PL.module.js +9 -0
- package/dist/pl-PL.module.js.map +1 -0
- package/dist/pt-BR.main.js +7 -0
- package/dist/pt-BR.main.js.map +1 -0
- package/dist/pt-BR.mjs +9 -0
- package/dist/pt-BR.module.js +9 -0
- package/dist/pt-BR.module.js.map +1 -0
- package/dist/pt-PT.main.js +7 -0
- package/dist/pt-PT.main.js.map +1 -0
- package/dist/pt-PT.mjs +9 -0
- package/dist/pt-PT.module.js +9 -0
- package/dist/pt-PT.module.js.map +1 -0
- package/dist/ro-RO.main.js +7 -0
- package/dist/ro-RO.main.js.map +1 -0
- package/dist/ro-RO.mjs +9 -0
- package/dist/ro-RO.module.js +9 -0
- package/dist/ro-RO.module.js.map +1 -0
- package/dist/ru-RU.main.js +7 -0
- package/dist/ru-RU.main.js.map +1 -0
- package/dist/ru-RU.mjs +9 -0
- package/dist/ru-RU.module.js +9 -0
- package/dist/ru-RU.module.js.map +1 -0
- package/dist/sk-SK.main.js +7 -0
- package/dist/sk-SK.main.js.map +1 -0
- package/dist/sk-SK.mjs +9 -0
- package/dist/sk-SK.module.js +9 -0
- package/dist/sk-SK.module.js.map +1 -0
- package/dist/sl-SI.main.js +7 -0
- package/dist/sl-SI.main.js.map +1 -0
- package/dist/sl-SI.mjs +9 -0
- package/dist/sl-SI.module.js +9 -0
- package/dist/sl-SI.module.js.map +1 -0
- package/dist/sr-SP.main.js +7 -0
- package/dist/sr-SP.main.js.map +1 -0
- package/dist/sr-SP.mjs +9 -0
- package/dist/sr-SP.module.js +9 -0
- package/dist/sr-SP.module.js.map +1 -0
- package/dist/styles.d09a6cc6.css +839 -0
- package/dist/styles.d09a6cc6.css.map +1 -0
- package/dist/styles_css.main.js +197 -0
- package/dist/styles_css.main.js.map +1 -0
- package/dist/styles_css.mjs +199 -0
- package/dist/styles_css.module.js +199 -0
- package/dist/styles_css.module.js.map +1 -0
- package/dist/sv-SE.main.js +7 -0
- package/dist/sv-SE.main.js.map +1 -0
- package/dist/sv-SE.mjs +9 -0
- package/dist/sv-SE.module.js +9 -0
- package/dist/sv-SE.module.js.map +1 -0
- package/dist/tr-TR.main.js +7 -0
- package/dist/tr-TR.main.js.map +1 -0
- package/dist/tr-TR.mjs +9 -0
- package/dist/tr-TR.module.js +9 -0
- package/dist/tr-TR.module.js.map +1 -0
- package/dist/types.d.ts +33 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/uk-UA.main.js +7 -0
- package/dist/uk-UA.main.js.map +1 -0
- package/dist/uk-UA.mjs +9 -0
- package/dist/uk-UA.module.js +9 -0
- package/dist/uk-UA.module.js.map +1 -0
- package/dist/zh-CN.main.js +7 -0
- package/dist/zh-CN.main.js.map +1 -0
- package/dist/zh-CN.mjs +9 -0
- package/dist/zh-CN.module.js +9 -0
- package/dist/zh-CN.module.js.map +1 -0
- package/dist/zh-TW.main.js +7 -0
- package/dist/zh-TW.main.js.map +1 -0
- package/dist/zh-TW.mjs +9 -0
- package/dist/zh-TW.module.js +9 -0
- package/dist/zh-TW.module.js.map +1 -0
- package/package.json +39 -43
- package/src/DragPreview.tsx +20 -8
- package/src/InsertionIndicator.tsx +3 -3
- package/src/ListView.tsx +187 -178
- package/src/ListViewItem.tsx +30 -17
- package/src/ListViewLayout.ts +66 -0
- package/src/RootDropIndicator.tsx +6 -7
- package/src/index.ts +13 -0
- package/src/styles.css +195 -68
- package/LICENSE +0 -201
- package/dist/main.css +0 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
require("./styles.d09a6cc6.css");
|
|
2
|
+
var $279507a6f189e509$exports = require("./styles_css.main.js");
|
|
3
|
+
var $U0AUi$reactspectrumutils = require("@react-spectrum/utils");
|
|
4
|
+
var $U0AUi$reactspectrumlayout = require("@react-spectrum/layout");
|
|
5
|
+
var $U0AUi$react = require("react");
|
|
6
|
+
var $U0AUi$reactspectrumtext = require("@react-spectrum/text");
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function $parcel$export(e, n, v, s) {
|
|
14
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
$parcel$export(module.exports, "DragPreview", () => $3d665b19f7865ff9$export$905ab40ac2179daa);
|
|
18
|
+
/*
|
|
19
|
+
* Copyright 2021 Adobe. All rights reserved.
|
|
20
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
21
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
22
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
*
|
|
24
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
25
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
26
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
27
|
+
* governing permissions and limitations under the License.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
function $3d665b19f7865ff9$export$905ab40ac2179daa(props) {
|
|
34
|
+
let { item: item, itemCount: itemCount, itemHeight: itemHeight, density: density } = props;
|
|
35
|
+
let isDraggingMultiple = itemCount > 1;
|
|
36
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($U0AUi$react))).createElement("div", {
|
|
37
|
+
style: {
|
|
38
|
+
height: itemHeight
|
|
39
|
+
},
|
|
40
|
+
className: (0, $U0AUi$reactspectrumutils.classNames)((0, ($parcel$interopDefault($279507a6f189e509$exports))), 'react-spectrum-ListViewItem', 'react-spectrum-ListViewItem-dragPreview', {
|
|
41
|
+
'react-spectrum-ListViewItem-dragPreview--multiple': isDraggingMultiple
|
|
42
|
+
}, `react-spectrum-ListViewItem-dragPreview--${density}`)
|
|
43
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($U0AUi$react))).createElement((0, $U0AUi$reactspectrumlayout.Grid), {
|
|
44
|
+
UNSAFE_className: (0, ($parcel$interopDefault($279507a6f189e509$exports)))['react-spectrum-ListViewItem-grid']
|
|
45
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($U0AUi$react))).createElement((0, $U0AUi$reactspectrumutils.SlotProvider), {
|
|
46
|
+
slots: {
|
|
47
|
+
text: {
|
|
48
|
+
UNSAFE_className: (0, ($parcel$interopDefault($279507a6f189e509$exports)))['react-spectrum-ListViewItem-content']
|
|
49
|
+
},
|
|
50
|
+
description: {
|
|
51
|
+
UNSAFE_className: (0, ($parcel$interopDefault($279507a6f189e509$exports)))['react-spectrum-ListViewItem-description']
|
|
52
|
+
},
|
|
53
|
+
illustration: {
|
|
54
|
+
UNSAFE_className: (0, ($parcel$interopDefault($279507a6f189e509$exports)))['react-spectrum-ListViewItem-thumbnail']
|
|
55
|
+
},
|
|
56
|
+
image: {
|
|
57
|
+
UNSAFE_className: (0, ($parcel$interopDefault($279507a6f189e509$exports)))['react-spectrum-ListViewItem-thumbnail']
|
|
58
|
+
},
|
|
59
|
+
actionButton: {
|
|
60
|
+
UNSAFE_className: (0, ($parcel$interopDefault($279507a6f189e509$exports)))['react-spectrum-ListViewItem-actions'],
|
|
61
|
+
isQuiet: true
|
|
62
|
+
},
|
|
63
|
+
actionGroup: {
|
|
64
|
+
UNSAFE_className: (0, ($parcel$interopDefault($279507a6f189e509$exports)))['react-spectrum-ListViewItem-actions'],
|
|
65
|
+
isQuiet: true,
|
|
66
|
+
density: 'compact'
|
|
67
|
+
},
|
|
68
|
+
actionMenu: {
|
|
69
|
+
UNSAFE_className: (0, ($parcel$interopDefault($279507a6f189e509$exports)))['react-spectrum-ListViewItem-actionmenu'],
|
|
70
|
+
isQuiet: true
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}, typeof item.rendered === 'string' ? /*#__PURE__*/ (0, ($parcel$interopDefault($U0AUi$react))).createElement((0, $U0AUi$reactspectrumtext.Text), null, item.rendered) : item.rendered, isDraggingMultiple && /*#__PURE__*/ (0, ($parcel$interopDefault($U0AUi$react))).createElement("div", {
|
|
74
|
+
className: (0, $U0AUi$reactspectrumutils.classNames)((0, ($parcel$interopDefault($279507a6f189e509$exports))), 'react-spectrum-ListViewItem-badge')
|
|
75
|
+
}, itemCount))));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=DragPreview.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAgBM,SAAS,0CAAY,KAAgC;IAC1D,IAAI,QACF,IAAI,aACJ,SAAS,cACT,UAAU,WACV,OAAO,EACR,GAAG;IAEJ,IAAI,qBAAqB,YAAY;IAErC,qBACE,0DAAC;QACC,OAAO;YAAC,QAAQ;QAAU;QAC1B,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAS,GACT,+BACA,2CACA;YAAC,qDAAqD;QAAkB,GACxE,CAAC,yCAAyC,EAAE,QAAQ,CAAC;qBAGzD,0DAAC,CAAA,GAAA,+BAAG;QAAE,kBAAkB,CAAA,GAAA,mDAAS,CAAC,CAAC,mCAAmC;qBACpE,0DAAC,CAAA,GAAA,sCAAW;QACV,OAAO;YACL,MAAM;gBAAC,kBAAkB,CAAA,GAAA,mDAAS,CAAC,CAAC,sCAAsC;YAAA;YAC1E,aAAa;gBAAC,kBAAkB,CAAA,GAAA,mDAAS,CAAC,CAAC,0CAA0C;YAAA;YACrF,cAAc;gBAAC,kBAAkB,CAAA,GAAA,mDAAS,CAAC,CAAC,wCAAwC;YAAA;YACpF,OAAO;gBAAC,kBAAkB,CAAA,GAAA,mDAAS,CAAC,CAAC,wCAAwC;YAAA;YAC7E,cAAc;gBAAC,kBAAkB,CAAA,GAAA,mDAAS,CAAC,CAAC,sCAAsC;gBAAE,SAAS;YAAI;YACjG,aAAa;gBACX,kBAAkB,CAAA,GAAA,mDAAS,CAAC,CAAC,sCAAsC;gBACnE,SAAS;gBACT,SAAS;YACX;YACA,YAAY;gBAAC,kBAAkB,CAAA,GAAA,mDAAS,CAAC,CAAC,yCAAyC;gBAAE,SAAS;YAAI;QACpG;OACC,OAAO,KAAK,QAAQ,KAAK,yBAAW,0DAAC,CAAA,GAAA,6BAAG,SAAG,KAAK,QAAQ,IAAW,KAAK,QAAQ,EAChF,oCACC,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAS,GAAG;OAAuC;AAM1F","sources":["packages/@react-spectrum/list/src/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, SlotProvider} from '@react-spectrum/utils';\nimport {Grid} from '@react-spectrum/layout';\nimport {GridNode} from '@react-types/grid';\nimport listStyles from './styles.css';\nimport React from 'react';\nimport type {SpectrumListViewProps} from './ListView';\nimport {Text} from '@react-spectrum/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>) {\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.main.js.map"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import "./styles.d09a6cc6.css";
|
|
2
|
+
import $vFUHn$styles_cssmodulejs from "./styles_css.mjs";
|
|
3
|
+
import {classNames as $vFUHn$classNames, SlotProvider as $vFUHn$SlotProvider} from "@react-spectrum/utils";
|
|
4
|
+
import {Grid as $vFUHn$Grid} from "@react-spectrum/layout";
|
|
5
|
+
import $vFUHn$react from "react";
|
|
6
|
+
import {Text as $vFUHn$Text} from "@react-spectrum/text";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
/*
|
|
13
|
+
* Copyright 2021 Adobe. All rights reserved.
|
|
14
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
16
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
19
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
20
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
21
|
+
* governing permissions and limitations under the License.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
function $cd61e55c47e3c0f5$export$905ab40ac2179daa(props) {
|
|
28
|
+
let { item: item, itemCount: itemCount, itemHeight: itemHeight, density: density } = props;
|
|
29
|
+
let isDraggingMultiple = itemCount > 1;
|
|
30
|
+
return /*#__PURE__*/ (0, $vFUHn$react).createElement("div", {
|
|
31
|
+
style: {
|
|
32
|
+
height: itemHeight
|
|
33
|
+
},
|
|
34
|
+
className: (0, $vFUHn$classNames)((0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs))), 'react-spectrum-ListViewItem', 'react-spectrum-ListViewItem-dragPreview', {
|
|
35
|
+
'react-spectrum-ListViewItem-dragPreview--multiple': isDraggingMultiple
|
|
36
|
+
}, `react-spectrum-ListViewItem-dragPreview--${density}`)
|
|
37
|
+
}, /*#__PURE__*/ (0, $vFUHn$react).createElement((0, $vFUHn$Grid), {
|
|
38
|
+
UNSAFE_className: (0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs)))['react-spectrum-ListViewItem-grid']
|
|
39
|
+
}, /*#__PURE__*/ (0, $vFUHn$react).createElement((0, $vFUHn$SlotProvider), {
|
|
40
|
+
slots: {
|
|
41
|
+
text: {
|
|
42
|
+
UNSAFE_className: (0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs)))['react-spectrum-ListViewItem-content']
|
|
43
|
+
},
|
|
44
|
+
description: {
|
|
45
|
+
UNSAFE_className: (0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs)))['react-spectrum-ListViewItem-description']
|
|
46
|
+
},
|
|
47
|
+
illustration: {
|
|
48
|
+
UNSAFE_className: (0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs)))['react-spectrum-ListViewItem-thumbnail']
|
|
49
|
+
},
|
|
50
|
+
image: {
|
|
51
|
+
UNSAFE_className: (0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs)))['react-spectrum-ListViewItem-thumbnail']
|
|
52
|
+
},
|
|
53
|
+
actionButton: {
|
|
54
|
+
UNSAFE_className: (0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs)))['react-spectrum-ListViewItem-actions'],
|
|
55
|
+
isQuiet: true
|
|
56
|
+
},
|
|
57
|
+
actionGroup: {
|
|
58
|
+
UNSAFE_className: (0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs)))['react-spectrum-ListViewItem-actions'],
|
|
59
|
+
isQuiet: true,
|
|
60
|
+
density: 'compact'
|
|
61
|
+
},
|
|
62
|
+
actionMenu: {
|
|
63
|
+
UNSAFE_className: (0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs)))['react-spectrum-ListViewItem-actionmenu'],
|
|
64
|
+
isQuiet: true
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}, typeof item.rendered === 'string' ? /*#__PURE__*/ (0, $vFUHn$react).createElement((0, $vFUHn$Text), null, item.rendered) : item.rendered, isDraggingMultiple && /*#__PURE__*/ (0, $vFUHn$react).createElement("div", {
|
|
68
|
+
className: (0, $vFUHn$classNames)((0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs))), 'react-spectrum-ListViewItem-badge')
|
|
69
|
+
}, itemCount))));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
export {$cd61e55c47e3c0f5$export$905ab40ac2179daa as DragPreview};
|
|
74
|
+
//# sourceMappingURL=DragPreview.module.js.map
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import "./styles.d09a6cc6.css";
|
|
2
|
+
import $vFUHn$styles_cssmodulejs from "./styles_css.module.js";
|
|
3
|
+
import {classNames as $vFUHn$classNames, SlotProvider as $vFUHn$SlotProvider} from "@react-spectrum/utils";
|
|
4
|
+
import {Grid as $vFUHn$Grid} from "@react-spectrum/layout";
|
|
5
|
+
import $vFUHn$react from "react";
|
|
6
|
+
import {Text as $vFUHn$Text} from "@react-spectrum/text";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
/*
|
|
13
|
+
* Copyright 2021 Adobe. All rights reserved.
|
|
14
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
16
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
19
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
20
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
21
|
+
* governing permissions and limitations under the License.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
function $cd61e55c47e3c0f5$export$905ab40ac2179daa(props) {
|
|
28
|
+
let { item: item, itemCount: itemCount, itemHeight: itemHeight, density: density } = props;
|
|
29
|
+
let isDraggingMultiple = itemCount > 1;
|
|
30
|
+
return /*#__PURE__*/ (0, $vFUHn$react).createElement("div", {
|
|
31
|
+
style: {
|
|
32
|
+
height: itemHeight
|
|
33
|
+
},
|
|
34
|
+
className: (0, $vFUHn$classNames)((0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs))), 'react-spectrum-ListViewItem', 'react-spectrum-ListViewItem-dragPreview', {
|
|
35
|
+
'react-spectrum-ListViewItem-dragPreview--multiple': isDraggingMultiple
|
|
36
|
+
}, `react-spectrum-ListViewItem-dragPreview--${density}`)
|
|
37
|
+
}, /*#__PURE__*/ (0, $vFUHn$react).createElement((0, $vFUHn$Grid), {
|
|
38
|
+
UNSAFE_className: (0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs)))['react-spectrum-ListViewItem-grid']
|
|
39
|
+
}, /*#__PURE__*/ (0, $vFUHn$react).createElement((0, $vFUHn$SlotProvider), {
|
|
40
|
+
slots: {
|
|
41
|
+
text: {
|
|
42
|
+
UNSAFE_className: (0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs)))['react-spectrum-ListViewItem-content']
|
|
43
|
+
},
|
|
44
|
+
description: {
|
|
45
|
+
UNSAFE_className: (0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs)))['react-spectrum-ListViewItem-description']
|
|
46
|
+
},
|
|
47
|
+
illustration: {
|
|
48
|
+
UNSAFE_className: (0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs)))['react-spectrum-ListViewItem-thumbnail']
|
|
49
|
+
},
|
|
50
|
+
image: {
|
|
51
|
+
UNSAFE_className: (0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs)))['react-spectrum-ListViewItem-thumbnail']
|
|
52
|
+
},
|
|
53
|
+
actionButton: {
|
|
54
|
+
UNSAFE_className: (0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs)))['react-spectrum-ListViewItem-actions'],
|
|
55
|
+
isQuiet: true
|
|
56
|
+
},
|
|
57
|
+
actionGroup: {
|
|
58
|
+
UNSAFE_className: (0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs)))['react-spectrum-ListViewItem-actions'],
|
|
59
|
+
isQuiet: true,
|
|
60
|
+
density: 'compact'
|
|
61
|
+
},
|
|
62
|
+
actionMenu: {
|
|
63
|
+
UNSAFE_className: (0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs)))['react-spectrum-ListViewItem-actionmenu'],
|
|
64
|
+
isQuiet: true
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}, typeof item.rendered === 'string' ? /*#__PURE__*/ (0, $vFUHn$react).createElement((0, $vFUHn$Text), null, item.rendered) : item.rendered, isDraggingMultiple && /*#__PURE__*/ (0, $vFUHn$react).createElement("div", {
|
|
68
|
+
className: (0, $vFUHn$classNames)((0, ($parcel$interopDefault($vFUHn$styles_cssmodulejs))), 'react-spectrum-ListViewItem-badge')
|
|
69
|
+
}, itemCount))));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
export {$cd61e55c47e3c0f5$export$905ab40ac2179daa as DragPreview};
|
|
74
|
+
//# sourceMappingURL=DragPreview.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAgBM,SAAS,0CAAY,KAAgC;IAC1D,IAAI,QACF,IAAI,aACJ,SAAS,cACT,UAAU,WACV,OAAO,EACR,GAAG;IAEJ,IAAI,qBAAqB,YAAY;IAErC,qBACE,gCAAC;QACC,OAAO;YAAC,QAAQ;QAAU;QAC1B,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,mDAAS,GACT,+BACA,2CACA;YAAC,qDAAqD;QAAkB,GACxE,CAAC,yCAAyC,EAAE,QAAQ,CAAC;qBAGzD,gCAAC,CAAA,GAAA,WAAG;QAAE,kBAAkB,CAAA,GAAA,mDAAS,CAAC,CAAC,mCAAmC;qBACpE,gCAAC,CAAA,GAAA,mBAAW;QACV,OAAO;YACL,MAAM;gBAAC,kBAAkB,CAAA,GAAA,mDAAS,CAAC,CAAC,sCAAsC;YAAA;YAC1E,aAAa;gBAAC,kBAAkB,CAAA,GAAA,mDAAS,CAAC,CAAC,0CAA0C;YAAA;YACrF,cAAc;gBAAC,kBAAkB,CAAA,GAAA,mDAAS,CAAC,CAAC,wCAAwC;YAAA;YACpF,OAAO;gBAAC,kBAAkB,CAAA,GAAA,mDAAS,CAAC,CAAC,wCAAwC;YAAA;YAC7E,cAAc;gBAAC,kBAAkB,CAAA,GAAA,mDAAS,CAAC,CAAC,sCAAsC;gBAAE,SAAS;YAAI;YACjG,aAAa;gBACX,kBAAkB,CAAA,GAAA,mDAAS,CAAC,CAAC,sCAAsC;gBACnE,SAAS;gBACT,SAAS;YACX;YACA,YAAY;gBAAC,kBAAkB,CAAA,GAAA,mDAAS,CAAC,CAAC,yCAAyC;gBAAE,SAAS;YAAI;QACpG;OACC,OAAO,KAAK,QAAQ,KAAK,yBAAW,gCAAC,CAAA,GAAA,WAAG,SAAG,KAAK,QAAQ,IAAW,KAAK,QAAQ,EAChF,oCACC,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,mDAAS,GAAG;OAAuC;AAM1F","sources":["packages/@react-spectrum/list/src/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, SlotProvider} from '@react-spectrum/utils';\nimport {Grid} from '@react-spectrum/layout';\nimport {GridNode} from '@react-types/grid';\nimport listStyles from './styles.css';\nimport React from 'react';\nimport type {SpectrumListViewProps} from './ListView';\nimport {Text} from '@react-spectrum/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>) {\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.module.js.map"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
require("./styles.d09a6cc6.css");
|
|
2
|
+
var $279507a6f189e509$exports = require("./styles_css.main.js");
|
|
3
|
+
var $60684b441be8e84c$exports = require("./ListView.main.js");
|
|
4
|
+
var $9hpsb$reactspectrumutils = require("@react-spectrum/utils");
|
|
5
|
+
var $9hpsb$react = require("react");
|
|
6
|
+
var $9hpsb$reactariavisuallyhidden = require("@react-aria/visually-hidden");
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function $parcel$export(e, n, v, s) {
|
|
14
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
$parcel$export(module.exports, "default", () => $fc02fd49ab58c72e$export$2e2bcd8739ae039);
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
function $fc02fd49ab58c72e$export$2e2bcd8739ae039(props) {
|
|
24
|
+
let { dropState: dropState, dragAndDropHooks: dragAndDropHooks } = (0, $9hpsb$react.useContext)((0, $60684b441be8e84c$exports.ListViewContext));
|
|
25
|
+
const { target: target, isPresentationOnly: isPresentationOnly } = props;
|
|
26
|
+
let ref = (0, $9hpsb$react.useRef)(undefined);
|
|
27
|
+
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
|
|
28
|
+
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $9hpsb$reactariavisuallyhidden.useVisuallyHidden)();
|
|
29
|
+
let isDropTarget = dropState.isDropTarget(target);
|
|
30
|
+
if (!isDropTarget && dropIndicatorProps['aria-hidden']) return null;
|
|
31
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($9hpsb$react))).createElement("div", {
|
|
32
|
+
role: "row",
|
|
33
|
+
"aria-hidden": dropIndicatorProps['aria-hidden']
|
|
34
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9hpsb$react))).createElement("div", {
|
|
35
|
+
role: "gridcell",
|
|
36
|
+
"aria-selected": "false",
|
|
37
|
+
className: (0, $9hpsb$reactspectrumutils.classNames)((0, ($parcel$interopDefault($279507a6f189e509$exports))), 'react-spectrum-ListViewInsertionIndicator', {
|
|
38
|
+
'react-spectrum-ListViewInsertionIndicator--dropTarget': isDropTarget
|
|
39
|
+
})
|
|
40
|
+
}, !isPresentationOnly && /*#__PURE__*/ (0, ($parcel$interopDefault($9hpsb$react))).createElement("div", {
|
|
41
|
+
...visuallyHiddenProps,
|
|
42
|
+
role: "button",
|
|
43
|
+
...dropIndicatorProps,
|
|
44
|
+
ref: ref
|
|
45
|
+
})));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=InsertionIndicator.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAYe,kDAA4B,KAA8B;IACvE,IAAI,aAAC,SAAS,oBAAE,gBAAgB,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,yCAAc;IAC7D,MAAM,UAAC,MAAM,sBAAE,kBAAkB,EAAC,GAAG;IAErC,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAE;IACjB,IAAI,sBAAC,kBAAkB,EAAC,GAAG,iBAAiB,gBAAgB,CAAC,OAAO,WAAW;IAC/E,IAAI,uBAAC,mBAAmB,EAAC,GAAG,CAAA,GAAA,gDAAgB;IAE5C,IAAI,eAAe,UAAU,YAAY,CAAC;IAE1C,IAAI,CAAC,gBAAgB,kBAAkB,CAAC,cAAc,EACpD,OAAO;IAGT,qBACE,0DAAC;QAAI,MAAK;QAAM,eAAa,kBAAkB,CAAC,cAAc;qBAC5D,0DAAC;QACC,MAAK;QACL,iBAAc;QACd,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAS,GACT,6CACA;YACE,yDAAyD;QAC3D;OAEH,CAAC,oCACA,0DAAC;QAAK,GAAG,mBAAmB;QAAE,MAAK;QAAU,GAAG,kBAAkB;QAAE,KAAK;;AAKnF","sources":["packages/@react-spectrum/list/src/InsertionIndicator.tsx"],"sourcesContent":["import {classNames} from '@react-spectrum/utils';\nimport {ItemDropTarget} from '@react-types/shared';\nimport listStyles from './styles.css';\nimport {ListViewContext} from './ListView';\nimport React, {useContext, useRef} from 'react';\nimport {useVisuallyHidden} from '@react-aria/visually-hidden';\n\ninterface InsertionIndicatorProps {\n target: ItemDropTarget,\n isPresentationOnly?: boolean\n}\n\nexport default function InsertionIndicator(props: InsertionIndicatorProps) {\n let {dropState, dragAndDropHooks} = useContext(ListViewContext);\n const {target, isPresentationOnly} = props;\n\n let ref = useRef(undefined);\n let {dropIndicatorProps} = dragAndDropHooks.useDropIndicator(props, dropState, ref);\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n let isDropTarget = dropState.isDropTarget(target);\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']}>\n <div\n role=\"gridcell\"\n aria-selected=\"false\"\n className={\n classNames(\n listStyles,\n 'react-spectrum-ListViewInsertionIndicator',\n {\n 'react-spectrum-ListViewInsertionIndicator--dropTarget': isDropTarget\n }\n )}>\n {!isPresentationOnly &&\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={ref} />\n }\n </div>\n </div>\n );\n}\n"],"names":[],"version":3,"file":"InsertionIndicator.main.js.map"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import "./styles.d09a6cc6.css";
|
|
2
|
+
import $8djIL$styles_cssmodulejs from "./styles_css.mjs";
|
|
3
|
+
import {ListViewContext as $f85fb77f9d4cbc6c$export$870039b0abfe3de0} from "./ListView.mjs";
|
|
4
|
+
import {classNames as $8djIL$classNames} from "@react-spectrum/utils";
|
|
5
|
+
import $8djIL$react, {useContext as $8djIL$useContext, useRef as $8djIL$useRef} from "react";
|
|
6
|
+
import {useVisuallyHidden as $8djIL$useVisuallyHidden} from "@react-aria/visually-hidden";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
function $0a834ddbc989a3e3$export$2e2bcd8739ae039(props) {
|
|
18
|
+
let { dropState: dropState, dragAndDropHooks: dragAndDropHooks } = (0, $8djIL$useContext)((0, $f85fb77f9d4cbc6c$export$870039b0abfe3de0));
|
|
19
|
+
const { target: target, isPresentationOnly: isPresentationOnly } = props;
|
|
20
|
+
let ref = (0, $8djIL$useRef)(undefined);
|
|
21
|
+
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
|
|
22
|
+
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $8djIL$useVisuallyHidden)();
|
|
23
|
+
let isDropTarget = dropState.isDropTarget(target);
|
|
24
|
+
if (!isDropTarget && dropIndicatorProps['aria-hidden']) return null;
|
|
25
|
+
return /*#__PURE__*/ (0, $8djIL$react).createElement("div", {
|
|
26
|
+
role: "row",
|
|
27
|
+
"aria-hidden": dropIndicatorProps['aria-hidden']
|
|
28
|
+
}, /*#__PURE__*/ (0, $8djIL$react).createElement("div", {
|
|
29
|
+
role: "gridcell",
|
|
30
|
+
"aria-selected": "false",
|
|
31
|
+
className: (0, $8djIL$classNames)((0, ($parcel$interopDefault($8djIL$styles_cssmodulejs))), 'react-spectrum-ListViewInsertionIndicator', {
|
|
32
|
+
'react-spectrum-ListViewInsertionIndicator--dropTarget': isDropTarget
|
|
33
|
+
})
|
|
34
|
+
}, !isPresentationOnly && /*#__PURE__*/ (0, $8djIL$react).createElement("div", {
|
|
35
|
+
...visuallyHiddenProps,
|
|
36
|
+
role: "button",
|
|
37
|
+
...dropIndicatorProps,
|
|
38
|
+
ref: ref
|
|
39
|
+
})));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
export {$0a834ddbc989a3e3$export$2e2bcd8739ae039 as default};
|
|
44
|
+
//# sourceMappingURL=InsertionIndicator.module.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import "./styles.d09a6cc6.css";
|
|
2
|
+
import $8djIL$styles_cssmodulejs from "./styles_css.module.js";
|
|
3
|
+
import {ListViewContext as $f85fb77f9d4cbc6c$export$870039b0abfe3de0} from "./ListView.module.js";
|
|
4
|
+
import {classNames as $8djIL$classNames} from "@react-spectrum/utils";
|
|
5
|
+
import $8djIL$react, {useContext as $8djIL$useContext, useRef as $8djIL$useRef} from "react";
|
|
6
|
+
import {useVisuallyHidden as $8djIL$useVisuallyHidden} from "@react-aria/visually-hidden";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
function $0a834ddbc989a3e3$export$2e2bcd8739ae039(props) {
|
|
18
|
+
let { dropState: dropState, dragAndDropHooks: dragAndDropHooks } = (0, $8djIL$useContext)((0, $f85fb77f9d4cbc6c$export$870039b0abfe3de0));
|
|
19
|
+
const { target: target, isPresentationOnly: isPresentationOnly } = props;
|
|
20
|
+
let ref = (0, $8djIL$useRef)(undefined);
|
|
21
|
+
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
|
|
22
|
+
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $8djIL$useVisuallyHidden)();
|
|
23
|
+
let isDropTarget = dropState.isDropTarget(target);
|
|
24
|
+
if (!isDropTarget && dropIndicatorProps['aria-hidden']) return null;
|
|
25
|
+
return /*#__PURE__*/ (0, $8djIL$react).createElement("div", {
|
|
26
|
+
role: "row",
|
|
27
|
+
"aria-hidden": dropIndicatorProps['aria-hidden']
|
|
28
|
+
}, /*#__PURE__*/ (0, $8djIL$react).createElement("div", {
|
|
29
|
+
role: "gridcell",
|
|
30
|
+
"aria-selected": "false",
|
|
31
|
+
className: (0, $8djIL$classNames)((0, ($parcel$interopDefault($8djIL$styles_cssmodulejs))), 'react-spectrum-ListViewInsertionIndicator', {
|
|
32
|
+
'react-spectrum-ListViewInsertionIndicator--dropTarget': isDropTarget
|
|
33
|
+
})
|
|
34
|
+
}, !isPresentationOnly && /*#__PURE__*/ (0, $8djIL$react).createElement("div", {
|
|
35
|
+
...visuallyHiddenProps,
|
|
36
|
+
role: "button",
|
|
37
|
+
...dropIndicatorProps,
|
|
38
|
+
ref: ref
|
|
39
|
+
})));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
export {$0a834ddbc989a3e3$export$2e2bcd8739ae039 as default};
|
|
44
|
+
//# sourceMappingURL=InsertionIndicator.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;AAYe,kDAA4B,KAA8B;IACvE,IAAI,aAAC,SAAS,oBAAE,gBAAgB,EAAC,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAc;IAC7D,MAAM,UAAC,MAAM,sBAAE,kBAAkB,EAAC,GAAG;IAErC,IAAI,MAAM,CAAA,GAAA,aAAK,EAAE;IACjB,IAAI,sBAAC,kBAAkB,EAAC,GAAG,iBAAiB,gBAAgB,CAAC,OAAO,WAAW;IAC/E,IAAI,uBAAC,mBAAmB,EAAC,GAAG,CAAA,GAAA,wBAAgB;IAE5C,IAAI,eAAe,UAAU,YAAY,CAAC;IAE1C,IAAI,CAAC,gBAAgB,kBAAkB,CAAC,cAAc,EACpD,OAAO;IAGT,qBACE,gCAAC;QAAI,MAAK;QAAM,eAAa,kBAAkB,CAAC,cAAc;qBAC5D,gCAAC;QACC,MAAK;QACL,iBAAc;QACd,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,mDAAS,GACT,6CACA;YACE,yDAAyD;QAC3D;OAEH,CAAC,oCACA,gCAAC;QAAK,GAAG,mBAAmB;QAAE,MAAK;QAAU,GAAG,kBAAkB;QAAE,KAAK;;AAKnF","sources":["packages/@react-spectrum/list/src/InsertionIndicator.tsx"],"sourcesContent":["import {classNames} from '@react-spectrum/utils';\nimport {ItemDropTarget} from '@react-types/shared';\nimport listStyles from './styles.css';\nimport {ListViewContext} from './ListView';\nimport React, {useContext, useRef} from 'react';\nimport {useVisuallyHidden} from '@react-aria/visually-hidden';\n\ninterface InsertionIndicatorProps {\n target: ItemDropTarget,\n isPresentationOnly?: boolean\n}\n\nexport default function InsertionIndicator(props: InsertionIndicatorProps) {\n let {dropState, dragAndDropHooks} = useContext(ListViewContext);\n const {target, isPresentationOnly} = props;\n\n let ref = useRef(undefined);\n let {dropIndicatorProps} = dragAndDropHooks.useDropIndicator(props, dropState, ref);\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n let isDropTarget = dropState.isDropTarget(target);\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']}>\n <div\n role=\"gridcell\"\n aria-selected=\"false\"\n className={\n classNames(\n listStyles,\n 'react-spectrum-ListViewInsertionIndicator',\n {\n 'react-spectrum-ListViewInsertionIndicator--dropTarget': isDropTarget\n }\n )}>\n {!isPresentationOnly &&\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={ref} />\n }\n </div>\n </div>\n );\n}\n"],"names":[],"version":3,"file":"InsertionIndicator.module.js.map"}
|