@depup/react-aria-components 1.19.0-depup.27 → 1.21.0-depup.0

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.
Files changed (333) hide show
  1. package/NavigationTree/package.json +5 -0
  2. package/PreviewTrigger/package.json +5 -0
  3. package/README.md +2 -2
  4. package/TokenField/package.json +5 -0
  5. package/changes.json +1 -1
  6. package/dist/exports/GridList.cjs.map +1 -1
  7. package/dist/exports/GridList.js.map +1 -1
  8. package/dist/exports/GridList.mjs.map +1 -1
  9. package/dist/exports/Menu.cjs +1 -0
  10. package/dist/exports/Menu.cjs.map +1 -1
  11. package/dist/exports/Menu.js +2 -2
  12. package/dist/exports/Menu.js.map +1 -1
  13. package/dist/exports/Menu.mjs +2 -2
  14. package/dist/exports/Menu.mjs.map +1 -1
  15. package/dist/exports/NavigationTree.cjs +37 -0
  16. package/dist/exports/NavigationTree.cjs.map +1 -0
  17. package/dist/exports/NavigationTree.js +25 -0
  18. package/dist/exports/NavigationTree.js.map +1 -0
  19. package/dist/exports/NavigationTree.mjs +25 -0
  20. package/dist/exports/NavigationTree.mjs.map +1 -0
  21. package/dist/exports/PreviewTrigger.cjs +26 -0
  22. package/dist/exports/PreviewTrigger.cjs.map +1 -0
  23. package/dist/exports/PreviewTrigger.js +21 -0
  24. package/dist/exports/PreviewTrigger.js.map +1 -0
  25. package/dist/exports/PreviewTrigger.mjs +21 -0
  26. package/dist/exports/PreviewTrigger.mjs.map +1 -0
  27. package/dist/exports/TokenField.cjs +31 -0
  28. package/dist/exports/TokenField.cjs.map +1 -0
  29. package/dist/exports/TokenField.js +21 -0
  30. package/dist/exports/TokenField.js.map +1 -0
  31. package/dist/exports/TokenField.mjs +21 -0
  32. package/dist/exports/TokenField.mjs.map +1 -0
  33. package/dist/exports/Tree.cjs.map +1 -1
  34. package/dist/exports/Tree.js.map +1 -1
  35. package/dist/exports/Tree.mjs.map +1 -1
  36. package/dist/exports/index.cjs +25 -0
  37. package/dist/exports/index.cjs.map +1 -1
  38. package/dist/exports/index.js +12 -2
  39. package/dist/exports/index.js.map +1 -1
  40. package/dist/exports/index.mjs +12 -2
  41. package/dist/exports/index.mjs.map +1 -1
  42. package/dist/private/Checkbox.cjs.map +1 -1
  43. package/dist/private/Checkbox.js.map +1 -1
  44. package/dist/private/Checkbox.mjs.map +1 -1
  45. package/dist/private/ComboBox.cjs +21 -2
  46. package/dist/private/ComboBox.cjs.map +1 -1
  47. package/dist/private/ComboBox.js +21 -2
  48. package/dist/private/ComboBox.js.map +1 -1
  49. package/dist/private/ComboBox.mjs +21 -2
  50. package/dist/private/ComboBox.mjs.map +1 -1
  51. package/dist/private/Dialog.cjs +21 -1
  52. package/dist/private/Dialog.cjs.map +1 -1
  53. package/dist/private/Dialog.js +21 -1
  54. package/dist/private/Dialog.js.map +1 -1
  55. package/dist/private/Dialog.mjs +21 -1
  56. package/dist/private/Dialog.mjs.map +1 -1
  57. package/dist/private/DragAndDrop.cjs +1 -0
  58. package/dist/private/DragAndDrop.cjs.map +1 -1
  59. package/dist/private/DragAndDrop.js +1 -0
  60. package/dist/private/DragAndDrop.js.map +1 -1
  61. package/dist/private/DragAndDrop.mjs +1 -0
  62. package/dist/private/DragAndDrop.mjs.map +1 -1
  63. package/dist/private/DropZone.cjs +5 -2
  64. package/dist/private/DropZone.cjs.map +1 -1
  65. package/dist/private/DropZone.js +5 -3
  66. package/dist/private/DropZone.js.map +1 -1
  67. package/dist/private/DropZone.mjs +5 -2
  68. package/dist/private/DropZone.mjs.map +1 -1
  69. package/dist/private/FileTrigger.cjs +1 -0
  70. package/dist/private/FileTrigger.cjs.map +1 -1
  71. package/dist/private/FileTrigger.js +1 -0
  72. package/dist/private/FileTrigger.js.map +1 -1
  73. package/dist/private/FileTrigger.mjs +1 -0
  74. package/dist/private/FileTrigger.mjs.map +1 -1
  75. package/dist/private/GridLayout.cjs +3 -1
  76. package/dist/private/GridLayout.cjs.map +1 -1
  77. package/dist/private/GridLayout.js +3 -1
  78. package/dist/private/GridLayout.js.map +1 -1
  79. package/dist/private/GridLayout.mjs +3 -1
  80. package/dist/private/GridLayout.mjs.map +1 -1
  81. package/dist/private/GridList.cjs +12 -1
  82. package/dist/private/GridList.cjs.map +1 -1
  83. package/dist/private/GridList.js +12 -1
  84. package/dist/private/GridList.js.map +1 -1
  85. package/dist/private/GridList.mjs +12 -1
  86. package/dist/private/GridList.mjs.map +1 -1
  87. package/dist/private/ListBox.cjs +9 -1
  88. package/dist/private/ListBox.cjs.map +1 -1
  89. package/dist/private/ListBox.js +9 -1
  90. package/dist/private/ListBox.js.map +1 -1
  91. package/dist/private/ListBox.mjs +9 -1
  92. package/dist/private/ListBox.mjs.map +1 -1
  93. package/dist/private/Menu.cjs +59 -2
  94. package/dist/private/Menu.cjs.map +1 -1
  95. package/dist/private/Menu.js +60 -4
  96. package/dist/private/Menu.js.map +1 -1
  97. package/dist/private/Menu.mjs +60 -4
  98. package/dist/private/Menu.mjs.map +1 -1
  99. package/dist/private/Meter.cjs +2 -1
  100. package/dist/private/Meter.cjs.map +1 -1
  101. package/dist/private/Meter.js +2 -1
  102. package/dist/private/Meter.js.map +1 -1
  103. package/dist/private/Meter.mjs +2 -1
  104. package/dist/private/Meter.mjs.map +1 -1
  105. package/dist/private/Modal.cjs +2 -0
  106. package/dist/private/Modal.cjs.map +1 -1
  107. package/dist/private/Modal.js +2 -0
  108. package/dist/private/Modal.js.map +1 -1
  109. package/dist/private/Modal.mjs +2 -0
  110. package/dist/private/Modal.mjs.map +1 -1
  111. package/dist/private/NavigationTree.cjs +272 -0
  112. package/dist/private/NavigationTree.cjs.map +1 -0
  113. package/dist/private/NavigationTree.js +258 -0
  114. package/dist/private/NavigationTree.js.map +1 -0
  115. package/dist/private/NavigationTree.mjs +257 -0
  116. package/dist/private/NavigationTree.mjs.map +1 -0
  117. package/dist/private/Popover.cjs +34 -9
  118. package/dist/private/Popover.cjs.map +1 -1
  119. package/dist/private/Popover.js +34 -9
  120. package/dist/private/Popover.js.map +1 -1
  121. package/dist/private/Popover.mjs +34 -9
  122. package/dist/private/Popover.mjs.map +1 -1
  123. package/dist/private/PreviewTrigger.cjs +88 -0
  124. package/dist/private/PreviewTrigger.cjs.map +1 -0
  125. package/dist/private/PreviewTrigger.js +80 -0
  126. package/dist/private/PreviewTrigger.js.map +1 -0
  127. package/dist/private/PreviewTrigger.mjs +79 -0
  128. package/dist/private/PreviewTrigger.mjs.map +1 -0
  129. package/dist/private/ProgressBar.cjs +6 -1
  130. package/dist/private/ProgressBar.cjs.map +1 -1
  131. package/dist/private/ProgressBar.js +6 -1
  132. package/dist/private/ProgressBar.js.map +1 -1
  133. package/dist/private/ProgressBar.mjs +6 -1
  134. package/dist/private/ProgressBar.mjs.map +1 -1
  135. package/dist/private/RadioGroup.cjs.map +1 -1
  136. package/dist/private/RadioGroup.js.map +1 -1
  137. package/dist/private/RadioGroup.mjs.map +1 -1
  138. package/dist/private/Select.cjs.map +1 -1
  139. package/dist/private/Select.js.map +1 -1
  140. package/dist/private/Select.mjs.map +1 -1
  141. package/dist/private/Switch.cjs +8 -2
  142. package/dist/private/Switch.cjs.map +1 -1
  143. package/dist/private/Switch.js +9 -3
  144. package/dist/private/Switch.js.map +1 -1
  145. package/dist/private/Switch.mjs +9 -3
  146. package/dist/private/Switch.mjs.map +1 -1
  147. package/dist/private/Table.cjs +26 -14
  148. package/dist/private/Table.cjs.map +1 -1
  149. package/dist/private/Table.js +26 -14
  150. package/dist/private/Table.js.map +1 -1
  151. package/dist/private/Table.mjs +26 -14
  152. package/dist/private/Table.mjs.map +1 -1
  153. package/dist/private/TableLayout.cjs +3 -1
  154. package/dist/private/TableLayout.cjs.map +1 -1
  155. package/dist/private/TableLayout.js +3 -1
  156. package/dist/private/TableLayout.js.map +1 -1
  157. package/dist/private/TableLayout.mjs +3 -1
  158. package/dist/private/TableLayout.mjs.map +1 -1
  159. package/dist/private/TagGroup.cjs +1 -0
  160. package/dist/private/TagGroup.cjs.map +1 -1
  161. package/dist/private/TagGroup.js +1 -0
  162. package/dist/private/TagGroup.js.map +1 -1
  163. package/dist/private/TagGroup.mjs +1 -0
  164. package/dist/private/TagGroup.mjs.map +1 -1
  165. package/dist/private/Text.cjs +3 -1
  166. package/dist/private/Text.cjs.map +1 -1
  167. package/dist/private/Text.js +4 -2
  168. package/dist/private/Text.js.map +1 -1
  169. package/dist/private/Text.mjs +4 -2
  170. package/dist/private/Text.mjs.map +1 -1
  171. package/dist/private/ToggleButton.cjs.map +1 -1
  172. package/dist/private/ToggleButton.js.map +1 -1
  173. package/dist/private/ToggleButton.mjs.map +1 -1
  174. package/dist/private/TokenField.cjs +235 -0
  175. package/dist/private/TokenField.cjs.map +1 -0
  176. package/dist/private/TokenField.js +225 -0
  177. package/dist/private/TokenField.js.map +1 -0
  178. package/dist/private/TokenField.mjs +223 -0
  179. package/dist/private/TokenField.mjs.map +1 -0
  180. package/dist/private/Tooltip.cjs +10 -2
  181. package/dist/private/Tooltip.cjs.map +1 -1
  182. package/dist/private/Tooltip.js +10 -2
  183. package/dist/private/Tooltip.js.map +1 -1
  184. package/dist/private/Tooltip.mjs +10 -2
  185. package/dist/private/Tooltip.mjs.map +1 -1
  186. package/dist/private/Tree.cjs +11 -1
  187. package/dist/private/Tree.cjs.map +1 -1
  188. package/dist/private/Tree.js +11 -1
  189. package/dist/private/Tree.js.map +1 -1
  190. package/dist/private/Tree.mjs +11 -1
  191. package/dist/private/Tree.mjs.map +1 -1
  192. package/dist/private/TreeDropTargetDelegate.cjs +11 -6
  193. package/dist/private/TreeDropTargetDelegate.cjs.map +1 -1
  194. package/dist/private/TreeDropTargetDelegate.js +11 -6
  195. package/dist/private/TreeDropTargetDelegate.js.map +1 -1
  196. package/dist/private/TreeDropTargetDelegate.mjs +11 -6
  197. package/dist/private/TreeDropTargetDelegate.mjs.map +1 -1
  198. package/dist/private/Virtualizer.cjs +18 -16
  199. package/dist/private/Virtualizer.cjs.map +1 -1
  200. package/dist/private/Virtualizer.js +18 -16
  201. package/dist/private/Virtualizer.js.map +1 -1
  202. package/dist/private/Virtualizer.mjs +18 -16
  203. package/dist/private/Virtualizer.mjs.map +1 -1
  204. package/dist/private/useDragAndDrop.cjs +7 -0
  205. package/dist/private/useDragAndDrop.cjs.map +1 -1
  206. package/dist/private/useDragAndDrop.js +7 -0
  207. package/dist/private/useDragAndDrop.js.map +1 -1
  208. package/dist/private/useDragAndDrop.mjs +7 -0
  209. package/dist/private/useDragAndDrop.mjs.map +1 -1
  210. package/dist/private/utils.cjs.map +1 -1
  211. package/dist/private/utils.js.map +1 -1
  212. package/dist/private/utils.mjs.map +1 -1
  213. package/dist/types/exports/GridList.d.ts +1 -1
  214. package/dist/types/exports/Menu.d.ts +2 -2
  215. package/dist/types/exports/NavigationTree.d.ts +8 -0
  216. package/dist/types/exports/PreviewTrigger.d.ts +3 -0
  217. package/dist/types/exports/TokenField.d.ts +5 -0
  218. package/dist/types/exports/Tree.d.ts +1 -1
  219. package/dist/types/exports/index.d.ts +14 -5
  220. package/dist/types/src/Breadcrumbs.d.ts +2 -2
  221. package/dist/types/src/Button.d.ts +1 -1
  222. package/dist/types/src/Calendar.d.ts +6 -6
  223. package/dist/types/src/Checkbox.d.ts +8 -8
  224. package/dist/types/src/Collection.d.ts +1 -1
  225. package/dist/types/src/ComboBox.d.ts +6 -3
  226. package/dist/types/src/DateField.d.ts +4 -4
  227. package/dist/types/src/DatePicker.d.ts +2 -2
  228. package/dist/types/src/Dialog.d.ts +2 -2
  229. package/dist/types/src/Disclosure.d.ts +2 -2
  230. package/dist/types/src/GridList.d.ts +18 -7
  231. package/dist/types/src/Group.d.ts +1 -1
  232. package/dist/types/src/Header.d.ts +1 -1
  233. package/dist/types/src/Input.d.ts +1 -1
  234. package/dist/types/src/Label.d.ts +1 -1
  235. package/dist/types/src/Link.d.ts +1 -1
  236. package/dist/types/src/ListBox.d.ts +6 -6
  237. package/dist/types/src/Menu.d.ts +25 -6
  238. package/dist/types/src/Meter.d.ts +1 -1
  239. package/dist/types/src/Modal.d.ts +2 -2
  240. package/dist/types/src/NavigationTree.d.ts +80 -0
  241. package/dist/types/src/NumberField.d.ts +1 -1
  242. package/dist/types/src/OverlayArrow.d.ts +1 -1
  243. package/dist/types/src/Popover.d.ts +8 -1
  244. package/dist/types/src/PreviewTrigger.d.ts +23 -0
  245. package/dist/types/src/RadioGroup.d.ts +8 -8
  246. package/dist/types/src/SearchField.d.ts +1 -1
  247. package/dist/types/src/Select.d.ts +3 -3
  248. package/dist/types/src/Separator.d.ts +1 -1
  249. package/dist/types/src/Slider.d.ts +5 -5
  250. package/dist/types/src/Switch.d.ts +7 -7
  251. package/dist/types/src/Table.d.ts +32 -8
  252. package/dist/types/src/Tabs.d.ts +5 -5
  253. package/dist/types/src/TagGroup.d.ts +3 -3
  254. package/dist/types/src/Text.d.ts +1 -1
  255. package/dist/types/src/TextField.d.ts +1 -1
  256. package/dist/types/src/Toast.d.ts +3 -3
  257. package/dist/types/src/ToggleButton.d.ts +1 -1
  258. package/dist/types/src/ToggleButtonGroup.d.ts +1 -1
  259. package/dist/types/src/TokenField.d.ts +111 -0
  260. package/dist/types/src/Toolbar.d.ts +1 -1
  261. package/dist/types/src/Tooltip.d.ts +1 -1
  262. package/dist/types/src/Tree.d.ts +12 -10
  263. package/dist/types/src/Virtualizer.d.ts +4 -0
  264. package/dist/types/src/utils.d.ts +19 -5
  265. package/i18n/ar-AE.js +1 -1
  266. package/i18n/ar-AE.mjs +1 -1
  267. package/i18n/bg-BG.js +1 -1
  268. package/i18n/bg-BG.mjs +1 -1
  269. package/i18n/cs-CZ.js +1 -1
  270. package/i18n/cs-CZ.mjs +1 -1
  271. package/i18n/da-DK.js +1 -1
  272. package/i18n/da-DK.mjs +1 -1
  273. package/i18n/de-DE.js +1 -1
  274. package/i18n/de-DE.mjs +1 -1
  275. package/i18n/el-GR.js +1 -1
  276. package/i18n/el-GR.mjs +1 -1
  277. package/i18n/en-US.js +1 -1
  278. package/i18n/en-US.mjs +1 -1
  279. package/i18n/es-ES.js +1 -1
  280. package/i18n/es-ES.mjs +1 -1
  281. package/i18n/et-EE.js +1 -1
  282. package/i18n/et-EE.mjs +1 -1
  283. package/i18n/fi-FI.js +1 -1
  284. package/i18n/fi-FI.mjs +1 -1
  285. package/i18n/fr-FR.js +1 -1
  286. package/i18n/fr-FR.mjs +1 -1
  287. package/i18n/he-IL.js +1 -1
  288. package/i18n/he-IL.mjs +1 -1
  289. package/i18n/hr-HR.js +1 -1
  290. package/i18n/hr-HR.mjs +1 -1
  291. package/i18n/hu-HU.js +1 -1
  292. package/i18n/hu-HU.mjs +1 -1
  293. package/i18n/it-IT.js +1 -1
  294. package/i18n/it-IT.mjs +1 -1
  295. package/i18n/ja-JP.js +1 -1
  296. package/i18n/ja-JP.mjs +1 -1
  297. package/i18n/ko-KR.js +1 -1
  298. package/i18n/ko-KR.mjs +1 -1
  299. package/i18n/lt-LT.js +1 -1
  300. package/i18n/lt-LT.mjs +1 -1
  301. package/i18n/lv-LV.js +1 -1
  302. package/i18n/lv-LV.mjs +1 -1
  303. package/i18n/nb-NO.js +1 -1
  304. package/i18n/nb-NO.mjs +1 -1
  305. package/i18n/nl-NL.js +1 -1
  306. package/i18n/nl-NL.mjs +1 -1
  307. package/i18n/pl-PL.js +1 -1
  308. package/i18n/pl-PL.mjs +1 -1
  309. package/i18n/pt-BR.js +1 -1
  310. package/i18n/pt-BR.mjs +1 -1
  311. package/i18n/pt-PT.js +1 -1
  312. package/i18n/pt-PT.mjs +1 -1
  313. package/i18n/ro-RO.js +1 -1
  314. package/i18n/ro-RO.mjs +1 -1
  315. package/i18n/ru-RU.js +1 -1
  316. package/i18n/ru-RU.mjs +1 -1
  317. package/i18n/sk-SK.js +1 -1
  318. package/i18n/sk-SK.mjs +1 -1
  319. package/i18n/sl-SI.js +1 -1
  320. package/i18n/sl-SI.mjs +1 -1
  321. package/i18n/sr-SP.js +1 -1
  322. package/i18n/sr-SP.mjs +1 -1
  323. package/i18n/sv-SE.js +1 -1
  324. package/i18n/sv-SE.mjs +1 -1
  325. package/i18n/tr-TR.js +1 -1
  326. package/i18n/tr-TR.mjs +1 -1
  327. package/i18n/uk-UA.js +1 -1
  328. package/i18n/uk-UA.mjs +1 -1
  329. package/i18n/zh-CN.js +1 -1
  330. package/i18n/zh-CN.mjs +1 -1
  331. package/i18n/zh-TW.js +1 -1
  332. package/i18n/zh-TW.mjs +1 -1
  333. package/package.json +33 -31
@@ -78,6 +78,7 @@ const $d6d57d52ecf291c4$export$a7bfbda1311ca015 = /*#__PURE__*/ (0, $8gQqD$forwa
78
78
  }));
79
79
  });
80
80
  function $d6d57d52ecf291c4$var$GridListInner({ props: props, collection: collection, gridListRef: ref }) {
81
+ // oxlint-disable-next-line react/react-compiler
81
82
  [props, ref] = (0, $b7b7a92703138c9b$export$29f1550f4b0d4415)(props, ref, (0, $8f09b710ef85b337$export$b0d3ecf7112093a7));
82
83
  let { shouldUseVirtualFocus: // eslint-disable-next-line @typescript-eslint/no-unused-vars
83
84
  shouldUseVirtualFocus, filter: filter, disallowTypeAhead: disallowTypeAhead, UNSTABLE_focusOnEntry: UNSTABLE_focusOnEntry, ...DOMCollectionProps } = props;
@@ -89,6 +90,7 @@ function $d6d57d52ecf291c4$var$GridListInner({ props: props, collection: collect
89
90
  children: undefined,
90
91
  layoutDelegate: layoutDelegate
91
92
  });
93
+ // oxlint-disable-next-line react/react-compiler
92
94
  let filteredState = (0, $8gQqD$UNSTABLE_useFilteredListState)(gridlistState, filter);
93
95
  let collator = (0, $8gQqD$useCollator)({
94
96
  usage: 'search',
@@ -147,11 +149,13 @@ function $d6d57d52ecf291c4$var$GridListInner({ props: props, collection: collect
147
149
  let dragPreview = null;
148
150
  let preview = (0, $8gQqD$useRef)(null);
149
151
  if (isListDraggable && dragAndDropHooks) {
152
+ // oxlint-disable-next-line react/react-compiler
150
153
  dragState = dragAndDropHooks.useDraggableCollectionState({
151
154
  collection: filteredState.collection,
152
155
  selectionManager: selectionManager,
153
156
  preview: dragAndDropHooks.renderDragPreview ? preview : undefined
154
157
  });
158
+ // oxlint-disable-next-line react/react-compiler
155
159
  dragAndDropHooks.useDraggableCollection({}, dragState, ref);
156
160
  let DragPreview = dragAndDropHooks.DragPreview;
157
161
  dragPreview = dragAndDropHooks.renderDragPreview ? /*#__PURE__*/ (0, $8gQqD$react).createElement(DragPreview, {
@@ -159,6 +163,7 @@ function $d6d57d52ecf291c4$var$GridListInner({ props: props, collection: collect
159
163
  }, dragAndDropHooks.renderDragPreview) : null;
160
164
  }
161
165
  if (isListDroppable && dragAndDropHooks) {
166
+ // oxlint-disable-next-line react/react-compiler
162
167
  dropState = dragAndDropHooks.useDroppableCollectionState({
163
168
  collection: filteredState.collection,
164
169
  selectionManager: selectionManager
@@ -168,6 +173,7 @@ function $d6d57d52ecf291c4$var$GridListInner({ props: props, collection: collect
168
173
  direction: direction,
169
174
  orientation: orientation
170
175
  });
176
+ // oxlint-disable-next-line react/react-compiler
171
177
  droppableCollection = dragAndDropHooks.useDroppableCollection({
172
178
  keyboardDelegate: keyboardDelegate,
173
179
  dropTargetDelegate: dropTargetDelegate
@@ -261,7 +267,9 @@ const $d6d57d52ecf291c4$export$e96fc9a8407faa6b = /*#__PURE__*/ (0, $8gQqD$creat
261
267
  let { rowProps: rowProps, gridCellProps: gridCellProps, descriptionProps: descriptionProps, ...states } = (0, $8gQqD$useGridListItem)({
262
268
  node: item,
263
269
  shouldSelectOnPressUp: !!dragState,
264
- isVirtualized: isVirtualized
270
+ isVirtualized: isVirtualized,
271
+ focusMode: props.focusMode,
272
+ allowsArrowNavigation: props.allowsArrowNavigation
265
273
  }, state, ref);
266
274
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $8gQqD$useHover)({
267
275
  // because of https://bugs.webkit.org/show_bug.cgi?id=214609, supporting hover styles when a item is ONLY isDraggable
@@ -435,6 +443,7 @@ function $d6d57d52ecf291c4$var$GridListDropIndicatorWrapper(props, ref) {
435
443
  ref = (0, $8gQqD$useObjectRef)(ref);
436
444
  let { dragAndDropHooks: dragAndDropHooks, dropState: dropState } = (0, $8gQqD$useContext)((0, $49776fcddfd94ccc$export$d188a835a7bc5783));
437
445
  let buttonRef = (0, $8gQqD$useRef)(null);
446
+ // oxlint-disable-next-line react/react-compiler
438
447
  let { dropIndicatorProps: dropIndicatorProps, isHidden: isHidden, isDropTarget: isDropTarget } = dragAndDropHooks.useDropIndicator(props, dropState, buttonRef);
439
448
  if (isHidden) return null;
440
449
  return /*#__PURE__*/ (0, $8gQqD$react).createElement($d6d57d52ecf291c4$var$GridListDropIndicatorForwardRef, {
@@ -473,6 +482,7 @@ const $d6d57d52ecf291c4$var$GridListDropIndicatorForwardRef = /*#__PURE__*/ (0,
473
482
  function $d6d57d52ecf291c4$var$RootDropIndicator() {
474
483
  let { dragAndDropHooks: dragAndDropHooks, dropState: dropState } = (0, $8gQqD$useContext)((0, $49776fcddfd94ccc$export$d188a835a7bc5783));
475
484
  let ref = (0, $8gQqD$useRef)(null);
485
+ // oxlint-disable-next-line react/react-compiler
476
486
  let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator({
477
487
  target: {
478
488
  type: 'root'
@@ -511,6 +521,7 @@ const $d6d57d52ecf291c4$export$392b9a0bbc7c7e43 = (0, $8gQqD$createLeafComponent
511
521
  }), [
512
522
  onLoadMore,
513
523
  scrollOffset,
524
+ sentinelRef,
514
525
  state === null || state === void 0 ? void 0 : state.collection
515
526
  ]);
516
527
  (0, $8gQqD$useLoadMoreSentinel)(memoedLoadMoreProps, sentinelRef);
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6MM,MAAM,0DACX,CAAA,GAAA,oBAAY,EAAoD;AAM3D,MAAM,4CAAyB,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,SAC5E,KAAuB,EACvB,GAAiC;IAEjC,+FAA+F;IAC/F,CAAC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AA,iBAAS,EAAE,UAAU,aAAa,cAAc;QAAE,KAAK;qBAClE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAuB;oBAAC,GAAG,QAAQ;oBAAE,KAAK;gBAAU;aAAE;YACvD;gBAAC;gBAA4B;oBAAC,GAAG,cAAc;gBAAA;aAAE;SAClD;qBACD,gCAAC;QAAiB,YAAY,MAAM,UAAU;QAAE,QAAQ;;AAIhE;AAMK,MAAM,0DAAwB,CAAA,GAAA,oBAAY,EAE/C,CAAC;AACI,MAAM,0DAA6B,CAAA,GAAA,oBAAY,EAAsC;AAErF,MAAM,4CAAiB,WAAW,GAAG,CAAA,GAAA,0BAAkB,EAC5D,CAAA,GAAA,iBAAS,GACT,SAAS,OAAO,KAA0B,EAAE,GAAiC;IAC3E,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,iBAAiB,CAAA,GAAA,iBAAS,EAAE;IAEhC,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QAAC,QAAQ,MAAM,MAAM;QAAE,WAAU;QAA4B,KAAK;QAAM,GAAG,KAAK;qBACtF,gCAAC;QAAK,GAAG,cAAc;QAAE,OAAO;YAAC,SAAS;QAAU;OACjD,MAAM,QAAQ;AAIvB","sources":["packages/react-aria-components/src/GridList.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 {\n AriaGridListProps,\n useGridList,\n useGridListItem,\n useGridListSection,\n useGridListSelectionCheckbox\n} from 'react-aria/useGridList';\n\nimport {ButtonContext} from './Button';\nimport {CheckboxContext, CheckboxFieldContext} from './Checkbox';\nimport {\n ClassNameOrFunction,\n ContextValue,\n DEFAULT_SLOT,\n dom,\n DOMProps,\n DOMRenderProps,\n Provider,\n RenderProps,\n SlotProps,\n StyleProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {\n CollectionBuilder,\n createBranchComponent,\n createLeafComponent\n} from 'react-aria/CollectionBuilder';\nimport {\n CollectionProps,\n CollectionRendererContext,\n DefaultCollectionRenderer,\n ItemRenderProps,\n SectionProps\n} from './Collection';\nimport {\n DragAndDropContext,\n DropIndicatorContext,\n DropIndicatorProps,\n useDndPersistedKeys,\n useRenderDropIndicator\n} from './DragAndDrop';\nimport {DragAndDropHooks} from './useDragAndDrop';\nimport {DraggableCollectionState} from 'react-stately/useDraggableCollectionState';\nimport {DraggableItemResult} from 'react-aria/useDraggableCollection';\nimport {DragPreviewRenderer} from '@react-types/shared';\nimport {DropIndicatorAria, DroppableCollectionResult} from 'react-aria/useDroppableCollection';\nimport {DroppableCollectionState} from 'react-stately/useDroppableCollectionState';\nimport {\n FieldInputContext,\n SelectableCollectionContext,\n SelectableCollectionContextValue\n} from './Autocomplete';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FocusScope} from 'react-aria/FocusScope';\nimport {\n forwardRefType,\n GlobalDOMAttributes,\n HoverEvents,\n Key,\n LinkDOMProps,\n Orientation,\n PressEvents,\n RefObject\n} from '@react-types/shared';\nimport {\n HeaderNode,\n ItemNode,\n LoaderNode,\n SectionNode\n} from 'react-aria/private/collections/BaseCollection';\nimport {Collection as ICollection, Node, SelectionBehavior} from '@react-types/shared';\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {ListKeyboardDelegate} from 'react-aria/ListKeyboardDelegate';\nimport {ListState, UNSTABLE_useFilteredListState, useListState} from 'react-stately/useListState';\nimport {ListStateContext} from './ListBox';\nimport {\n LoadMoreSentinelProps,\n useLoadMoreSentinel\n} from 'react-aria/private/utils/useLoadMoreSentinel';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n JSX,\n ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef\n} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TextContext} from './Text';\nimport {useCollator} from 'react-aria/useCollator';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {useVisuallyHidden} from 'react-aria/VisuallyHidden';\n\nexport interface GridListRenderProps {\n /**\n * Whether the list has no items and should display its empty state.\n *\n * @selector [data-empty]\n */\n isEmpty: boolean;\n /**\n * Whether the grid list is currently focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the grid list is currently keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the grid list is currently the active drop target.\n *\n * @selector [data-drop-target]\n */\n isDropTarget: boolean;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @selector [data-layout=\"stack | grid\"]\n */\n layout: 'stack' | 'grid';\n /**\n * The primary orientation of the items.\n *\n * @selector [data-orientation=\"vertical | horizontal\"]\n */\n orientation: Orientation;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListProps<T>\n extends\n Omit<AriaGridListProps<T>, 'children'>,\n CollectionProps<T>,\n StyleRenderProps<GridListRenderProps>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridList'\n */\n className?: ClassNameOrFunction<GridListRenderProps>;\n /**\n * Whether typeahead navigation is disabled.\n *\n * @default false\n */\n disallowTypeAhead?: boolean;\n /**\n * How multiple selection should behave in the collection.\n *\n * @default 'toggle'\n */\n selectionBehavior?: SelectionBehavior;\n /**\n * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for\n * the GridList.\n */\n dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>;\n /** Provides content to display when there are no items in the list. */\n renderEmptyState?: (props: GridListRenderProps) => ReactNode;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @default 'stack'\n */\n layout?: 'stack' | 'grid';\n /**\n * The primary orientation of the items. Usually this is the direction that the collection\n * scrolls.\n *\n * @default 'vertical'\n */\n orientation?: Orientation;\n /**\n * Which item in the collection to focus when tabbing into the collection. Overrides default\n * roving tab index like behavior.\n *\n * @private\n */\n UNSTABLE_focusOnEntry?: 'first' | 'last';\n}\n\nexport const GridListContext =\n createContext<ContextValue<GridListProps<any>, HTMLDivElement>>(null);\n\n/**\n * A grid list displays a list of interactive items, with support for keyboard navigation,\n * single or multiple selection, and row actions.\n */\nexport const GridList = /*#__PURE__*/ (forwardRef as forwardRefType)(function GridList<T>(\n props: GridListProps<T>,\n ref: ForwardedRef<HTMLDivElement>\n) {\n // Render the portal first so that we have the collection by the time we render the DOM in SSR.\n [props, ref] = useContextProps(props, ref, GridListContext);\n\n return (\n <CollectionBuilder content={<Collection {...props} />}>\n {collection => <GridListInner props={props} collection={collection} gridListRef={ref} />}\n </CollectionBuilder>\n );\n});\n\ninterface GridListInnerProps<T> {\n props: GridListProps<T> & SelectableCollectionContextValue<T>;\n collection: ICollection<Node<any>>;\n gridListRef: RefObject<HTMLElement | null>;\n}\n\nfunction GridListInner<T>({props, collection, gridListRef: ref}: GridListInnerProps<T>) {\n [props, ref] = useContextProps(props, ref, SelectableCollectionContext);\n let {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n shouldUseVirtualFocus,\n filter,\n disallowTypeAhead,\n UNSTABLE_focusOnEntry,\n ...DOMCollectionProps\n } = props;\n let {\n dragAndDropHooks,\n keyboardNavigationBehavior = 'arrow',\n layout = 'stack',\n orientation = 'vertical'\n } = props;\n let {\n CollectionRoot,\n isVirtualized,\n layoutDelegate,\n dropTargetDelegate: ctxDropTargetDelegate\n } = useContext(CollectionRendererContext);\n let gridlistState = useListState({\n ...DOMCollectionProps,\n collection,\n children: undefined,\n layoutDelegate\n });\n\n let filteredState = UNSTABLE_useFilteredListState(gridlistState as ListState<T>, filter);\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let {disabledBehavior, disabledKeys} = filteredState.selectionManager;\n let {direction} = useLocale();\n let keyboardDelegate = useMemo(\n () =>\n new ListKeyboardDelegate({\n collection: filteredState.collection,\n collator,\n ref,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n layout,\n orientation,\n direction\n }),\n [\n filteredState.collection,\n ref,\n layout,\n orientation,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n collator,\n direction\n ]\n );\n\n let {gridProps} = useGridList(\n {\n ...DOMCollectionProps,\n keyboardDelegate,\n // Only tab navigation is supported in grid layout.\n keyboardNavigationBehavior: layout === 'grid' ? 'tab' : keyboardNavigationBehavior,\n isVirtualized,\n shouldSelectOnPressUp: props.shouldSelectOnPressUp,\n disallowTypeAhead,\n UNSTABLE_focusOnEntry\n },\n filteredState,\n ref\n );\n\n let selectionManager = filteredState.selectionManager;\n let isListDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let isListDroppable = !!dragAndDropHooks?.useDroppableCollectionState;\n let dragHooksProvided = useRef(isListDraggable);\n let dropHooksProvided = useRef(isListDroppable);\n useEffect(() => {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n if (dragHooksProvided.current !== isListDraggable) {\n console.warn(\n 'Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n if (dropHooksProvided.current !== isListDroppable) {\n console.warn(\n 'Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n }, [isListDraggable, isListDroppable]);\n\n let dragState: DraggableCollectionState | undefined = undefined;\n let dropState: DroppableCollectionState | undefined = undefined;\n let droppableCollection: DroppableCollectionResult | undefined = undefined;\n let isRootDropTarget = false;\n let dragPreview: JSX.Element | null = null;\n let preview = useRef<DragPreviewRenderer>(null);\n\n if (isListDraggable && dragAndDropHooks) {\n dragState = dragAndDropHooks.useDraggableCollectionState!({\n collection: filteredState.collection,\n selectionManager,\n preview: dragAndDropHooks.renderDragPreview ? preview : undefined\n });\n dragAndDropHooks.useDraggableCollection!({}, dragState, ref);\n\n let DragPreview = dragAndDropHooks.DragPreview!;\n dragPreview = dragAndDropHooks.renderDragPreview ? (\n <DragPreview ref={preview}>{dragAndDropHooks.renderDragPreview}</DragPreview>\n ) : null;\n }\n\n if (isListDroppable && dragAndDropHooks) {\n dropState = dragAndDropHooks.useDroppableCollectionState!({\n collection: filteredState.collection,\n selectionManager\n });\n\n let dropTargetDelegate =\n dragAndDropHooks.dropTargetDelegate ||\n ctxDropTargetDelegate ||\n new dragAndDropHooks.ListDropTargetDelegate(collection, ref, {\n layout,\n direction,\n orientation\n });\n droppableCollection = dragAndDropHooks.useDroppableCollection!(\n {\n keyboardDelegate,\n dropTargetDelegate\n },\n dropState,\n ref\n );\n\n isRootDropTarget = dropState.isDropTarget({type: 'root'});\n }\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let isEmpty = filteredState.collection.size === 0;\n let renderValues = {\n isDropTarget: isRootDropTarget,\n orientation,\n isEmpty,\n isFocused,\n isFocusVisible,\n layout,\n state: filteredState\n };\n let renderProps = useRenderProps({\n ...props,\n children: undefined,\n defaultClassName: 'react-aria-GridList',\n values: renderValues\n });\n\n let emptyState: ReactNode = null;\n let emptyStatePropOverrides: HTMLAttributes<HTMLElement> | null = null;\n\n if (isEmpty && props.renderEmptyState) {\n let content = props.renderEmptyState(renderValues);\n emptyState = (\n <div role=\"row\" aria-rowindex={1} style={{display: 'contents'}}>\n <div role=\"gridcell\" style={{display: 'contents'}}>\n {content}\n </div>\n </div>\n );\n }\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <FocusScope>\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n gridProps,\n focusProps,\n droppableCollection?.collectionProps,\n emptyStatePropOverrides\n )}\n ref={ref as RefObject<HTMLDivElement>}\n slot={props.slot || undefined}\n onScroll={props.onScroll}\n data-drop-target={isRootDropTarget || undefined}\n data-empty={isEmpty || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-layout={layout}\n data-orientation={orientation}>\n <Provider\n values={[\n [ListStateContext, filteredState],\n [DragAndDropContext, {dragAndDropHooks, dragState, dropState}],\n [DropIndicatorContext, {render: GridListDropIndicatorWrapper}]\n ]}>\n {isListDroppable && <RootDropIndicator />}\n <SharedElementTransition>\n <CollectionRoot\n collection={filteredState.collection}\n scrollRef={ref}\n persistedKeys={useDndPersistedKeys(selectionManager, dragAndDropHooks, dropState)}\n renderDropIndicator={useRenderDropIndicator(dragAndDropHooks, dropState)}\n />\n </SharedElementTransition>\n </Provider>\n {emptyState}\n {dragPreview}\n </dom.div>\n </FocusScope>\n );\n}\n\nexport interface GridListItemRenderProps extends ItemRenderProps {\n /** The unique id of the item. */\n id?: Key;\n /**\n * Whether the item's children have keyboard focus.\n *\n * @selector [data-focus-visible-within]\n */\n isFocusVisibleWithin: boolean;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListItemProps<T = object>\n extends\n RenderProps<GridListItemRenderProps>,\n LinkDOMProps,\n HoverEvents,\n PressEvents,\n Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridListItem'\n */\n className?: ClassNameOrFunction<GridListItemRenderProps>;\n /** The unique id of the item. */\n id?: Key;\n /**\n * The object value that this item represents. When using dynamic collections, this is set\n * automatically.\n */\n value?: T;\n /** A string representation of the item's contents, used for features like typeahead. */\n textValue?: string;\n /** Whether the item is disabled. */\n isDisabled?: boolean;\n /**\n * Handler that is called when a user performs an action on the item. The exact user event depends\n * on the collection's `selectionBehavior` prop and the interaction modality.\n */\n onAction?: () => void;\n}\n\n/**\n * A GridListItem represents an individual item in a GridList.\n */\nexport const GridListItem = /*#__PURE__*/ createLeafComponent(ItemNode, function GridListItem<\n T\n>(props: GridListItemProps<T>, forwardedRef: ForwardedRef<HTMLDivElement>, item: Node<T>) {\n let state = useContext(ListStateContext)!;\n let {dragAndDropHooks, dragState, dropState} = useContext(DragAndDropContext);\n let ref = useObjectRef<HTMLDivElement>(forwardedRef);\n let {isVirtualized} = useContext(CollectionRendererContext);\n let isDraggable =\n dragState && !(dragState.isDisabled || dragState.selectionManager.isDisabled(item.key));\n let {rowProps, gridCellProps, descriptionProps, ...states} = useGridListItem(\n {\n node: item,\n shouldSelectOnPressUp: !!dragState,\n isVirtualized\n },\n state,\n ref\n );\n\n let {hoverProps, isHovered} = useHover({\n // because of https://bugs.webkit.org/show_bug.cgi?id=214609, supporting hover styles when a item is ONLY isDraggable\n // results in hover styles sticking around after a reorder/drop operation...\n isDisabled: !states.allowsSelection && !states.hasAction && !isDraggable,\n onHoverStart: item.props.onHoverStart,\n onHoverChange: item.props.onHoverChange,\n onHoverEnd: item.props.onHoverEnd\n });\n\n let {isFocusVisible, focusProps} = useFocusRing();\n let {isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps} = useFocusRing({\n within: true\n });\n let {checkboxProps} = useGridListSelectionCheckbox({key: item.key}, state);\n\n let buttonProps =\n state.selectionManager.disabledBehavior === 'all' && states.isDisabled\n ? {isDisabled: true}\n : {};\n\n let draggableItem: DraggableItemResult | null = null;\n if (dragState && dragAndDropHooks) {\n draggableItem = dragAndDropHooks.useDraggableItem!(\n {key: item.key, hasDragButton: true},\n dragState\n );\n }\n\n let dropIndicator: DropIndicatorAria | null = null;\n let dropIndicatorRef = useRef<HTMLDivElement>(null);\n let {visuallyHiddenProps} = useVisuallyHidden();\n if (dropState && dragAndDropHooks) {\n dropIndicator = dragAndDropHooks.useDropIndicator!(\n {\n target: {type: 'item', key: item.key, dropPosition: 'on'}\n },\n dropState,\n dropIndicatorRef\n );\n }\n\n let isDragging = dragState && dragState.isDragging(item.key);\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListItem',\n values: {\n ...states,\n isHovered,\n isFocusVisible,\n isFocusVisibleWithin,\n selectionMode: state.selectionManager.selectionMode,\n selectionBehavior: state.selectionManager.selectionBehavior,\n allowsDragging: !!dragState,\n isDragging,\n isDropTarget: dropIndicator?.isDropTarget,\n id: item.key,\n state\n }\n });\n\n let dragButtonRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (dragState && !dragButtonRef.current) {\n console.warn(\n 'Draggable items in a GridList must contain a <Button slot=\"drag\"> element so that keyboard and screen reader users can drag them.'\n );\n }\n // eslint-disable-next-line\n }, []);\n\n useEffect(() => {\n if (!item.textValue && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'A `textValue` prop is required for <GridListItem> elements with non-plain text children in order to support accessibility features such as type to select.'\n );\n }\n }, [item.textValue]);\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <>\n {dropIndicator && !dropIndicator.isHidden && (\n <div role=\"row\" style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div\n role=\"button\"\n {...visuallyHiddenProps}\n {...dropIndicator?.dropIndicatorProps}\n ref={dropIndicatorRef}\n />\n </div>\n </div>\n )}\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n rowProps,\n focusProps,\n focusWithinProps,\n hoverProps,\n draggableItem?.dragProps\n )}\n ref={ref}\n data-selected={states.isSelected || undefined}\n data-disabled={states.isDisabled || undefined}\n data-hovered={isHovered || undefined}\n data-focused={states.isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-focus-visible-within={isFocusVisibleWithin || undefined}\n data-pressed={states.isPressed || undefined}\n data-allows-dragging={!!dragState || undefined}\n data-dragging={isDragging || undefined}\n data-drop-target={dropIndicator?.isDropTarget || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === 'none'\n ? undefined\n : state.selectionManager.selectionMode\n }>\n <div {...gridCellProps} style={{display: 'contents'}}>\n <Provider\n values={[\n [\n CheckboxContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n CheckboxFieldContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n ButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: buttonProps,\n drag: {\n ...draggableItem?.dragButtonProps,\n ref: dragButtonRef,\n style: {\n pointerEvents: 'none'\n }\n }\n }\n }\n ],\n [\n TextContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n description: descriptionProps\n }\n }\n ],\n [CollectionRendererContext, DefaultCollectionRenderer],\n [ListStateContext, null],\n [SelectableCollectionContext, null],\n [FieldInputContext, null],\n [SelectionIndicatorContext, {isSelected: states.isSelected}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n </dom.div>\n </>\n );\n});\n\nfunction GridListDropIndicatorWrapper(props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n ref = useObjectRef(ref);\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let buttonRef = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps, isHidden, isDropTarget} = dragAndDropHooks!.useDropIndicator!(\n props,\n dropState!,\n buttonRef\n );\n\n if (isHidden) {\n return null;\n }\n\n return (\n <GridListDropIndicatorForwardRef\n {...props}\n dropIndicatorProps={dropIndicatorProps}\n isDropTarget={isDropTarget}\n buttonRef={buttonRef}\n ref={ref}\n />\n );\n}\n\ninterface GridListDropIndicatorProps extends DropIndicatorProps {\n dropIndicatorProps: React.HTMLAttributes<HTMLElement>;\n isDropTarget: boolean;\n buttonRef: RefObject<HTMLDivElement | null>;\n}\n\nfunction GridListDropIndicator(props: GridListDropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n let {dropIndicatorProps, isDropTarget, buttonRef, ...otherProps} = props;\n\n let {visuallyHiddenProps} = useVisuallyHidden();\n let renderProps = useRenderProps({\n ...otherProps,\n defaultClassName: 'react-aria-DropIndicator',\n values: {\n isDropTarget\n }\n });\n\n return (\n <dom.div\n {...renderProps}\n role=\"row\"\n ref={ref as RefObject<HTMLDivElement | null>}\n data-drop-target={isDropTarget || undefined}>\n <div role=\"gridcell\">\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={buttonRef} />\n {renderProps.children}\n </div>\n </dom.div>\n );\n}\n\nconst GridListDropIndicatorForwardRef = forwardRef(GridListDropIndicator);\n\nfunction RootDropIndicator() {\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let ref = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!(\n {\n target: {type: 'root'}\n },\n dropState!,\n ref\n );\n let isDropTarget = dropState!.isDropTarget({type: 'root'});\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']} style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} />\n </div>\n </div>\n );\n}\n\nexport interface GridListLoadMoreItemProps\n extends\n Omit<LoadMoreSentinelProps, 'collection'>,\n StyleProps,\n DOMRenderProps<'div', undefined>,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListLoadMoreItem'\n */\n className?: string;\n /**\n * The load more spinner to render when loading additional items.\n */\n children?: ReactNode;\n /**\n * Whether or not the loading spinner should be rendered or not.\n */\n isLoading?: boolean;\n}\n\nexport const GridListLoadMoreItem = createLeafComponent(\n LoaderNode,\n function GridListLoadingIndicator(\n props: GridListLoadMoreItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<object>\n ) {\n let state = useContext(ListStateContext)!;\n let {isVirtualized} = useContext(CollectionRendererContext);\n let {isLoading, onLoadMore, scrollOffset, ...otherProps} = props;\n\n let sentinelRef = useRef(null);\n let memoedLoadMoreProps = useMemo(\n () => ({\n onLoadMore,\n collection: state?.collection,\n sentinelRef,\n scrollOffset\n }),\n [onLoadMore, scrollOffset, state?.collection]\n );\n useLoadMoreSentinel(memoedLoadMoreProps, sentinelRef);\n\n let renderProps = useRenderProps({\n ...otherProps,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListLoadingIndicator',\n values: undefined\n });\n // For now don't include aria-posinset and aria-setsize on loader since they aren't keyboard focusable\n // Arguably shouldn't include them ever since it might be confusing to the user to include the loaders as part of the\n // item count\n\n return (\n <>\n {/* Alway render the sentinel. For now onus is on the user for styling when using flex + gap (this would introduce a gap even though it doesn't take room) */}\n {/* @ts-ignore - compatibility with React < 19 */}\n <div style={{position: 'relative', width: 0, height: 0}} inert={inertValue(true)}>\n <div\n data-testid=\"loadMoreSentinel\"\n ref={sentinelRef}\n style={{position: 'absolute', height: 1, width: 1}}\n />\n </div>\n {isLoading && renderProps.children && (\n <dom.div {...renderProps} {...filterDOMProps(props, {global: true})} role=\"row\" ref={ref}>\n <div aria-colindex={isVirtualized ? 1 : undefined} role=\"gridcell\">\n {renderProps.children}\n </div>\n </dom.div>\n )}\n </>\n );\n }\n);\n\nexport interface GridListSectionProps<T> extends SectionProps<T>, DOMRenderProps<'div', undefined> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListSection'\n */\n className?: string;\n}\n\n/**\n * A GridListSection represents a section within a GridList.\n */\nexport const GridListSection = /*#__PURE__*/ createBranchComponent(\n SectionNode,\n <T extends any>(\n props: GridListSectionProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<T>\n ) => {\n let state = useContext(ListStateContext)!;\n let {CollectionBranch} = useContext(CollectionRendererContext);\n let headingRef = useRef(null);\n ref = useObjectRef<HTMLDivElement>(ref);\n let {rowHeaderProps, rowProps, rowGroupProps} = useGridListSection(\n {\n 'aria-label': props['aria-label'] ?? undefined\n },\n state,\n ref\n );\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: undefined,\n defaultClassName: 'react-aria-GridListSection',\n values: undefined\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div {...mergeProps(DOMProps, renderProps, rowGroupProps)} ref={ref}>\n <Provider\n values={[\n [GridListHeaderContext, {...rowProps, ref: headingRef}],\n [GridListHeaderInnerContext, {...rowHeaderProps}]\n ]}>\n <CollectionBranch collection={state.collection} parent={item} />\n </Provider>\n </dom.div>\n );\n }\n);\n\nexport interface GridListHeaderProps\n extends DOMRenderProps<'div', undefined>, DOMProps, GlobalDOMAttributes<HTMLElement> {}\n\nexport const GridListHeaderContext = createContext<\n ContextValue<GridListHeaderProps, HTMLDivElement>\n>({});\nexport const GridListHeaderInnerContext = createContext<HTMLAttributes<HTMLElement> | null>(null);\n\nexport const GridListHeader = /*#__PURE__*/ createLeafComponent(\n HeaderNode,\n function Header(props: GridListHeaderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, GridListHeaderContext);\n let rowHeaderProps = useContext(GridListHeaderInnerContext);\n\n return (\n <dom.div render={props.render} className=\"react-aria-GridListHeader\" ref={ref} {...props}>\n <div {...rowHeaderProps} style={{display: 'contents'}}>\n {props.children}\n </div>\n </dom.div>\n );\n }\n);\n"],"names":[],"version":3,"file":"GridList.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;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src/GridList.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 {\n AriaGridListProps,\n useGridList,\n useGridListItem,\n useGridListSection,\n useGridListSelectionCheckbox\n} from 'react-aria/useGridList';\n\nimport {ButtonContext} from './Button';\nimport {CheckboxContext, CheckboxFieldContext} from './Checkbox';\nimport {\n ClassNameOrFunction,\n ContextValue,\n DEFAULT_SLOT,\n dom,\n DOMProps,\n DOMRenderProps,\n Provider,\n RenderProps,\n SlotProps,\n StyleProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {\n CollectionBuilder,\n createBranchComponent,\n createLeafComponent\n} from 'react-aria/CollectionBuilder';\nimport {\n CollectionProps,\n CollectionRendererContext,\n DefaultCollectionRenderer,\n ItemRenderProps,\n SectionProps\n} from './Collection';\nimport {\n DragAndDropContext,\n DropIndicatorContext,\n DropIndicatorProps,\n useDndPersistedKeys,\n useRenderDropIndicator\n} from './DragAndDrop';\nimport {DragAndDropHooks} from './useDragAndDrop';\nimport {DraggableCollectionState} from 'react-stately/useDraggableCollectionState';\nimport {DraggableItemResult} from 'react-aria/useDraggableCollection';\nimport {DragPreviewRenderer} from '@react-types/shared';\nimport {DropIndicatorAria, DroppableCollectionResult} from 'react-aria/useDroppableCollection';\nimport {DroppableCollectionState} from 'react-stately/useDroppableCollectionState';\nimport {\n FieldInputContext,\n SelectableCollectionContext,\n SelectableCollectionContextValue\n} from './Autocomplete';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FocusScope} from 'react-aria/FocusScope';\nimport {\n forwardRefType,\n GlobalDOMAttributes,\n HoverEvents,\n Key,\n LinkDOMProps,\n Orientation,\n PressEvents,\n RefObject\n} from '@react-types/shared';\nimport {\n HeaderNode,\n ItemNode,\n LoaderNode,\n SectionNode\n} from 'react-aria/private/collections/BaseCollection';\nimport {Collection as ICollection, Node, SelectionBehavior} from '@react-types/shared';\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {ListKeyboardDelegate} from 'react-aria/ListKeyboardDelegate';\nimport {ListState, UNSTABLE_useFilteredListState, useListState} from 'react-stately/useListState';\nimport {ListStateContext} from './ListBox';\nimport {\n LoadMoreSentinelProps,\n useLoadMoreSentinel\n} from 'react-aria/private/utils/useLoadMoreSentinel';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n JSX,\n ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef\n} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TextContext} from './Text';\nimport {useCollator} from 'react-aria/useCollator';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {useVisuallyHidden} from 'react-aria/VisuallyHidden';\n\nexport interface GridListRenderProps {\n /**\n * Whether the list has no items and should display its empty state.\n *\n * @selector [data-empty]\n */\n isEmpty: boolean;\n /**\n * Whether the grid list is currently focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the grid list is currently keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the grid list is currently the active drop target.\n *\n * @selector [data-drop-target]\n */\n isDropTarget: boolean;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @selector [data-layout=\"stack | grid\"]\n */\n layout: 'stack' | 'grid';\n /**\n * The primary orientation of the items.\n *\n * @selector [data-orientation=\"vertical | horizontal\"]\n */\n orientation: Orientation;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListProps<T>\n extends\n Omit<AriaGridListProps<T>, 'children'>,\n CollectionProps<T>,\n StyleRenderProps<GridListRenderProps>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridList'\n */\n className?: ClassNameOrFunction<GridListRenderProps>;\n /**\n * Whether typeahead navigation is disabled.\n *\n * @default false\n */\n disallowTypeAhead?: boolean;\n /**\n * How multiple selection should behave in the collection.\n *\n * @default 'toggle'\n */\n selectionBehavior?: SelectionBehavior;\n /**\n * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for\n * the GridList.\n */\n dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>;\n /** Provides content to display when there are no items in the list. */\n renderEmptyState?: (props: GridListRenderProps) => ReactNode;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @default 'stack'\n */\n layout?: 'stack' | 'grid';\n /**\n * The primary orientation of the items. Usually this is the direction that the collection\n * scrolls.\n *\n * @default 'vertical'\n */\n orientation?: Orientation;\n /**\n * Which item in the collection to focus when tabbing into the collection. Overrides default\n * roving tab index like behavior.\n *\n * @private\n */\n UNSTABLE_focusOnEntry?: 'first' | 'last';\n}\n\nexport const GridListContext =\n createContext<ContextValue<GridListProps<any>, HTMLDivElement>>(null);\n\n/**\n * A grid list displays a list of interactive items, with support for keyboard navigation,\n * single or multiple selection, and row actions.\n */\nexport const GridList = /*#__PURE__*/ (forwardRef as forwardRefType)(function GridList<T>(\n props: GridListProps<T>,\n ref: ForwardedRef<HTMLDivElement>\n) {\n // Render the portal first so that we have the collection by the time we render the DOM in SSR.\n [props, ref] = useContextProps(props, ref, GridListContext);\n\n return (\n <CollectionBuilder content={<Collection {...props} />}>\n {collection => <GridListInner props={props} collection={collection} gridListRef={ref} />}\n </CollectionBuilder>\n );\n});\n\ninterface GridListInnerProps<T> {\n props: GridListProps<T> & SelectableCollectionContextValue<T>;\n collection: ICollection<Node<any>>;\n gridListRef: RefObject<HTMLElement | null>;\n}\n\nfunction GridListInner<T>({props, collection, gridListRef: ref}: GridListInnerProps<T>) {\n // oxlint-disable-next-line react/react-compiler\n [props, ref] = useContextProps(props, ref, SelectableCollectionContext);\n let {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n shouldUseVirtualFocus,\n filter,\n disallowTypeAhead,\n UNSTABLE_focusOnEntry,\n ...DOMCollectionProps\n } = props;\n let {\n dragAndDropHooks,\n keyboardNavigationBehavior = 'arrow',\n layout = 'stack',\n orientation = 'vertical'\n } = props;\n let {\n CollectionRoot,\n isVirtualized,\n layoutDelegate,\n dropTargetDelegate: ctxDropTargetDelegate\n } = useContext(CollectionRendererContext);\n let gridlistState = useListState({\n ...DOMCollectionProps,\n collection,\n children: undefined,\n layoutDelegate\n });\n\n // oxlint-disable-next-line react/react-compiler\n let filteredState = UNSTABLE_useFilteredListState(gridlistState as ListState<T>, filter);\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let {disabledBehavior, disabledKeys} = filteredState.selectionManager;\n let {direction} = useLocale();\n let keyboardDelegate = useMemo(\n () =>\n new ListKeyboardDelegate({\n collection: filteredState.collection,\n collator,\n ref,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n layout,\n orientation,\n direction\n }),\n [\n filteredState.collection,\n ref,\n layout,\n orientation,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n collator,\n direction\n ]\n );\n\n let {gridProps} = useGridList(\n {\n ...DOMCollectionProps,\n keyboardDelegate,\n // Only tab navigation is supported in grid layout.\n keyboardNavigationBehavior: layout === 'grid' ? 'tab' : keyboardNavigationBehavior,\n isVirtualized,\n shouldSelectOnPressUp: props.shouldSelectOnPressUp,\n disallowTypeAhead,\n UNSTABLE_focusOnEntry\n },\n filteredState,\n ref\n );\n\n let selectionManager = filteredState.selectionManager;\n let isListDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let isListDroppable = !!dragAndDropHooks?.useDroppableCollectionState;\n let dragHooksProvided = useRef(isListDraggable);\n let dropHooksProvided = useRef(isListDroppable);\n useEffect(() => {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n if (dragHooksProvided.current !== isListDraggable) {\n console.warn(\n 'Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n if (dropHooksProvided.current !== isListDroppable) {\n console.warn(\n 'Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n }, [isListDraggable, isListDroppable]);\n\n let dragState: DraggableCollectionState | undefined = undefined;\n let dropState: DroppableCollectionState | undefined = undefined;\n let droppableCollection: DroppableCollectionResult | undefined = undefined;\n let isRootDropTarget = false;\n let dragPreview: JSX.Element | null = null;\n let preview = useRef<DragPreviewRenderer>(null);\n\n if (isListDraggable && dragAndDropHooks) {\n // oxlint-disable-next-line react/react-compiler\n dragState = dragAndDropHooks.useDraggableCollectionState!({\n collection: filteredState.collection,\n selectionManager,\n preview: dragAndDropHooks.renderDragPreview ? preview : undefined\n });\n // oxlint-disable-next-line react/react-compiler\n dragAndDropHooks.useDraggableCollection!({}, dragState, ref);\n\n let DragPreview = dragAndDropHooks.DragPreview!;\n dragPreview = dragAndDropHooks.renderDragPreview ? (\n <DragPreview ref={preview}>{dragAndDropHooks.renderDragPreview}</DragPreview>\n ) : null;\n }\n\n if (isListDroppable && dragAndDropHooks) {\n // oxlint-disable-next-line react/react-compiler\n dropState = dragAndDropHooks.useDroppableCollectionState!({\n collection: filteredState.collection,\n selectionManager\n });\n\n let dropTargetDelegate =\n dragAndDropHooks.dropTargetDelegate ||\n ctxDropTargetDelegate ||\n new dragAndDropHooks.ListDropTargetDelegate(collection, ref, {\n layout,\n direction,\n orientation\n });\n // oxlint-disable-next-line react/react-compiler\n droppableCollection = dragAndDropHooks.useDroppableCollection!(\n {\n keyboardDelegate,\n dropTargetDelegate\n },\n dropState,\n ref\n );\n\n isRootDropTarget = dropState.isDropTarget({type: 'root'});\n }\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let isEmpty = filteredState.collection.size === 0;\n let renderValues = {\n isDropTarget: isRootDropTarget,\n orientation,\n isEmpty,\n isFocused,\n isFocusVisible,\n layout,\n state: filteredState\n };\n let renderProps = useRenderProps({\n ...props,\n children: undefined,\n defaultClassName: 'react-aria-GridList',\n values: renderValues\n });\n\n let emptyState: ReactNode = null;\n let emptyStatePropOverrides: HTMLAttributes<HTMLElement> | null = null;\n\n if (isEmpty && props.renderEmptyState) {\n let content = props.renderEmptyState(renderValues);\n emptyState = (\n <div role=\"row\" aria-rowindex={1} style={{display: 'contents'}}>\n <div role=\"gridcell\" style={{display: 'contents'}}>\n {content}\n </div>\n </div>\n );\n }\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <FocusScope>\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n gridProps,\n focusProps,\n droppableCollection?.collectionProps,\n emptyStatePropOverrides\n )}\n ref={ref as RefObject<HTMLDivElement>}\n slot={props.slot || undefined}\n onScroll={props.onScroll}\n data-drop-target={isRootDropTarget || undefined}\n data-empty={isEmpty || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-layout={layout}\n data-orientation={orientation}>\n <Provider\n values={[\n [ListStateContext, filteredState],\n [DragAndDropContext, {dragAndDropHooks, dragState, dropState}],\n [DropIndicatorContext, {render: GridListDropIndicatorWrapper}]\n ]}>\n {isListDroppable && <RootDropIndicator />}\n <SharedElementTransition>\n <CollectionRoot\n collection={filteredState.collection}\n scrollRef={ref}\n persistedKeys={useDndPersistedKeys(selectionManager, dragAndDropHooks, dropState)}\n renderDropIndicator={useRenderDropIndicator(dragAndDropHooks, dropState)}\n />\n </SharedElementTransition>\n </Provider>\n {emptyState}\n {dragPreview}\n </dom.div>\n </FocusScope>\n );\n}\n\nexport interface GridListItemRenderProps extends ItemRenderProps {\n /** The unique id of the item. */\n id?: Key;\n /**\n * Whether the item's children have keyboard focus.\n *\n * @selector [data-focus-visible-within]\n */\n isFocusVisibleWithin: boolean;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListItemProps<T = object>\n extends\n RenderProps<GridListItemRenderProps>,\n LinkDOMProps,\n HoverEvents,\n PressEvents,\n Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridListItem'\n */\n className?: ClassNameOrFunction<GridListItemRenderProps>;\n /** The unique id of the item. */\n id?: Key;\n /**\n * The object value that this item represents. When using dynamic collections, this is set\n * automatically.\n */\n value?: T;\n /** A string representation of the item's contents, used for features like typeahead. */\n textValue?: string;\n /** Whether the item is disabled. */\n isDisabled?: boolean;\n /**\n * Handler that is called when a user performs an action on the item. The exact user event depends\n * on the collection's `selectionBehavior` prop and the interaction modality.\n */\n onAction?: () => void;\n /**\n * Whether the row or its first focusable child element should be focused when navigating\n * to the row. Defaults to 'row'.\n */\n focusMode?: 'child' | 'row';\n /**\n * Whether the row should support arrow key navigation even when the containing collection uses\n * tab keyboard navigation. Allows users to navigate between rows with arrow keys while\n * focus is on an interactive child element within the row.\n */\n allowsArrowNavigation?: boolean;\n}\n\n/**\n * A GridListItem represents an individual item in a GridList.\n */\nexport const GridListItem = /*#__PURE__*/ createLeafComponent(ItemNode, function GridListItem<\n T\n>(props: GridListItemProps<T>, forwardedRef: ForwardedRef<HTMLDivElement>, item: Node<T>) {\n let state = useContext(ListStateContext)!;\n let {dragAndDropHooks, dragState, dropState} = useContext(DragAndDropContext);\n let ref = useObjectRef<HTMLDivElement>(forwardedRef);\n let {isVirtualized} = useContext(CollectionRendererContext);\n let isDraggable =\n dragState && !(dragState.isDisabled || dragState.selectionManager.isDisabled(item.key));\n let {rowProps, gridCellProps, descriptionProps, ...states} = useGridListItem(\n {\n node: item,\n shouldSelectOnPressUp: !!dragState,\n isVirtualized,\n focusMode: props.focusMode,\n allowsArrowNavigation: props.allowsArrowNavigation\n },\n state,\n ref\n );\n\n let {hoverProps, isHovered} = useHover({\n // because of https://bugs.webkit.org/show_bug.cgi?id=214609, supporting hover styles when a item is ONLY isDraggable\n // results in hover styles sticking around after a reorder/drop operation...\n isDisabled: !states.allowsSelection && !states.hasAction && !isDraggable,\n onHoverStart: item.props.onHoverStart,\n onHoverChange: item.props.onHoverChange,\n onHoverEnd: item.props.onHoverEnd\n });\n\n let {isFocusVisible, focusProps} = useFocusRing();\n let {isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps} = useFocusRing({\n within: true\n });\n let {checkboxProps} = useGridListSelectionCheckbox({key: item.key}, state);\n\n let buttonProps =\n state.selectionManager.disabledBehavior === 'all' && states.isDisabled\n ? {isDisabled: true}\n : {};\n\n let draggableItem: DraggableItemResult | null = null;\n if (dragState && dragAndDropHooks) {\n draggableItem = dragAndDropHooks.useDraggableItem!(\n {key: item.key, hasDragButton: true},\n dragState\n );\n }\n\n let dropIndicator: DropIndicatorAria | null = null;\n let dropIndicatorRef = useRef<HTMLDivElement>(null);\n let {visuallyHiddenProps} = useVisuallyHidden();\n if (dropState && dragAndDropHooks) {\n dropIndicator = dragAndDropHooks.useDropIndicator!(\n {\n target: {type: 'item', key: item.key, dropPosition: 'on'}\n },\n dropState,\n dropIndicatorRef\n );\n }\n\n let isDragging = dragState && dragState.isDragging(item.key);\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListItem',\n values: {\n ...states,\n isHovered,\n isFocusVisible,\n isFocusVisibleWithin,\n selectionMode: state.selectionManager.selectionMode,\n selectionBehavior: state.selectionManager.selectionBehavior,\n allowsDragging: !!dragState,\n isDragging,\n isDropTarget: dropIndicator?.isDropTarget,\n id: item.key,\n state\n }\n });\n\n let dragButtonRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (dragState && !dragButtonRef.current) {\n console.warn(\n 'Draggable items in a GridList must contain a <Button slot=\"drag\"> element so that keyboard and screen reader users can drag them.'\n );\n }\n // eslint-disable-next-line\n }, []);\n\n useEffect(() => {\n if (!item.textValue && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'A `textValue` prop is required for <GridListItem> elements with non-plain text children in order to support accessibility features such as type to select.'\n );\n }\n }, [item.textValue]);\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <>\n {dropIndicator && !dropIndicator.isHidden && (\n <div role=\"row\" style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div\n role=\"button\"\n {...visuallyHiddenProps}\n {...dropIndicator?.dropIndicatorProps}\n ref={dropIndicatorRef}\n />\n </div>\n </div>\n )}\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n rowProps,\n focusProps,\n focusWithinProps,\n hoverProps,\n draggableItem?.dragProps\n )}\n ref={ref}\n data-selected={states.isSelected || undefined}\n data-disabled={states.isDisabled || undefined}\n data-hovered={isHovered || undefined}\n data-focused={states.isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-focus-visible-within={isFocusVisibleWithin || undefined}\n data-pressed={states.isPressed || undefined}\n data-allows-dragging={!!dragState || undefined}\n data-dragging={isDragging || undefined}\n data-drop-target={dropIndicator?.isDropTarget || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === 'none'\n ? undefined\n : state.selectionManager.selectionMode\n }>\n <div {...gridCellProps} style={{display: 'contents'}}>\n <Provider\n values={[\n [\n CheckboxContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n CheckboxFieldContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n ButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: buttonProps,\n drag: {\n ...draggableItem?.dragButtonProps,\n ref: dragButtonRef,\n style: {\n pointerEvents: 'none'\n }\n }\n }\n }\n ],\n [\n TextContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n description: descriptionProps\n }\n }\n ],\n [CollectionRendererContext, DefaultCollectionRenderer],\n [ListStateContext, null],\n [SelectableCollectionContext, null],\n [FieldInputContext, null],\n [SelectionIndicatorContext, {isSelected: states.isSelected}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n </dom.div>\n </>\n );\n});\n\nfunction GridListDropIndicatorWrapper(props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n ref = useObjectRef(ref);\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let buttonRef = useRef<HTMLDivElement>(null);\n // oxlint-disable-next-line react/react-compiler\n let {dropIndicatorProps, isHidden, isDropTarget} = dragAndDropHooks!.useDropIndicator!(\n props,\n dropState!,\n buttonRef\n );\n\n if (isHidden) {\n return null;\n }\n\n return (\n <GridListDropIndicatorForwardRef\n {...props}\n dropIndicatorProps={dropIndicatorProps}\n isDropTarget={isDropTarget}\n buttonRef={buttonRef}\n ref={ref}\n />\n );\n}\n\ninterface GridListDropIndicatorProps extends DropIndicatorProps {\n dropIndicatorProps: React.HTMLAttributes<HTMLElement>;\n isDropTarget: boolean;\n buttonRef: RefObject<HTMLDivElement | null>;\n}\n\nfunction GridListDropIndicator(props: GridListDropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n let {dropIndicatorProps, isDropTarget, buttonRef, ...otherProps} = props;\n\n let {visuallyHiddenProps} = useVisuallyHidden();\n let renderProps = useRenderProps({\n ...otherProps,\n defaultClassName: 'react-aria-DropIndicator',\n values: {\n isDropTarget\n }\n });\n\n return (\n <dom.div\n {...renderProps}\n role=\"row\"\n ref={ref as RefObject<HTMLDivElement | null>}\n data-drop-target={isDropTarget || undefined}>\n <div role=\"gridcell\">\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={buttonRef} />\n {renderProps.children}\n </div>\n </dom.div>\n );\n}\n\nconst GridListDropIndicatorForwardRef = forwardRef(GridListDropIndicator);\n\nfunction RootDropIndicator() {\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let ref = useRef<HTMLDivElement>(null);\n // oxlint-disable-next-line react/react-compiler\n let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!(\n {\n target: {type: 'root'}\n },\n dropState!,\n ref\n );\n let isDropTarget = dropState!.isDropTarget({type: 'root'});\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']} style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} />\n </div>\n </div>\n );\n}\n\nexport interface GridListLoadMoreItemProps\n extends\n Omit<LoadMoreSentinelProps, 'collection' | 'direction'>,\n StyleProps,\n DOMRenderProps<'div', undefined>,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListLoadingIndicator'\n */\n className?: string;\n /**\n * The load more spinner to render when loading additional items.\n */\n children?: ReactNode;\n /**\n * Whether or not the loading spinner should be rendered or not.\n */\n isLoading?: boolean;\n}\n\nexport const GridListLoadMoreItem = createLeafComponent(\n LoaderNode,\n function GridListLoadingIndicator(\n props: GridListLoadMoreItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<object>\n ) {\n let state = useContext(ListStateContext)!;\n let {isVirtualized} = useContext(CollectionRendererContext);\n let {isLoading, onLoadMore, scrollOffset, ...otherProps} = props;\n\n let sentinelRef = useRef(null);\n let memoedLoadMoreProps = useMemo(\n () => ({onLoadMore, collection: state?.collection, sentinelRef, scrollOffset}),\n [onLoadMore, scrollOffset, sentinelRef, state?.collection]\n );\n useLoadMoreSentinel(memoedLoadMoreProps, sentinelRef);\n\n let renderProps = useRenderProps({\n ...otherProps,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListLoadingIndicator',\n values: undefined\n });\n // For now don't include aria-posinset and aria-setsize on loader since they aren't keyboard focusable\n // Arguably shouldn't include them ever since it might be confusing to the user to include the loaders as part of the\n // item count\n\n return (\n <>\n {/* Alway render the sentinel. For now onus is on the user for styling when using flex + gap (this would introduce a gap even though it doesn't take room) */}\n {/* @ts-ignore - compatibility with React < 19 */}\n <div style={{position: 'relative', width: 0, height: 0}} inert={inertValue(true)}>\n <div\n data-testid=\"loadMoreSentinel\"\n ref={sentinelRef}\n style={{position: 'absolute', height: 1, width: 1}}\n />\n </div>\n {isLoading && renderProps.children && (\n <dom.div {...renderProps} {...filterDOMProps(props, {global: true})} role=\"row\" ref={ref}>\n <div aria-colindex={isVirtualized ? 1 : undefined} role=\"gridcell\">\n {renderProps.children}\n </div>\n </dom.div>\n )}\n </>\n );\n }\n);\n\nexport interface GridListSectionProps<T> extends SectionProps<T>, DOMRenderProps<'div', undefined> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListSection'\n */\n className?: string;\n}\n\n/**\n * A GridListSection represents a section within a GridList.\n */\nexport const GridListSection = /*#__PURE__*/ createBranchComponent(\n SectionNode,\n <T extends any>(\n props: GridListSectionProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<T>\n ) => {\n let state = useContext(ListStateContext)!;\n let {CollectionBranch} = useContext(CollectionRendererContext);\n let headingRef = useRef(null);\n ref = useObjectRef<HTMLDivElement>(ref);\n let {rowHeaderProps, rowProps, rowGroupProps} = useGridListSection(\n {\n 'aria-label': props['aria-label'] ?? undefined\n },\n state,\n ref\n );\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: undefined,\n defaultClassName: 'react-aria-GridListSection',\n values: undefined\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div {...mergeProps(DOMProps, renderProps, rowGroupProps)} ref={ref}>\n <Provider\n values={[\n [GridListHeaderContext, {...rowProps, ref: headingRef}],\n [GridListHeaderInnerContext, {...rowHeaderProps}]\n ]}>\n <CollectionBranch collection={state.collection} parent={item} />\n </Provider>\n </dom.div>\n );\n }\n);\n\nexport interface GridListHeaderProps\n extends DOMRenderProps<'div', undefined>, DOMProps, GlobalDOMAttributes<HTMLElement> {}\n\nexport const GridListHeaderContext = createContext<\n ContextValue<GridListHeaderProps, HTMLDivElement>\n>({});\nexport const GridListHeaderInnerContext = createContext<HTMLAttributes<HTMLElement> | null>(null);\n\nexport const GridListHeader = /*#__PURE__*/ createLeafComponent(\n HeaderNode,\n function Header(props: GridListHeaderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, GridListHeaderContext);\n let rowHeaderProps = useContext(GridListHeaderInnerContext);\n\n return (\n <dom.div render={props.render} className=\"react-aria-GridListHeader\" ref={ref} {...props}>\n <div {...rowHeaderProps} style={{display: 'contents'}}>\n {props.children}\n </div>\n </dom.div>\n );\n }\n);\n"],"names":[],"version":3,"file":"GridList.js.map"}
@@ -78,6 +78,7 @@ const $1f7649abe3ae3599$export$a7bfbda1311ca015 = /*#__PURE__*/ (0, $6XsrP$forwa
78
78
  }));
79
79
  });
80
80
  function $1f7649abe3ae3599$var$GridListInner({ props: props, collection: collection, gridListRef: ref }) {
81
+ // oxlint-disable-next-line react/react-compiler
81
82
  [props, ref] = (0, $7230ffa83bc0c2cf$export$29f1550f4b0d4415)(props, ref, (0, $4b38b5b75ecc6208$export$b0d3ecf7112093a7));
82
83
  let { shouldUseVirtualFocus: // eslint-disable-next-line @typescript-eslint/no-unused-vars
83
84
  shouldUseVirtualFocus, filter: filter, disallowTypeAhead: disallowTypeAhead, UNSTABLE_focusOnEntry: UNSTABLE_focusOnEntry, ...DOMCollectionProps } = props;
@@ -89,6 +90,7 @@ function $1f7649abe3ae3599$var$GridListInner({ props: props, collection: collect
89
90
  children: undefined,
90
91
  layoutDelegate: layoutDelegate
91
92
  });
93
+ // oxlint-disable-next-line react/react-compiler
92
94
  let filteredState = (0, $6XsrP$UNSTABLE_useFilteredListState)(gridlistState, filter);
93
95
  let collator = (0, $6XsrP$useCollator)({
94
96
  usage: 'search',
@@ -147,11 +149,13 @@ function $1f7649abe3ae3599$var$GridListInner({ props: props, collection: collect
147
149
  let dragPreview = null;
148
150
  let preview = (0, $6XsrP$useRef)(null);
149
151
  if (isListDraggable && dragAndDropHooks) {
152
+ // oxlint-disable-next-line react/react-compiler
150
153
  dragState = dragAndDropHooks.useDraggableCollectionState({
151
154
  collection: filteredState.collection,
152
155
  selectionManager: selectionManager,
153
156
  preview: dragAndDropHooks.renderDragPreview ? preview : undefined
154
157
  });
158
+ // oxlint-disable-next-line react/react-compiler
155
159
  dragAndDropHooks.useDraggableCollection({}, dragState, ref);
156
160
  let DragPreview = dragAndDropHooks.DragPreview;
157
161
  dragPreview = dragAndDropHooks.renderDragPreview ? /*#__PURE__*/ (0, $6XsrP$react).createElement(DragPreview, {
@@ -159,6 +163,7 @@ function $1f7649abe3ae3599$var$GridListInner({ props: props, collection: collect
159
163
  }, dragAndDropHooks.renderDragPreview) : null;
160
164
  }
161
165
  if (isListDroppable && dragAndDropHooks) {
166
+ // oxlint-disable-next-line react/react-compiler
162
167
  dropState = dragAndDropHooks.useDroppableCollectionState({
163
168
  collection: filteredState.collection,
164
169
  selectionManager: selectionManager
@@ -168,6 +173,7 @@ function $1f7649abe3ae3599$var$GridListInner({ props: props, collection: collect
168
173
  direction: direction,
169
174
  orientation: orientation
170
175
  });
176
+ // oxlint-disable-next-line react/react-compiler
171
177
  droppableCollection = dragAndDropHooks.useDroppableCollection({
172
178
  keyboardDelegate: keyboardDelegate,
173
179
  dropTargetDelegate: dropTargetDelegate
@@ -261,7 +267,9 @@ const $1f7649abe3ae3599$export$e96fc9a8407faa6b = /*#__PURE__*/ (0, $6XsrP$creat
261
267
  let { rowProps: rowProps, gridCellProps: gridCellProps, descriptionProps: descriptionProps, ...states } = (0, $6XsrP$useGridListItem)({
262
268
  node: item,
263
269
  shouldSelectOnPressUp: !!dragState,
264
- isVirtualized: isVirtualized
270
+ isVirtualized: isVirtualized,
271
+ focusMode: props.focusMode,
272
+ allowsArrowNavigation: props.allowsArrowNavigation
265
273
  }, state, ref);
266
274
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $6XsrP$useHover)({
267
275
  // because of https://bugs.webkit.org/show_bug.cgi?id=214609, supporting hover styles when a item is ONLY isDraggable
@@ -435,6 +443,7 @@ function $1f7649abe3ae3599$var$GridListDropIndicatorWrapper(props, ref) {
435
443
  ref = (0, $6XsrP$useObjectRef)(ref);
436
444
  let { dragAndDropHooks: dragAndDropHooks, dropState: dropState } = (0, $6XsrP$useContext)((0, $f9554a667e4f0374$export$d188a835a7bc5783));
437
445
  let buttonRef = (0, $6XsrP$useRef)(null);
446
+ // oxlint-disable-next-line react/react-compiler
438
447
  let { dropIndicatorProps: dropIndicatorProps, isHidden: isHidden, isDropTarget: isDropTarget } = dragAndDropHooks.useDropIndicator(props, dropState, buttonRef);
439
448
  if (isHidden) return null;
440
449
  return /*#__PURE__*/ (0, $6XsrP$react).createElement($1f7649abe3ae3599$var$GridListDropIndicatorForwardRef, {
@@ -473,6 +482,7 @@ const $1f7649abe3ae3599$var$GridListDropIndicatorForwardRef = /*#__PURE__*/ (0,
473
482
  function $1f7649abe3ae3599$var$RootDropIndicator() {
474
483
  let { dragAndDropHooks: dragAndDropHooks, dropState: dropState } = (0, $6XsrP$useContext)((0, $f9554a667e4f0374$export$d188a835a7bc5783));
475
484
  let ref = (0, $6XsrP$useRef)(null);
485
+ // oxlint-disable-next-line react/react-compiler
476
486
  let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator({
477
487
  target: {
478
488
  type: 'root'
@@ -511,6 +521,7 @@ const $1f7649abe3ae3599$export$392b9a0bbc7c7e43 = (0, $6XsrP$createLeafComponent
511
521
  }), [
512
522
  onLoadMore,
513
523
  scrollOffset,
524
+ sentinelRef,
514
525
  state?.collection
515
526
  ]);
516
527
  (0, $6XsrP$useLoadMoreSentinel)(memoedLoadMoreProps, sentinelRef);
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6MM,MAAM,0DACX,CAAA,GAAA,oBAAY,EAAoD;AAM3D,MAAM,4CAAyB,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,SAC5E,KAAuB,EACvB,GAAiC;IAEjC,+FAA+F;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAE3C,qBACE,gCAAC,CAAA,GAAA,wBAAgB;QAAE,uBAAS,gCAAC,CAAA,GAAA,iBAAS,GAAM;OACzC,CAAA,2BAAc,gCAAC;YAAc,OAAO;YAAO,YAAY;YAAY,aAAa;;AAGvF;AAQA,SAAS,oCAAiB,SAAC,KAAK,cAAE,UAAU,EAAE,aAAa,GAAG,EAAwB;IACpF,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,yCAA0B;IACrE,IAAI,yBACF,6DAA6D;IAC7D,qBAAqB,UACrB,MAAM,qBACN,iBAAiB,yBACjB,qBAAqB,EACrB,GAAG,oBACJ,GAAG;IACJ,IAAI,oBACF,gBAAgB,8BAChB,6BAA6B,iBAC7B,SAAS,sBACT,cAAc,YACf,GAAG;IACJ,IAAI,kBACF,cAAc,iBACd,aAAa,kBACb,cAAc,EACd,oBAAoB,qBAAqB,EAC1C,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAwB;IACvC,IAAI,gBAAgB,CAAA,GAAA,mBAAW,EAAE;QAC/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Aa,EAAE;QAC/B,GAAG,KAAK;QACR,IAAI;QACJ,UAAU;QACV,kBAAkB;QAClB,QAAQ;IACV;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAc;QAAC,QAAQ;IAAI;IACzD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QAAE,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,aAAa,cAAc;QAAE,KAAK;qBAClE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAuB;oBAAC,GAAG,QAAQ;oBAAE,KAAK;gBAAU;aAAE;YACvD;gBAAC;gBAA4B;oBAAC,GAAG,cAAc;gBAAA;aAAE;SAClD;qBACD,gCAAC;QAAiB,YAAY,MAAM,UAAU;QAAE,QAAQ;;AAIhE;AAMK,MAAM,0DAAwB,CAAA,GAAA,oBAAY,EAE/C,CAAC;AACI,MAAM,0DAA6B,CAAA,GAAA,oBAAY,EAAsC;AAErF,MAAM,4CAAiB,WAAW,GAAG,CAAA,GAAA,0BAAkB,EAC5D,CAAA,GAAA,iBAAS,GACT,SAAS,OAAO,KAA0B,EAAE,GAAiC;IAC3E,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,iBAAiB,CAAA,GAAA,iBAAS,EAAE;IAEhC,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QAAC,QAAQ,MAAM,MAAM;QAAE,WAAU;QAA4B,KAAK;QAAM,GAAG,KAAK;qBACtF,gCAAC;QAAK,GAAG,cAAc;QAAE,OAAO;YAAC,SAAS;QAAU;OACjD,MAAM,QAAQ;AAIvB","sources":["packages/react-aria-components/src/GridList.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 {\n AriaGridListProps,\n useGridList,\n useGridListItem,\n useGridListSection,\n useGridListSelectionCheckbox\n} from 'react-aria/useGridList';\n\nimport {ButtonContext} from './Button';\nimport {CheckboxContext, CheckboxFieldContext} from './Checkbox';\nimport {\n ClassNameOrFunction,\n ContextValue,\n DEFAULT_SLOT,\n dom,\n DOMProps,\n DOMRenderProps,\n Provider,\n RenderProps,\n SlotProps,\n StyleProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {\n CollectionBuilder,\n createBranchComponent,\n createLeafComponent\n} from 'react-aria/CollectionBuilder';\nimport {\n CollectionProps,\n CollectionRendererContext,\n DefaultCollectionRenderer,\n ItemRenderProps,\n SectionProps\n} from './Collection';\nimport {\n DragAndDropContext,\n DropIndicatorContext,\n DropIndicatorProps,\n useDndPersistedKeys,\n useRenderDropIndicator\n} from './DragAndDrop';\nimport {DragAndDropHooks} from './useDragAndDrop';\nimport {DraggableCollectionState} from 'react-stately/useDraggableCollectionState';\nimport {DraggableItemResult} from 'react-aria/useDraggableCollection';\nimport {DragPreviewRenderer} from '@react-types/shared';\nimport {DropIndicatorAria, DroppableCollectionResult} from 'react-aria/useDroppableCollection';\nimport {DroppableCollectionState} from 'react-stately/useDroppableCollectionState';\nimport {\n FieldInputContext,\n SelectableCollectionContext,\n SelectableCollectionContextValue\n} from './Autocomplete';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FocusScope} from 'react-aria/FocusScope';\nimport {\n forwardRefType,\n GlobalDOMAttributes,\n HoverEvents,\n Key,\n LinkDOMProps,\n Orientation,\n PressEvents,\n RefObject\n} from '@react-types/shared';\nimport {\n HeaderNode,\n ItemNode,\n LoaderNode,\n SectionNode\n} from 'react-aria/private/collections/BaseCollection';\nimport {Collection as ICollection, Node, SelectionBehavior} from '@react-types/shared';\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {ListKeyboardDelegate} from 'react-aria/ListKeyboardDelegate';\nimport {ListState, UNSTABLE_useFilteredListState, useListState} from 'react-stately/useListState';\nimport {ListStateContext} from './ListBox';\nimport {\n LoadMoreSentinelProps,\n useLoadMoreSentinel\n} from 'react-aria/private/utils/useLoadMoreSentinel';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n JSX,\n ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef\n} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TextContext} from './Text';\nimport {useCollator} from 'react-aria/useCollator';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {useVisuallyHidden} from 'react-aria/VisuallyHidden';\n\nexport interface GridListRenderProps {\n /**\n * Whether the list has no items and should display its empty state.\n *\n * @selector [data-empty]\n */\n isEmpty: boolean;\n /**\n * Whether the grid list is currently focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the grid list is currently keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the grid list is currently the active drop target.\n *\n * @selector [data-drop-target]\n */\n isDropTarget: boolean;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @selector [data-layout=\"stack | grid\"]\n */\n layout: 'stack' | 'grid';\n /**\n * The primary orientation of the items.\n *\n * @selector [data-orientation=\"vertical | horizontal\"]\n */\n orientation: Orientation;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListProps<T>\n extends\n Omit<AriaGridListProps<T>, 'children'>,\n CollectionProps<T>,\n StyleRenderProps<GridListRenderProps>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridList'\n */\n className?: ClassNameOrFunction<GridListRenderProps>;\n /**\n * Whether typeahead navigation is disabled.\n *\n * @default false\n */\n disallowTypeAhead?: boolean;\n /**\n * How multiple selection should behave in the collection.\n *\n * @default 'toggle'\n */\n selectionBehavior?: SelectionBehavior;\n /**\n * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for\n * the GridList.\n */\n dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>;\n /** Provides content to display when there are no items in the list. */\n renderEmptyState?: (props: GridListRenderProps) => ReactNode;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @default 'stack'\n */\n layout?: 'stack' | 'grid';\n /**\n * The primary orientation of the items. Usually this is the direction that the collection\n * scrolls.\n *\n * @default 'vertical'\n */\n orientation?: Orientation;\n /**\n * Which item in the collection to focus when tabbing into the collection. Overrides default\n * roving tab index like behavior.\n *\n * @private\n */\n UNSTABLE_focusOnEntry?: 'first' | 'last';\n}\n\nexport const GridListContext =\n createContext<ContextValue<GridListProps<any>, HTMLDivElement>>(null);\n\n/**\n * A grid list displays a list of interactive items, with support for keyboard navigation,\n * single or multiple selection, and row actions.\n */\nexport const GridList = /*#__PURE__*/ (forwardRef as forwardRefType)(function GridList<T>(\n props: GridListProps<T>,\n ref: ForwardedRef<HTMLDivElement>\n) {\n // Render the portal first so that we have the collection by the time we render the DOM in SSR.\n [props, ref] = useContextProps(props, ref, GridListContext);\n\n return (\n <CollectionBuilder content={<Collection {...props} />}>\n {collection => <GridListInner props={props} collection={collection} gridListRef={ref} />}\n </CollectionBuilder>\n );\n});\n\ninterface GridListInnerProps<T> {\n props: GridListProps<T> & SelectableCollectionContextValue<T>;\n collection: ICollection<Node<any>>;\n gridListRef: RefObject<HTMLElement | null>;\n}\n\nfunction GridListInner<T>({props, collection, gridListRef: ref}: GridListInnerProps<T>) {\n [props, ref] = useContextProps(props, ref, SelectableCollectionContext);\n let {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n shouldUseVirtualFocus,\n filter,\n disallowTypeAhead,\n UNSTABLE_focusOnEntry,\n ...DOMCollectionProps\n } = props;\n let {\n dragAndDropHooks,\n keyboardNavigationBehavior = 'arrow',\n layout = 'stack',\n orientation = 'vertical'\n } = props;\n let {\n CollectionRoot,\n isVirtualized,\n layoutDelegate,\n dropTargetDelegate: ctxDropTargetDelegate\n } = useContext(CollectionRendererContext);\n let gridlistState = useListState({\n ...DOMCollectionProps,\n collection,\n children: undefined,\n layoutDelegate\n });\n\n let filteredState = UNSTABLE_useFilteredListState(gridlistState as ListState<T>, filter);\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let {disabledBehavior, disabledKeys} = filteredState.selectionManager;\n let {direction} = useLocale();\n let keyboardDelegate = useMemo(\n () =>\n new ListKeyboardDelegate({\n collection: filteredState.collection,\n collator,\n ref,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n layout,\n orientation,\n direction\n }),\n [\n filteredState.collection,\n ref,\n layout,\n orientation,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n collator,\n direction\n ]\n );\n\n let {gridProps} = useGridList(\n {\n ...DOMCollectionProps,\n keyboardDelegate,\n // Only tab navigation is supported in grid layout.\n keyboardNavigationBehavior: layout === 'grid' ? 'tab' : keyboardNavigationBehavior,\n isVirtualized,\n shouldSelectOnPressUp: props.shouldSelectOnPressUp,\n disallowTypeAhead,\n UNSTABLE_focusOnEntry\n },\n filteredState,\n ref\n );\n\n let selectionManager = filteredState.selectionManager;\n let isListDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let isListDroppable = !!dragAndDropHooks?.useDroppableCollectionState;\n let dragHooksProvided = useRef(isListDraggable);\n let dropHooksProvided = useRef(isListDroppable);\n useEffect(() => {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n if (dragHooksProvided.current !== isListDraggable) {\n console.warn(\n 'Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n if (dropHooksProvided.current !== isListDroppable) {\n console.warn(\n 'Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n }, [isListDraggable, isListDroppable]);\n\n let dragState: DraggableCollectionState | undefined = undefined;\n let dropState: DroppableCollectionState | undefined = undefined;\n let droppableCollection: DroppableCollectionResult | undefined = undefined;\n let isRootDropTarget = false;\n let dragPreview: JSX.Element | null = null;\n let preview = useRef<DragPreviewRenderer>(null);\n\n if (isListDraggable && dragAndDropHooks) {\n dragState = dragAndDropHooks.useDraggableCollectionState!({\n collection: filteredState.collection,\n selectionManager,\n preview: dragAndDropHooks.renderDragPreview ? preview : undefined\n });\n dragAndDropHooks.useDraggableCollection!({}, dragState, ref);\n\n let DragPreview = dragAndDropHooks.DragPreview!;\n dragPreview = dragAndDropHooks.renderDragPreview ? (\n <DragPreview ref={preview}>{dragAndDropHooks.renderDragPreview}</DragPreview>\n ) : null;\n }\n\n if (isListDroppable && dragAndDropHooks) {\n dropState = dragAndDropHooks.useDroppableCollectionState!({\n collection: filteredState.collection,\n selectionManager\n });\n\n let dropTargetDelegate =\n dragAndDropHooks.dropTargetDelegate ||\n ctxDropTargetDelegate ||\n new dragAndDropHooks.ListDropTargetDelegate(collection, ref, {\n layout,\n direction,\n orientation\n });\n droppableCollection = dragAndDropHooks.useDroppableCollection!(\n {\n keyboardDelegate,\n dropTargetDelegate\n },\n dropState,\n ref\n );\n\n isRootDropTarget = dropState.isDropTarget({type: 'root'});\n }\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let isEmpty = filteredState.collection.size === 0;\n let renderValues = {\n isDropTarget: isRootDropTarget,\n orientation,\n isEmpty,\n isFocused,\n isFocusVisible,\n layout,\n state: filteredState\n };\n let renderProps = useRenderProps({\n ...props,\n children: undefined,\n defaultClassName: 'react-aria-GridList',\n values: renderValues\n });\n\n let emptyState: ReactNode = null;\n let emptyStatePropOverrides: HTMLAttributes<HTMLElement> | null = null;\n\n if (isEmpty && props.renderEmptyState) {\n let content = props.renderEmptyState(renderValues);\n emptyState = (\n <div role=\"row\" aria-rowindex={1} style={{display: 'contents'}}>\n <div role=\"gridcell\" style={{display: 'contents'}}>\n {content}\n </div>\n </div>\n );\n }\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <FocusScope>\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n gridProps,\n focusProps,\n droppableCollection?.collectionProps,\n emptyStatePropOverrides\n )}\n ref={ref as RefObject<HTMLDivElement>}\n slot={props.slot || undefined}\n onScroll={props.onScroll}\n data-drop-target={isRootDropTarget || undefined}\n data-empty={isEmpty || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-layout={layout}\n data-orientation={orientation}>\n <Provider\n values={[\n [ListStateContext, filteredState],\n [DragAndDropContext, {dragAndDropHooks, dragState, dropState}],\n [DropIndicatorContext, {render: GridListDropIndicatorWrapper}]\n ]}>\n {isListDroppable && <RootDropIndicator />}\n <SharedElementTransition>\n <CollectionRoot\n collection={filteredState.collection}\n scrollRef={ref}\n persistedKeys={useDndPersistedKeys(selectionManager, dragAndDropHooks, dropState)}\n renderDropIndicator={useRenderDropIndicator(dragAndDropHooks, dropState)}\n />\n </SharedElementTransition>\n </Provider>\n {emptyState}\n {dragPreview}\n </dom.div>\n </FocusScope>\n );\n}\n\nexport interface GridListItemRenderProps extends ItemRenderProps {\n /** The unique id of the item. */\n id?: Key;\n /**\n * Whether the item's children have keyboard focus.\n *\n * @selector [data-focus-visible-within]\n */\n isFocusVisibleWithin: boolean;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListItemProps<T = object>\n extends\n RenderProps<GridListItemRenderProps>,\n LinkDOMProps,\n HoverEvents,\n PressEvents,\n Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridListItem'\n */\n className?: ClassNameOrFunction<GridListItemRenderProps>;\n /** The unique id of the item. */\n id?: Key;\n /**\n * The object value that this item represents. When using dynamic collections, this is set\n * automatically.\n */\n value?: T;\n /** A string representation of the item's contents, used for features like typeahead. */\n textValue?: string;\n /** Whether the item is disabled. */\n isDisabled?: boolean;\n /**\n * Handler that is called when a user performs an action on the item. The exact user event depends\n * on the collection's `selectionBehavior` prop and the interaction modality.\n */\n onAction?: () => void;\n}\n\n/**\n * A GridListItem represents an individual item in a GridList.\n */\nexport const GridListItem = /*#__PURE__*/ createLeafComponent(ItemNode, function GridListItem<\n T\n>(props: GridListItemProps<T>, forwardedRef: ForwardedRef<HTMLDivElement>, item: Node<T>) {\n let state = useContext(ListStateContext)!;\n let {dragAndDropHooks, dragState, dropState} = useContext(DragAndDropContext);\n let ref = useObjectRef<HTMLDivElement>(forwardedRef);\n let {isVirtualized} = useContext(CollectionRendererContext);\n let isDraggable =\n dragState && !(dragState.isDisabled || dragState.selectionManager.isDisabled(item.key));\n let {rowProps, gridCellProps, descriptionProps, ...states} = useGridListItem(\n {\n node: item,\n shouldSelectOnPressUp: !!dragState,\n isVirtualized\n },\n state,\n ref\n );\n\n let {hoverProps, isHovered} = useHover({\n // because of https://bugs.webkit.org/show_bug.cgi?id=214609, supporting hover styles when a item is ONLY isDraggable\n // results in hover styles sticking around after a reorder/drop operation...\n isDisabled: !states.allowsSelection && !states.hasAction && !isDraggable,\n onHoverStart: item.props.onHoverStart,\n onHoverChange: item.props.onHoverChange,\n onHoverEnd: item.props.onHoverEnd\n });\n\n let {isFocusVisible, focusProps} = useFocusRing();\n let {isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps} = useFocusRing({\n within: true\n });\n let {checkboxProps} = useGridListSelectionCheckbox({key: item.key}, state);\n\n let buttonProps =\n state.selectionManager.disabledBehavior === 'all' && states.isDisabled\n ? {isDisabled: true}\n : {};\n\n let draggableItem: DraggableItemResult | null = null;\n if (dragState && dragAndDropHooks) {\n draggableItem = dragAndDropHooks.useDraggableItem!(\n {key: item.key, hasDragButton: true},\n dragState\n );\n }\n\n let dropIndicator: DropIndicatorAria | null = null;\n let dropIndicatorRef = useRef<HTMLDivElement>(null);\n let {visuallyHiddenProps} = useVisuallyHidden();\n if (dropState && dragAndDropHooks) {\n dropIndicator = dragAndDropHooks.useDropIndicator!(\n {\n target: {type: 'item', key: item.key, dropPosition: 'on'}\n },\n dropState,\n dropIndicatorRef\n );\n }\n\n let isDragging = dragState && dragState.isDragging(item.key);\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListItem',\n values: {\n ...states,\n isHovered,\n isFocusVisible,\n isFocusVisibleWithin,\n selectionMode: state.selectionManager.selectionMode,\n selectionBehavior: state.selectionManager.selectionBehavior,\n allowsDragging: !!dragState,\n isDragging,\n isDropTarget: dropIndicator?.isDropTarget,\n id: item.key,\n state\n }\n });\n\n let dragButtonRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (dragState && !dragButtonRef.current) {\n console.warn(\n 'Draggable items in a GridList must contain a <Button slot=\"drag\"> element so that keyboard and screen reader users can drag them.'\n );\n }\n // eslint-disable-next-line\n }, []);\n\n useEffect(() => {\n if (!item.textValue && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'A `textValue` prop is required for <GridListItem> elements with non-plain text children in order to support accessibility features such as type to select.'\n );\n }\n }, [item.textValue]);\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <>\n {dropIndicator && !dropIndicator.isHidden && (\n <div role=\"row\" style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div\n role=\"button\"\n {...visuallyHiddenProps}\n {...dropIndicator?.dropIndicatorProps}\n ref={dropIndicatorRef}\n />\n </div>\n </div>\n )}\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n rowProps,\n focusProps,\n focusWithinProps,\n hoverProps,\n draggableItem?.dragProps\n )}\n ref={ref}\n data-selected={states.isSelected || undefined}\n data-disabled={states.isDisabled || undefined}\n data-hovered={isHovered || undefined}\n data-focused={states.isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-focus-visible-within={isFocusVisibleWithin || undefined}\n data-pressed={states.isPressed || undefined}\n data-allows-dragging={!!dragState || undefined}\n data-dragging={isDragging || undefined}\n data-drop-target={dropIndicator?.isDropTarget || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === 'none'\n ? undefined\n : state.selectionManager.selectionMode\n }>\n <div {...gridCellProps} style={{display: 'contents'}}>\n <Provider\n values={[\n [\n CheckboxContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n CheckboxFieldContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n ButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: buttonProps,\n drag: {\n ...draggableItem?.dragButtonProps,\n ref: dragButtonRef,\n style: {\n pointerEvents: 'none'\n }\n }\n }\n }\n ],\n [\n TextContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n description: descriptionProps\n }\n }\n ],\n [CollectionRendererContext, DefaultCollectionRenderer],\n [ListStateContext, null],\n [SelectableCollectionContext, null],\n [FieldInputContext, null],\n [SelectionIndicatorContext, {isSelected: states.isSelected}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n </dom.div>\n </>\n );\n});\n\nfunction GridListDropIndicatorWrapper(props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n ref = useObjectRef(ref);\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let buttonRef = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps, isHidden, isDropTarget} = dragAndDropHooks!.useDropIndicator!(\n props,\n dropState!,\n buttonRef\n );\n\n if (isHidden) {\n return null;\n }\n\n return (\n <GridListDropIndicatorForwardRef\n {...props}\n dropIndicatorProps={dropIndicatorProps}\n isDropTarget={isDropTarget}\n buttonRef={buttonRef}\n ref={ref}\n />\n );\n}\n\ninterface GridListDropIndicatorProps extends DropIndicatorProps {\n dropIndicatorProps: React.HTMLAttributes<HTMLElement>;\n isDropTarget: boolean;\n buttonRef: RefObject<HTMLDivElement | null>;\n}\n\nfunction GridListDropIndicator(props: GridListDropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n let {dropIndicatorProps, isDropTarget, buttonRef, ...otherProps} = props;\n\n let {visuallyHiddenProps} = useVisuallyHidden();\n let renderProps = useRenderProps({\n ...otherProps,\n defaultClassName: 'react-aria-DropIndicator',\n values: {\n isDropTarget\n }\n });\n\n return (\n <dom.div\n {...renderProps}\n role=\"row\"\n ref={ref as RefObject<HTMLDivElement | null>}\n data-drop-target={isDropTarget || undefined}>\n <div role=\"gridcell\">\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={buttonRef} />\n {renderProps.children}\n </div>\n </dom.div>\n );\n}\n\nconst GridListDropIndicatorForwardRef = forwardRef(GridListDropIndicator);\n\nfunction RootDropIndicator() {\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let ref = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!(\n {\n target: {type: 'root'}\n },\n dropState!,\n ref\n );\n let isDropTarget = dropState!.isDropTarget({type: 'root'});\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']} style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} />\n </div>\n </div>\n );\n}\n\nexport interface GridListLoadMoreItemProps\n extends\n Omit<LoadMoreSentinelProps, 'collection'>,\n StyleProps,\n DOMRenderProps<'div', undefined>,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListLoadMoreItem'\n */\n className?: string;\n /**\n * The load more spinner to render when loading additional items.\n */\n children?: ReactNode;\n /**\n * Whether or not the loading spinner should be rendered or not.\n */\n isLoading?: boolean;\n}\n\nexport const GridListLoadMoreItem = createLeafComponent(\n LoaderNode,\n function GridListLoadingIndicator(\n props: GridListLoadMoreItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<object>\n ) {\n let state = useContext(ListStateContext)!;\n let {isVirtualized} = useContext(CollectionRendererContext);\n let {isLoading, onLoadMore, scrollOffset, ...otherProps} = props;\n\n let sentinelRef = useRef(null);\n let memoedLoadMoreProps = useMemo(\n () => ({\n onLoadMore,\n collection: state?.collection,\n sentinelRef,\n scrollOffset\n }),\n [onLoadMore, scrollOffset, state?.collection]\n );\n useLoadMoreSentinel(memoedLoadMoreProps, sentinelRef);\n\n let renderProps = useRenderProps({\n ...otherProps,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListLoadingIndicator',\n values: undefined\n });\n // For now don't include aria-posinset and aria-setsize on loader since they aren't keyboard focusable\n // Arguably shouldn't include them ever since it might be confusing to the user to include the loaders as part of the\n // item count\n\n return (\n <>\n {/* Alway render the sentinel. For now onus is on the user for styling when using flex + gap (this would introduce a gap even though it doesn't take room) */}\n {/* @ts-ignore - compatibility with React < 19 */}\n <div style={{position: 'relative', width: 0, height: 0}} inert={inertValue(true)}>\n <div\n data-testid=\"loadMoreSentinel\"\n ref={sentinelRef}\n style={{position: 'absolute', height: 1, width: 1}}\n />\n </div>\n {isLoading && renderProps.children && (\n <dom.div {...renderProps} {...filterDOMProps(props, {global: true})} role=\"row\" ref={ref}>\n <div aria-colindex={isVirtualized ? 1 : undefined} role=\"gridcell\">\n {renderProps.children}\n </div>\n </dom.div>\n )}\n </>\n );\n }\n);\n\nexport interface GridListSectionProps<T> extends SectionProps<T>, DOMRenderProps<'div', undefined> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListSection'\n */\n className?: string;\n}\n\n/**\n * A GridListSection represents a section within a GridList.\n */\nexport const GridListSection = /*#__PURE__*/ createBranchComponent(\n SectionNode,\n <T extends any>(\n props: GridListSectionProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<T>\n ) => {\n let state = useContext(ListStateContext)!;\n let {CollectionBranch} = useContext(CollectionRendererContext);\n let headingRef = useRef(null);\n ref = useObjectRef<HTMLDivElement>(ref);\n let {rowHeaderProps, rowProps, rowGroupProps} = useGridListSection(\n {\n 'aria-label': props['aria-label'] ?? undefined\n },\n state,\n ref\n );\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: undefined,\n defaultClassName: 'react-aria-GridListSection',\n values: undefined\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div {...mergeProps(DOMProps, renderProps, rowGroupProps)} ref={ref}>\n <Provider\n values={[\n [GridListHeaderContext, {...rowProps, ref: headingRef}],\n [GridListHeaderInnerContext, {...rowHeaderProps}]\n ]}>\n <CollectionBranch collection={state.collection} parent={item} />\n </Provider>\n </dom.div>\n );\n }\n);\n\nexport interface GridListHeaderProps\n extends DOMRenderProps<'div', undefined>, DOMProps, GlobalDOMAttributes<HTMLElement> {}\n\nexport const GridListHeaderContext = createContext<\n ContextValue<GridListHeaderProps, HTMLDivElement>\n>({});\nexport const GridListHeaderInnerContext = createContext<HTMLAttributes<HTMLElement> | null>(null);\n\nexport const GridListHeader = /*#__PURE__*/ createLeafComponent(\n HeaderNode,\n function Header(props: GridListHeaderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, GridListHeaderContext);\n let rowHeaderProps = useContext(GridListHeaderInnerContext);\n\n return (\n <dom.div render={props.render} className=\"react-aria-GridListHeader\" ref={ref} {...props}>\n <div {...rowHeaderProps} style={{display: 'contents'}}>\n {props.children}\n </div>\n </dom.div>\n );\n }\n);\n"],"names":[],"version":3,"file":"GridList.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6MM,MAAM,0DACX,CAAA,GAAA,oBAAY,EAAoD;AAM3D,MAAM,4CAAyB,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,SAC5E,KAAuB,EACvB,GAAiC;IAEjC,+FAA+F;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAE3C,qBACE,gCAAC,CAAA,GAAA,wBAAgB;QAAE,uBAAS,gCAAC,CAAA,GAAA,iBAAS,GAAM;OACzC,CAAA,2BAAc,gCAAC;YAAc,OAAO;YAAO,YAAY;YAAY,aAAa;;AAGvF;AAQA,SAAS,oCAAiB,SAAC,KAAK,cAAE,UAAU,EAAE,aAAa,GAAG,EAAwB;IACpF,gDAAgD;IAChD,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,yCAA0B;IACrE,IAAI,yBACF,6DAA6D;IAC7D,qBAAqB,UACrB,MAAM,qBACN,iBAAiB,yBACjB,qBAAqB,EACrB,GAAG,oBACJ,GAAG;IACJ,IAAI,oBACF,gBAAgB,8BAChB,6BAA6B,iBAC7B,SAAS,sBACT,cAAc,YACf,GAAG;IACJ,IAAI,kBACF,cAAc,iBACd,aAAa,kBACb,cAAc,EACd,oBAAoB,qBAAqB,EAC1C,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAwB;IACvC,IAAI,gBAAgB,CAAA,GAAA,mBAAW,EAAE;QAC/B,GAAG,kBAAkB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ria-components/src/GridList.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 {\n AriaGridListProps,\n useGridList,\n useGridListItem,\n useGridListSection,\n useGridListSelectionCheckbox\n} from 'react-aria/useGridList';\n\nimport {ButtonContext} from './Button';\nimport {CheckboxContext, CheckboxFieldContext} from './Checkbox';\nimport {\n ClassNameOrFunction,\n ContextValue,\n DEFAULT_SLOT,\n dom,\n DOMProps,\n DOMRenderProps,\n Provider,\n RenderProps,\n SlotProps,\n StyleProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {\n CollectionBuilder,\n createBranchComponent,\n createLeafComponent\n} from 'react-aria/CollectionBuilder';\nimport {\n CollectionProps,\n CollectionRendererContext,\n DefaultCollectionRenderer,\n ItemRenderProps,\n SectionProps\n} from './Collection';\nimport {\n DragAndDropContext,\n DropIndicatorContext,\n DropIndicatorProps,\n useDndPersistedKeys,\n useRenderDropIndicator\n} from './DragAndDrop';\nimport {DragAndDropHooks} from './useDragAndDrop';\nimport {DraggableCollectionState} from 'react-stately/useDraggableCollectionState';\nimport {DraggableItemResult} from 'react-aria/useDraggableCollection';\nimport {DragPreviewRenderer} from '@react-types/shared';\nimport {DropIndicatorAria, DroppableCollectionResult} from 'react-aria/useDroppableCollection';\nimport {DroppableCollectionState} from 'react-stately/useDroppableCollectionState';\nimport {\n FieldInputContext,\n SelectableCollectionContext,\n SelectableCollectionContextValue\n} from './Autocomplete';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FocusScope} from 'react-aria/FocusScope';\nimport {\n forwardRefType,\n GlobalDOMAttributes,\n HoverEvents,\n Key,\n LinkDOMProps,\n Orientation,\n PressEvents,\n RefObject\n} from '@react-types/shared';\nimport {\n HeaderNode,\n ItemNode,\n LoaderNode,\n SectionNode\n} from 'react-aria/private/collections/BaseCollection';\nimport {Collection as ICollection, Node, SelectionBehavior} from '@react-types/shared';\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {ListKeyboardDelegate} from 'react-aria/ListKeyboardDelegate';\nimport {ListState, UNSTABLE_useFilteredListState, useListState} from 'react-stately/useListState';\nimport {ListStateContext} from './ListBox';\nimport {\n LoadMoreSentinelProps,\n useLoadMoreSentinel\n} from 'react-aria/private/utils/useLoadMoreSentinel';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n JSX,\n ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef\n} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TextContext} from './Text';\nimport {useCollator} from 'react-aria/useCollator';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {useVisuallyHidden} from 'react-aria/VisuallyHidden';\n\nexport interface GridListRenderProps {\n /**\n * Whether the list has no items and should display its empty state.\n *\n * @selector [data-empty]\n */\n isEmpty: boolean;\n /**\n * Whether the grid list is currently focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the grid list is currently keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the grid list is currently the active drop target.\n *\n * @selector [data-drop-target]\n */\n isDropTarget: boolean;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @selector [data-layout=\"stack | grid\"]\n */\n layout: 'stack' | 'grid';\n /**\n * The primary orientation of the items.\n *\n * @selector [data-orientation=\"vertical | horizontal\"]\n */\n orientation: Orientation;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListProps<T>\n extends\n Omit<AriaGridListProps<T>, 'children'>,\n CollectionProps<T>,\n StyleRenderProps<GridListRenderProps>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridList'\n */\n className?: ClassNameOrFunction<GridListRenderProps>;\n /**\n * Whether typeahead navigation is disabled.\n *\n * @default false\n */\n disallowTypeAhead?: boolean;\n /**\n * How multiple selection should behave in the collection.\n *\n * @default 'toggle'\n */\n selectionBehavior?: SelectionBehavior;\n /**\n * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for\n * the GridList.\n */\n dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>;\n /** Provides content to display when there are no items in the list. */\n renderEmptyState?: (props: GridListRenderProps) => ReactNode;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @default 'stack'\n */\n layout?: 'stack' | 'grid';\n /**\n * The primary orientation of the items. Usually this is the direction that the collection\n * scrolls.\n *\n * @default 'vertical'\n */\n orientation?: Orientation;\n /**\n * Which item in the collection to focus when tabbing into the collection. Overrides default\n * roving tab index like behavior.\n *\n * @private\n */\n UNSTABLE_focusOnEntry?: 'first' | 'last';\n}\n\nexport const GridListContext =\n createContext<ContextValue<GridListProps<any>, HTMLDivElement>>(null);\n\n/**\n * A grid list displays a list of interactive items, with support for keyboard navigation,\n * single or multiple selection, and row actions.\n */\nexport const GridList = /*#__PURE__*/ (forwardRef as forwardRefType)(function GridList<T>(\n props: GridListProps<T>,\n ref: ForwardedRef<HTMLDivElement>\n) {\n // Render the portal first so that we have the collection by the time we render the DOM in SSR.\n [props, ref] = useContextProps(props, ref, GridListContext);\n\n return (\n <CollectionBuilder content={<Collection {...props} />}>\n {collection => <GridListInner props={props} collection={collection} gridListRef={ref} />}\n </CollectionBuilder>\n );\n});\n\ninterface GridListInnerProps<T> {\n props: GridListProps<T> & SelectableCollectionContextValue<T>;\n collection: ICollection<Node<any>>;\n gridListRef: RefObject<HTMLElement | null>;\n}\n\nfunction GridListInner<T>({props, collection, gridListRef: ref}: GridListInnerProps<T>) {\n // oxlint-disable-next-line react/react-compiler\n [props, ref] = useContextProps(props, ref, SelectableCollectionContext);\n let {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n shouldUseVirtualFocus,\n filter,\n disallowTypeAhead,\n UNSTABLE_focusOnEntry,\n ...DOMCollectionProps\n } = props;\n let {\n dragAndDropHooks,\n keyboardNavigationBehavior = 'arrow',\n layout = 'stack',\n orientation = 'vertical'\n } = props;\n let {\n CollectionRoot,\n isVirtualized,\n layoutDelegate,\n dropTargetDelegate: ctxDropTargetDelegate\n } = useContext(CollectionRendererContext);\n let gridlistState = useListState({\n ...DOMCollectionProps,\n collection,\n children: undefined,\n layoutDelegate\n });\n\n // oxlint-disable-next-line react/react-compiler\n let filteredState = UNSTABLE_useFilteredListState(gridlistState as ListState<T>, filter);\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let {disabledBehavior, disabledKeys} = filteredState.selectionManager;\n let {direction} = useLocale();\n let keyboardDelegate = useMemo(\n () =>\n new ListKeyboardDelegate({\n collection: filteredState.collection,\n collator,\n ref,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n layout,\n orientation,\n direction\n }),\n [\n filteredState.collection,\n ref,\n layout,\n orientation,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n collator,\n direction\n ]\n );\n\n let {gridProps} = useGridList(\n {\n ...DOMCollectionProps,\n keyboardDelegate,\n // Only tab navigation is supported in grid layout.\n keyboardNavigationBehavior: layout === 'grid' ? 'tab' : keyboardNavigationBehavior,\n isVirtualized,\n shouldSelectOnPressUp: props.shouldSelectOnPressUp,\n disallowTypeAhead,\n UNSTABLE_focusOnEntry\n },\n filteredState,\n ref\n );\n\n let selectionManager = filteredState.selectionManager;\n let isListDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let isListDroppable = !!dragAndDropHooks?.useDroppableCollectionState;\n let dragHooksProvided = useRef(isListDraggable);\n let dropHooksProvided = useRef(isListDroppable);\n useEffect(() => {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n if (dragHooksProvided.current !== isListDraggable) {\n console.warn(\n 'Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n if (dropHooksProvided.current !== isListDroppable) {\n console.warn(\n 'Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n }, [isListDraggable, isListDroppable]);\n\n let dragState: DraggableCollectionState | undefined = undefined;\n let dropState: DroppableCollectionState | undefined = undefined;\n let droppableCollection: DroppableCollectionResult | undefined = undefined;\n let isRootDropTarget = false;\n let dragPreview: JSX.Element | null = null;\n let preview = useRef<DragPreviewRenderer>(null);\n\n if (isListDraggable && dragAndDropHooks) {\n // oxlint-disable-next-line react/react-compiler\n dragState = dragAndDropHooks.useDraggableCollectionState!({\n collection: filteredState.collection,\n selectionManager,\n preview: dragAndDropHooks.renderDragPreview ? preview : undefined\n });\n // oxlint-disable-next-line react/react-compiler\n dragAndDropHooks.useDraggableCollection!({}, dragState, ref);\n\n let DragPreview = dragAndDropHooks.DragPreview!;\n dragPreview = dragAndDropHooks.renderDragPreview ? (\n <DragPreview ref={preview}>{dragAndDropHooks.renderDragPreview}</DragPreview>\n ) : null;\n }\n\n if (isListDroppable && dragAndDropHooks) {\n // oxlint-disable-next-line react/react-compiler\n dropState = dragAndDropHooks.useDroppableCollectionState!({\n collection: filteredState.collection,\n selectionManager\n });\n\n let dropTargetDelegate =\n dragAndDropHooks.dropTargetDelegate ||\n ctxDropTargetDelegate ||\n new dragAndDropHooks.ListDropTargetDelegate(collection, ref, {\n layout,\n direction,\n orientation\n });\n // oxlint-disable-next-line react/react-compiler\n droppableCollection = dragAndDropHooks.useDroppableCollection!(\n {\n keyboardDelegate,\n dropTargetDelegate\n },\n dropState,\n ref\n );\n\n isRootDropTarget = dropState.isDropTarget({type: 'root'});\n }\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let isEmpty = filteredState.collection.size === 0;\n let renderValues = {\n isDropTarget: isRootDropTarget,\n orientation,\n isEmpty,\n isFocused,\n isFocusVisible,\n layout,\n state: filteredState\n };\n let renderProps = useRenderProps({\n ...props,\n children: undefined,\n defaultClassName: 'react-aria-GridList',\n values: renderValues\n });\n\n let emptyState: ReactNode = null;\n let emptyStatePropOverrides: HTMLAttributes<HTMLElement> | null = null;\n\n if (isEmpty && props.renderEmptyState) {\n let content = props.renderEmptyState(renderValues);\n emptyState = (\n <div role=\"row\" aria-rowindex={1} style={{display: 'contents'}}>\n <div role=\"gridcell\" style={{display: 'contents'}}>\n {content}\n </div>\n </div>\n );\n }\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <FocusScope>\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n gridProps,\n focusProps,\n droppableCollection?.collectionProps,\n emptyStatePropOverrides\n )}\n ref={ref as RefObject<HTMLDivElement>}\n slot={props.slot || undefined}\n onScroll={props.onScroll}\n data-drop-target={isRootDropTarget || undefined}\n data-empty={isEmpty || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-layout={layout}\n data-orientation={orientation}>\n <Provider\n values={[\n [ListStateContext, filteredState],\n [DragAndDropContext, {dragAndDropHooks, dragState, dropState}],\n [DropIndicatorContext, {render: GridListDropIndicatorWrapper}]\n ]}>\n {isListDroppable && <RootDropIndicator />}\n <SharedElementTransition>\n <CollectionRoot\n collection={filteredState.collection}\n scrollRef={ref}\n persistedKeys={useDndPersistedKeys(selectionManager, dragAndDropHooks, dropState)}\n renderDropIndicator={useRenderDropIndicator(dragAndDropHooks, dropState)}\n />\n </SharedElementTransition>\n </Provider>\n {emptyState}\n {dragPreview}\n </dom.div>\n </FocusScope>\n );\n}\n\nexport interface GridListItemRenderProps extends ItemRenderProps {\n /** The unique id of the item. */\n id?: Key;\n /**\n * Whether the item's children have keyboard focus.\n *\n * @selector [data-focus-visible-within]\n */\n isFocusVisibleWithin: boolean;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListItemProps<T = object>\n extends\n RenderProps<GridListItemRenderProps>,\n LinkDOMProps,\n HoverEvents,\n PressEvents,\n Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridListItem'\n */\n className?: ClassNameOrFunction<GridListItemRenderProps>;\n /** The unique id of the item. */\n id?: Key;\n /**\n * The object value that this item represents. When using dynamic collections, this is set\n * automatically.\n */\n value?: T;\n /** A string representation of the item's contents, used for features like typeahead. */\n textValue?: string;\n /** Whether the item is disabled. */\n isDisabled?: boolean;\n /**\n * Handler that is called when a user performs an action on the item. The exact user event depends\n * on the collection's `selectionBehavior` prop and the interaction modality.\n */\n onAction?: () => void;\n /**\n * Whether the row or its first focusable child element should be focused when navigating\n * to the row. Defaults to 'row'.\n */\n focusMode?: 'child' | 'row';\n /**\n * Whether the row should support arrow key navigation even when the containing collection uses\n * tab keyboard navigation. Allows users to navigate between rows with arrow keys while\n * focus is on an interactive child element within the row.\n */\n allowsArrowNavigation?: boolean;\n}\n\n/**\n * A GridListItem represents an individual item in a GridList.\n */\nexport const GridListItem = /*#__PURE__*/ createLeafComponent(ItemNode, function GridListItem<\n T\n>(props: GridListItemProps<T>, forwardedRef: ForwardedRef<HTMLDivElement>, item: Node<T>) {\n let state = useContext(ListStateContext)!;\n let {dragAndDropHooks, dragState, dropState} = useContext(DragAndDropContext);\n let ref = useObjectRef<HTMLDivElement>(forwardedRef);\n let {isVirtualized} = useContext(CollectionRendererContext);\n let isDraggable =\n dragState && !(dragState.isDisabled || dragState.selectionManager.isDisabled(item.key));\n let {rowProps, gridCellProps, descriptionProps, ...states} = useGridListItem(\n {\n node: item,\n shouldSelectOnPressUp: !!dragState,\n isVirtualized,\n focusMode: props.focusMode,\n allowsArrowNavigation: props.allowsArrowNavigation\n },\n state,\n ref\n );\n\n let {hoverProps, isHovered} = useHover({\n // because of https://bugs.webkit.org/show_bug.cgi?id=214609, supporting hover styles when a item is ONLY isDraggable\n // results in hover styles sticking around after a reorder/drop operation...\n isDisabled: !states.allowsSelection && !states.hasAction && !isDraggable,\n onHoverStart: item.props.onHoverStart,\n onHoverChange: item.props.onHoverChange,\n onHoverEnd: item.props.onHoverEnd\n });\n\n let {isFocusVisible, focusProps} = useFocusRing();\n let {isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps} = useFocusRing({\n within: true\n });\n let {checkboxProps} = useGridListSelectionCheckbox({key: item.key}, state);\n\n let buttonProps =\n state.selectionManager.disabledBehavior === 'all' && states.isDisabled\n ? {isDisabled: true}\n : {};\n\n let draggableItem: DraggableItemResult | null = null;\n if (dragState && dragAndDropHooks) {\n draggableItem = dragAndDropHooks.useDraggableItem!(\n {key: item.key, hasDragButton: true},\n dragState\n );\n }\n\n let dropIndicator: DropIndicatorAria | null = null;\n let dropIndicatorRef = useRef<HTMLDivElement>(null);\n let {visuallyHiddenProps} = useVisuallyHidden();\n if (dropState && dragAndDropHooks) {\n dropIndicator = dragAndDropHooks.useDropIndicator!(\n {\n target: {type: 'item', key: item.key, dropPosition: 'on'}\n },\n dropState,\n dropIndicatorRef\n );\n }\n\n let isDragging = dragState && dragState.isDragging(item.key);\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListItem',\n values: {\n ...states,\n isHovered,\n isFocusVisible,\n isFocusVisibleWithin,\n selectionMode: state.selectionManager.selectionMode,\n selectionBehavior: state.selectionManager.selectionBehavior,\n allowsDragging: !!dragState,\n isDragging,\n isDropTarget: dropIndicator?.isDropTarget,\n id: item.key,\n state\n }\n });\n\n let dragButtonRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (dragState && !dragButtonRef.current) {\n console.warn(\n 'Draggable items in a GridList must contain a <Button slot=\"drag\"> element so that keyboard and screen reader users can drag them.'\n );\n }\n // eslint-disable-next-line\n }, []);\n\n useEffect(() => {\n if (!item.textValue && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'A `textValue` prop is required for <GridListItem> elements with non-plain text children in order to support accessibility features such as type to select.'\n );\n }\n }, [item.textValue]);\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <>\n {dropIndicator && !dropIndicator.isHidden && (\n <div role=\"row\" style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div\n role=\"button\"\n {...visuallyHiddenProps}\n {...dropIndicator?.dropIndicatorProps}\n ref={dropIndicatorRef}\n />\n </div>\n </div>\n )}\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n rowProps,\n focusProps,\n focusWithinProps,\n hoverProps,\n draggableItem?.dragProps\n )}\n ref={ref}\n data-selected={states.isSelected || undefined}\n data-disabled={states.isDisabled || undefined}\n data-hovered={isHovered || undefined}\n data-focused={states.isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-focus-visible-within={isFocusVisibleWithin || undefined}\n data-pressed={states.isPressed || undefined}\n data-allows-dragging={!!dragState || undefined}\n data-dragging={isDragging || undefined}\n data-drop-target={dropIndicator?.isDropTarget || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === 'none'\n ? undefined\n : state.selectionManager.selectionMode\n }>\n <div {...gridCellProps} style={{display: 'contents'}}>\n <Provider\n values={[\n [\n CheckboxContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n CheckboxFieldContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n ButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: buttonProps,\n drag: {\n ...draggableItem?.dragButtonProps,\n ref: dragButtonRef,\n style: {\n pointerEvents: 'none'\n }\n }\n }\n }\n ],\n [\n TextContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n description: descriptionProps\n }\n }\n ],\n [CollectionRendererContext, DefaultCollectionRenderer],\n [ListStateContext, null],\n [SelectableCollectionContext, null],\n [FieldInputContext, null],\n [SelectionIndicatorContext, {isSelected: states.isSelected}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n </dom.div>\n </>\n );\n});\n\nfunction GridListDropIndicatorWrapper(props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n ref = useObjectRef(ref);\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let buttonRef = useRef<HTMLDivElement>(null);\n // oxlint-disable-next-line react/react-compiler\n let {dropIndicatorProps, isHidden, isDropTarget} = dragAndDropHooks!.useDropIndicator!(\n props,\n dropState!,\n buttonRef\n );\n\n if (isHidden) {\n return null;\n }\n\n return (\n <GridListDropIndicatorForwardRef\n {...props}\n dropIndicatorProps={dropIndicatorProps}\n isDropTarget={isDropTarget}\n buttonRef={buttonRef}\n ref={ref}\n />\n );\n}\n\ninterface GridListDropIndicatorProps extends DropIndicatorProps {\n dropIndicatorProps: React.HTMLAttributes<HTMLElement>;\n isDropTarget: boolean;\n buttonRef: RefObject<HTMLDivElement | null>;\n}\n\nfunction GridListDropIndicator(props: GridListDropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n let {dropIndicatorProps, isDropTarget, buttonRef, ...otherProps} = props;\n\n let {visuallyHiddenProps} = useVisuallyHidden();\n let renderProps = useRenderProps({\n ...otherProps,\n defaultClassName: 'react-aria-DropIndicator',\n values: {\n isDropTarget\n }\n });\n\n return (\n <dom.div\n {...renderProps}\n role=\"row\"\n ref={ref as RefObject<HTMLDivElement | null>}\n data-drop-target={isDropTarget || undefined}>\n <div role=\"gridcell\">\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={buttonRef} />\n {renderProps.children}\n </div>\n </dom.div>\n );\n}\n\nconst GridListDropIndicatorForwardRef = forwardRef(GridListDropIndicator);\n\nfunction RootDropIndicator() {\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let ref = useRef<HTMLDivElement>(null);\n // oxlint-disable-next-line react/react-compiler\n let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!(\n {\n target: {type: 'root'}\n },\n dropState!,\n ref\n );\n let isDropTarget = dropState!.isDropTarget({type: 'root'});\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']} style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} />\n </div>\n </div>\n );\n}\n\nexport interface GridListLoadMoreItemProps\n extends\n Omit<LoadMoreSentinelProps, 'collection' | 'direction'>,\n StyleProps,\n DOMRenderProps<'div', undefined>,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListLoadingIndicator'\n */\n className?: string;\n /**\n * The load more spinner to render when loading additional items.\n */\n children?: ReactNode;\n /**\n * Whether or not the loading spinner should be rendered or not.\n */\n isLoading?: boolean;\n}\n\nexport const GridListLoadMoreItem = createLeafComponent(\n LoaderNode,\n function GridListLoadingIndicator(\n props: GridListLoadMoreItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<object>\n ) {\n let state = useContext(ListStateContext)!;\n let {isVirtualized} = useContext(CollectionRendererContext);\n let {isLoading, onLoadMore, scrollOffset, ...otherProps} = props;\n\n let sentinelRef = useRef(null);\n let memoedLoadMoreProps = useMemo(\n () => ({onLoadMore, collection: state?.collection, sentinelRef, scrollOffset}),\n [onLoadMore, scrollOffset, sentinelRef, state?.collection]\n );\n useLoadMoreSentinel(memoedLoadMoreProps, sentinelRef);\n\n let renderProps = useRenderProps({\n ...otherProps,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListLoadingIndicator',\n values: undefined\n });\n // For now don't include aria-posinset and aria-setsize on loader since they aren't keyboard focusable\n // Arguably shouldn't include them ever since it might be confusing to the user to include the loaders as part of the\n // item count\n\n return (\n <>\n {/* Alway render the sentinel. For now onus is on the user for styling when using flex + gap (this would introduce a gap even though it doesn't take room) */}\n {/* @ts-ignore - compatibility with React < 19 */}\n <div style={{position: 'relative', width: 0, height: 0}} inert={inertValue(true)}>\n <div\n data-testid=\"loadMoreSentinel\"\n ref={sentinelRef}\n style={{position: 'absolute', height: 1, width: 1}}\n />\n </div>\n {isLoading && renderProps.children && (\n <dom.div {...renderProps} {...filterDOMProps(props, {global: true})} role=\"row\" ref={ref}>\n <div aria-colindex={isVirtualized ? 1 : undefined} role=\"gridcell\">\n {renderProps.children}\n </div>\n </dom.div>\n )}\n </>\n );\n }\n);\n\nexport interface GridListSectionProps<T> extends SectionProps<T>, DOMRenderProps<'div', undefined> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListSection'\n */\n className?: string;\n}\n\n/**\n * A GridListSection represents a section within a GridList.\n */\nexport const GridListSection = /*#__PURE__*/ createBranchComponent(\n SectionNode,\n <T extends any>(\n props: GridListSectionProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<T>\n ) => {\n let state = useContext(ListStateContext)!;\n let {CollectionBranch} = useContext(CollectionRendererContext);\n let headingRef = useRef(null);\n ref = useObjectRef<HTMLDivElement>(ref);\n let {rowHeaderProps, rowProps, rowGroupProps} = useGridListSection(\n {\n 'aria-label': props['aria-label'] ?? undefined\n },\n state,\n ref\n );\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: undefined,\n defaultClassName: 'react-aria-GridListSection',\n values: undefined\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div {...mergeProps(DOMProps, renderProps, rowGroupProps)} ref={ref}>\n <Provider\n values={[\n [GridListHeaderContext, {...rowProps, ref: headingRef}],\n [GridListHeaderInnerContext, {...rowHeaderProps}]\n ]}>\n <CollectionBranch collection={state.collection} parent={item} />\n </Provider>\n </dom.div>\n );\n }\n);\n\nexport interface GridListHeaderProps\n extends DOMRenderProps<'div', undefined>, DOMProps, GlobalDOMAttributes<HTMLElement> {}\n\nexport const GridListHeaderContext = createContext<\n ContextValue<GridListHeaderProps, HTMLDivElement>\n>({});\nexport const GridListHeaderInnerContext = createContext<HTMLAttributes<HTMLElement> | null>(null);\n\nexport const GridListHeader = /*#__PURE__*/ createLeafComponent(\n HeaderNode,\n function Header(props: GridListHeaderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, GridListHeaderContext);\n let rowHeaderProps = useContext(GridListHeaderInnerContext);\n\n return (\n <dom.div render={props.render} className=\"react-aria-GridListHeader\" ref={ref} {...props}>\n <div {...rowHeaderProps} style={{display: 'contents'}}>\n {props.children}\n </div>\n </dom.div>\n );\n }\n);\n"],"names":[],"version":3,"file":"GridList.mjs.map"}