@proyecto-viviana/solidaria-components 0.5.0 → 0.7.0-rc.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 (561) hide show
  1. package/LICENSE-APACHE-2.0 +201 -0
  2. package/NOTICE +91 -0
  3. package/README.md +4 -7
  4. package/dist/ActionBar.d.ts +2 -10
  5. package/dist/ActionBar.d.ts.map +1 -1
  6. package/dist/ActionBar.js +95 -59
  7. package/dist/ActionBar.js.map +1 -1
  8. package/dist/ActionBar.jsx +42 -15
  9. package/dist/ActionBar.jsx.map +1 -1
  10. package/dist/ActionGroup.d.ts +1 -12
  11. package/dist/ActionGroup.d.ts.map +1 -1
  12. package/dist/ActionGroup.js +66 -44
  13. package/dist/ActionGroup.js.map +1 -1
  14. package/dist/ActionGroup.jsx +25 -10
  15. package/dist/ActionGroup.jsx.map +1 -1
  16. package/dist/Alert.d.ts +4 -1
  17. package/dist/Alert.d.ts.map +1 -1
  18. package/dist/Alert.js +25 -17
  19. package/dist/Alert.js.map +1 -1
  20. package/dist/Alert.jsx +9 -5
  21. package/dist/Alert.jsx.map +1 -1
  22. package/dist/Autocomplete.d.ts +2 -9
  23. package/dist/Autocomplete.d.ts.map +1 -1
  24. package/dist/Autocomplete.js +18 -5
  25. package/dist/Autocomplete.js.map +1 -1
  26. package/dist/Autocomplete.jsx +20 -7
  27. package/dist/Autocomplete.jsx.map +1 -1
  28. package/dist/Breadcrumbs.d.ts +2 -7
  29. package/dist/Breadcrumbs.d.ts.map +1 -1
  30. package/dist/Breadcrumbs.js +71 -51
  31. package/dist/Breadcrumbs.js.map +1 -1
  32. package/dist/Breadcrumbs.jsx +25 -12
  33. package/dist/Breadcrumbs.jsx.map +1 -1
  34. package/dist/Button.d.ts +1 -7
  35. package/dist/Button.d.ts.map +1 -1
  36. package/dist/Button.js +125 -72
  37. package/dist/Button.js.map +1 -1
  38. package/dist/Button.jsx +105 -43
  39. package/dist/Button.jsx.map +1 -1
  40. package/dist/Calendar.d.ts +1 -7
  41. package/dist/Calendar.d.ts.map +1 -1
  42. package/dist/Calendar.js +297 -221
  43. package/dist/Calendar.js.map +1 -1
  44. package/dist/Calendar.jsx +52 -32
  45. package/dist/Calendar.jsx.map +1 -1
  46. package/dist/CalendarPicker.d.ts +1 -10
  47. package/dist/CalendarPicker.d.ts.map +1 -1
  48. package/dist/CalendarPicker.js +12 -0
  49. package/dist/CalendarPicker.js.map +1 -1
  50. package/dist/CalendarPicker.jsx +12 -0
  51. package/dist/CalendarPicker.jsx.map +1 -1
  52. package/dist/Checkbox.d.ts +2 -7
  53. package/dist/Checkbox.d.ts.map +1 -1
  54. package/dist/Checkbox.js +332 -270
  55. package/dist/Checkbox.js.map +1 -1
  56. package/dist/Checkbox.jsx +70 -77
  57. package/dist/Checkbox.jsx.map +1 -1
  58. package/dist/Collection.d.ts +33 -7
  59. package/dist/Collection.d.ts.map +1 -1
  60. package/dist/Collection.js +128 -74
  61. package/dist/Collection.js.map +1 -1
  62. package/dist/Collection.jsx +46 -7
  63. package/dist/Collection.jsx.map +1 -1
  64. package/dist/Color.d.ts +15 -20
  65. package/dist/Color.d.ts.map +1 -1
  66. package/dist/Color.js +572 -334
  67. package/dist/Color.js.map +1 -1
  68. package/dist/Color.jsx +205 -85
  69. package/dist/Color.jsx.map +1 -1
  70. package/dist/ColorEditor.d.ts +3 -1
  71. package/dist/ColorEditor.d.ts.map +1 -1
  72. package/dist/ColorEditor.js +147 -124
  73. package/dist/ColorEditor.js.map +1 -1
  74. package/dist/ColorEditor.jsx +4 -1
  75. package/dist/ColorEditor.jsx.map +1 -1
  76. package/dist/ComboBox.d.ts +31 -10
  77. package/dist/ComboBox.d.ts.map +1 -1
  78. package/dist/ComboBox.js +539 -274
  79. package/dist/ComboBox.js.map +1 -1
  80. package/dist/ComboBox.jsx +213 -70
  81. package/dist/ComboBox.jsx.map +1 -1
  82. package/dist/ContextualHelpTrigger.d.ts +1 -7
  83. package/dist/ContextualHelpTrigger.d.ts.map +1 -1
  84. package/dist/ContextualHelpTrigger.js +102 -72
  85. package/dist/ContextualHelpTrigger.js.map +1 -1
  86. package/dist/ContextualHelpTrigger.jsx +36 -16
  87. package/dist/ContextualHelpTrigger.jsx.map +1 -1
  88. package/dist/DateField.d.ts +2 -7
  89. package/dist/DateField.d.ts.map +1 -1
  90. package/dist/DateField.js +0 -2
  91. package/dist/DateField.jsx +0 -2
  92. package/dist/DateField2.js +194 -179
  93. package/dist/DateField2.js.map +1 -1
  94. package/dist/DateField2.jsx +58 -55
  95. package/dist/DateField2.jsx.map +1 -1
  96. package/dist/DatePicker.d.ts +7 -7
  97. package/dist/DatePicker.d.ts.map +1 -1
  98. package/dist/DatePicker.js +2 -2
  99. package/dist/DatePicker.jsx +2 -2
  100. package/dist/DatePicker2.js +357 -435
  101. package/dist/DatePicker2.js.map +1 -1
  102. package/dist/DatePicker2.jsx +109 -178
  103. package/dist/DatePicker2.jsx.map +1 -1
  104. package/dist/DateRangePickerContext.d.ts +7 -0
  105. package/dist/DateRangePickerContext.d.ts.map +1 -1
  106. package/dist/Dialog.d.ts +4 -9
  107. package/dist/Dialog.d.ts.map +1 -1
  108. package/dist/Dialog.js +168 -101
  109. package/dist/Dialog.js.map +1 -1
  110. package/dist/Dialog.jsx +75 -27
  111. package/dist/Dialog.jsx.map +1 -1
  112. package/dist/Disclosure.d.ts +1 -9
  113. package/dist/Disclosure.d.ts.map +1 -1
  114. package/dist/Disclosure.js +121 -79
  115. package/dist/Disclosure.js.map +1 -1
  116. package/dist/Disclosure.jsx +32 -19
  117. package/dist/Disclosure.jsx.map +1 -1
  118. package/dist/DragAndDrop.d.ts +9 -6
  119. package/dist/DragAndDrop.d.ts.map +1 -1
  120. package/dist/DragAndDrop.js +37 -22
  121. package/dist/DragAndDrop.js.map +1 -1
  122. package/dist/DragAndDrop.jsx +20 -4
  123. package/dist/DragAndDrop.jsx.map +1 -1
  124. package/dist/DragPreview.d.ts +1 -1
  125. package/dist/DragPreview.d.ts.map +1 -1
  126. package/dist/DropZone.d.ts +1 -7
  127. package/dist/DropZone.d.ts.map +1 -1
  128. package/dist/DropZone.js +74 -40
  129. package/dist/DropZone.js.map +1 -1
  130. package/dist/DropZone.jsx +24 -8
  131. package/dist/DropZone.jsx.map +1 -1
  132. package/dist/ElementTag.d.ts +9 -20
  133. package/dist/ElementTag.d.ts.map +1 -1
  134. package/dist/ElementTag.js +8 -210
  135. package/dist/ElementTag.js.map +1 -1
  136. package/dist/ElementTag.jsx +8 -57
  137. package/dist/ElementTag.jsx.map +1 -1
  138. package/dist/FieldError.d.ts +8 -7
  139. package/dist/FieldError.d.ts.map +1 -1
  140. package/dist/FieldError.js +33 -13
  141. package/dist/FieldError.js.map +1 -1
  142. package/dist/FieldError.jsx +20 -5
  143. package/dist/FieldError.jsx.map +1 -1
  144. package/dist/FileTrigger.d.ts +1 -7
  145. package/dist/FileTrigger.d.ts.map +1 -1
  146. package/dist/FileTrigger.js +30 -12
  147. package/dist/FileTrigger.js.map +1 -1
  148. package/dist/FileTrigger.jsx +15 -2
  149. package/dist/FileTrigger.jsx.map +1 -1
  150. package/dist/Focusable.d.ts +2 -8
  151. package/dist/Focusable.d.ts.map +1 -1
  152. package/dist/Focusable.js +23 -6
  153. package/dist/Focusable.js.map +1 -1
  154. package/dist/Focusable.jsx +22 -5
  155. package/dist/Focusable.jsx.map +1 -1
  156. package/dist/Form.d.ts +9 -8
  157. package/dist/Form.d.ts.map +1 -1
  158. package/dist/Form.js +66 -43
  159. package/dist/Form.js.map +1 -1
  160. package/dist/Form.jsx +36 -16
  161. package/dist/Form.jsx.map +1 -1
  162. package/dist/GridList.d.ts +5 -10
  163. package/dist/GridList.d.ts.map +1 -1
  164. package/dist/GridList.js +372 -243
  165. package/dist/GridList.js.map +1 -1
  166. package/dist/GridList.jsx +177 -99
  167. package/dist/GridList.jsx.map +1 -1
  168. package/dist/HiddenDateInput.d.ts +1 -7
  169. package/dist/HiddenDateInput.d.ts.map +1 -1
  170. package/dist/Icon.d.ts +4 -1
  171. package/dist/Icon.d.ts.map +1 -1
  172. package/dist/Icon.js +41 -37
  173. package/dist/Icon.js.map +1 -1
  174. package/dist/Icon.jsx +7 -3
  175. package/dist/Icon.jsx.map +1 -1
  176. package/dist/Keyboard.d.ts +1 -7
  177. package/dist/Keyboard.d.ts.map +1 -1
  178. package/dist/Keyboard.js +24 -11
  179. package/dist/Keyboard.js.map +1 -1
  180. package/dist/Keyboard.jsx +15 -2
  181. package/dist/Keyboard.jsx.map +1 -1
  182. package/dist/Label.d.ts +20 -0
  183. package/dist/Label.d.ts.map +1 -0
  184. package/dist/Label.js +60 -0
  185. package/dist/Label.js.map +1 -0
  186. package/dist/Label.jsx +47 -0
  187. package/dist/Label.jsx.map +1 -0
  188. package/dist/Landmark.d.ts +4 -1
  189. package/dist/Landmark.d.ts.map +1 -1
  190. package/dist/Landmark.js +10 -4
  191. package/dist/Landmark.js.map +1 -1
  192. package/dist/Landmark.jsx +5 -1
  193. package/dist/Landmark.jsx.map +1 -1
  194. package/dist/Link.d.ts +2 -7
  195. package/dist/Link.d.ts.map +1 -1
  196. package/dist/Link.js +56 -36
  197. package/dist/Link.js.map +1 -1
  198. package/dist/Link.jsx +52 -10
  199. package/dist/Link.jsx.map +1 -1
  200. package/dist/ListBox.d.ts +17 -13
  201. package/dist/ListBox.d.ts.map +1 -1
  202. package/dist/ListBox.js +647 -348
  203. package/dist/ListBox.js.map +1 -1
  204. package/dist/ListBox.jsx +339 -236
  205. package/dist/ListBox.jsx.map +1 -1
  206. package/dist/ListDropTargetDelegate.d.ts +3 -0
  207. package/dist/ListDropTargetDelegate.d.ts.map +1 -1
  208. package/dist/Menu.d.ts +39 -30
  209. package/dist/Menu.d.ts.map +1 -1
  210. package/dist/Menu.js +547 -368
  211. package/dist/Menu.js.map +1 -1
  212. package/dist/Menu.jsx +328 -230
  213. package/dist/Menu.jsx.map +1 -1
  214. package/dist/Meter.d.ts +6 -13
  215. package/dist/Meter.d.ts.map +1 -1
  216. package/dist/Meter.js +55 -18
  217. package/dist/Meter.js.map +1 -1
  218. package/dist/Meter.jsx +33 -8
  219. package/dist/Meter.jsx.map +1 -1
  220. package/dist/Modal.d.ts +1 -7
  221. package/dist/Modal.d.ts.map +1 -1
  222. package/dist/Modal.js +104 -56
  223. package/dist/Modal.js.map +1 -1
  224. package/dist/Modal.jsx +68 -38
  225. package/dist/Modal.jsx.map +1 -1
  226. package/dist/NumberField.d.ts +4 -7
  227. package/dist/NumberField.d.ts.map +1 -1
  228. package/dist/NumberField.js +243 -124
  229. package/dist/NumberField.js.map +1 -1
  230. package/dist/NumberField.jsx +115 -26
  231. package/dist/NumberField.jsx.map +1 -1
  232. package/dist/Popover.d.ts +15 -7
  233. package/dist/Popover.d.ts.map +1 -1
  234. package/dist/Popover.js +370 -181
  235. package/dist/Popover.js.map +1 -1
  236. package/dist/Popover.jsx +215 -82
  237. package/dist/Popover.jsx.map +1 -1
  238. package/dist/Pressable.d.ts +2 -8
  239. package/dist/Pressable.d.ts.map +1 -1
  240. package/dist/Pressable.js +23 -6
  241. package/dist/Pressable.js.map +1 -1
  242. package/dist/Pressable.jsx +22 -5
  243. package/dist/Pressable.jsx.map +1 -1
  244. package/dist/PreviewTrigger.d.ts +24 -0
  245. package/dist/PreviewTrigger.d.ts.map +1 -0
  246. package/dist/PreviewTrigger.js +128 -0
  247. package/dist/PreviewTrigger.js.map +1 -0
  248. package/dist/PreviewTrigger.jsx +117 -0
  249. package/dist/PreviewTrigger.jsx.map +1 -0
  250. package/dist/ProgressBar.d.ts +1 -7
  251. package/dist/ProgressBar.d.ts.map +1 -1
  252. package/dist/ProgressBar.js +34 -14
  253. package/dist/ProgressBar.js.map +1 -1
  254. package/dist/ProgressBar.jsx +17 -3
  255. package/dist/ProgressBar.jsx.map +1 -1
  256. package/dist/RadioGroup.d.ts +2 -7
  257. package/dist/RadioGroup.d.ts.map +1 -1
  258. package/dist/RadioGroup.js +388 -269
  259. package/dist/RadioGroup.js.map +1 -1
  260. package/dist/RadioGroup.jsx +110 -99
  261. package/dist/RadioGroup.jsx.map +1 -1
  262. package/dist/RangeCalendar.d.ts +3 -7
  263. package/dist/RangeCalendar.d.ts.map +1 -1
  264. package/dist/RangeCalendar.js +271 -202
  265. package/dist/RangeCalendar.js.map +1 -1
  266. package/dist/RangeCalendar.jsx +56 -37
  267. package/dist/RangeCalendar.jsx.map +1 -1
  268. package/dist/RouterProvider.d.ts +3 -9
  269. package/dist/RouterProvider.d.ts.map +1 -1
  270. package/dist/RouterProvider.js +15 -14
  271. package/dist/RouterProvider.js.map +1 -1
  272. package/dist/RouterProvider.jsx +14 -13
  273. package/dist/RouterProvider.jsx.map +1 -1
  274. package/dist/SearchField.d.ts +4 -7
  275. package/dist/SearchField.d.ts.map +1 -1
  276. package/dist/SearchField.js +191 -164
  277. package/dist/SearchField.js.map +1 -1
  278. package/dist/SearchField.jsx +69 -62
  279. package/dist/SearchField.jsx.map +1 -1
  280. package/dist/Select.d.ts +5 -10
  281. package/dist/Select.d.ts.map +1 -1
  282. package/dist/Select.js +565 -359
  283. package/dist/Select.js.map +1 -1
  284. package/dist/Select.jsx +281 -161
  285. package/dist/Select.jsx.map +1 -1
  286. package/dist/SelectionIndicator.d.ts +1 -4
  287. package/dist/SelectionIndicator.d.ts.map +1 -1
  288. package/dist/SelectionIndicator.js +29 -13
  289. package/dist/SelectionIndicator.js.map +1 -1
  290. package/dist/SelectionIndicator.jsx +18 -4
  291. package/dist/SelectionIndicator.jsx.map +1 -1
  292. package/dist/Separator.d.ts +1 -7
  293. package/dist/Separator.d.ts.map +1 -1
  294. package/dist/Separator.js +22 -6
  295. package/dist/Separator.js.map +1 -1
  296. package/dist/Separator.jsx +16 -3
  297. package/dist/Separator.jsx.map +1 -1
  298. package/dist/SharedElementTransition.d.ts +1 -10
  299. package/dist/SharedElementTransition.d.ts.map +1 -1
  300. package/dist/SharedElementTransition.js +68 -40
  301. package/dist/SharedElementTransition.js.map +1 -1
  302. package/dist/SharedElementTransition.jsx +49 -25
  303. package/dist/SharedElementTransition.jsx.map +1 -1
  304. package/dist/Slider.d.ts +2 -8
  305. package/dist/Slider.d.ts.map +1 -1
  306. package/dist/Slider.js +155 -97
  307. package/dist/Slider.js.map +1 -1
  308. package/dist/Slider.jsx +25 -12
  309. package/dist/Slider.jsx.map +1 -1
  310. package/dist/StepList.d.ts +1 -7
  311. package/dist/StepList.d.ts.map +1 -1
  312. package/dist/StepList.js +112 -68
  313. package/dist/StepList.js.map +1 -1
  314. package/dist/StepList.jsx +58 -20
  315. package/dist/StepList.jsx.map +1 -1
  316. package/dist/Switch.d.ts +2 -9
  317. package/dist/Switch.d.ts.map +1 -1
  318. package/dist/Switch.js +164 -114
  319. package/dist/Switch.js.map +1 -1
  320. package/dist/Switch.jsx +26 -13
  321. package/dist/Switch.jsx.map +1 -1
  322. package/dist/Table.d.ts +2 -1
  323. package/dist/Table.d.ts.map +1 -1
  324. package/dist/Table.js +689 -592
  325. package/dist/Table.js.map +1 -1
  326. package/dist/Table.jsx +317 -237
  327. package/dist/Table.jsx.map +1 -1
  328. package/dist/Tabs.d.ts +2 -7
  329. package/dist/Tabs.d.ts.map +1 -1
  330. package/dist/Tabs.js +278 -293
  331. package/dist/Tabs.js.map +1 -1
  332. package/dist/Tabs.jsx +68 -66
  333. package/dist/Tabs.jsx.map +1 -1
  334. package/dist/TagGroup.d.ts +4 -11
  335. package/dist/TagGroup.d.ts.map +1 -1
  336. package/dist/TagGroup.js +153 -115
  337. package/dist/TagGroup.js.map +1 -1
  338. package/dist/TagGroup.jsx +37 -24
  339. package/dist/TagGroup.jsx.map +1 -1
  340. package/dist/Text.d.ts +3 -3
  341. package/dist/Text.d.ts.map +1 -1
  342. package/dist/Text.js +24 -7
  343. package/dist/Text.js.map +1 -1
  344. package/dist/Text.jsx +17 -5
  345. package/dist/Text.jsx.map +1 -1
  346. package/dist/TextField.d.ts +3 -16
  347. package/dist/TextField.d.ts.map +1 -1
  348. package/dist/TextField.js +104 -129
  349. package/dist/TextField.js.map +1 -1
  350. package/dist/TextField.jsx +76 -102
  351. package/dist/TextField.jsx.map +1 -1
  352. package/dist/TimeField.d.ts +2 -15
  353. package/dist/TimeField.d.ts.map +1 -1
  354. package/dist/TimeField.js +86 -102
  355. package/dist/TimeField.js.map +1 -1
  356. package/dist/TimeField.jsx +32 -49
  357. package/dist/TimeField.jsx.map +1 -1
  358. package/dist/Toast.d.ts +10 -13
  359. package/dist/Toast.d.ts.map +1 -1
  360. package/dist/Toast.js +209 -108
  361. package/dist/Toast.js.map +1 -1
  362. package/dist/Toast.jsx +127 -22
  363. package/dist/Toast.jsx.map +1 -1
  364. package/dist/ToggleButton.d.ts +1 -7
  365. package/dist/ToggleButton.d.ts.map +1 -1
  366. package/dist/ToggleButton.js +57 -35
  367. package/dist/ToggleButton.js.map +1 -1
  368. package/dist/ToggleButton.jsx +26 -12
  369. package/dist/ToggleButton.jsx.map +1 -1
  370. package/dist/ToggleButtonGroup.d.ts +1 -7
  371. package/dist/ToggleButtonGroup.d.ts.map +1 -1
  372. package/dist/ToggleButtonGroup.js +59 -44
  373. package/dist/ToggleButtonGroup.js.map +1 -1
  374. package/dist/ToggleButtonGroup.jsx +25 -12
  375. package/dist/ToggleButtonGroup.jsx.map +1 -1
  376. package/dist/TokenField.d.ts +52 -0
  377. package/dist/TokenField.d.ts.map +1 -0
  378. package/dist/TokenField.js +301 -0
  379. package/dist/TokenField.js.map +1 -0
  380. package/dist/TokenField.jsx +197 -0
  381. package/dist/TokenField.jsx.map +1 -0
  382. package/dist/Toolbar.d.ts +2 -7
  383. package/dist/Toolbar.d.ts.map +1 -1
  384. package/dist/Toolbar.js +35 -16
  385. package/dist/Toolbar.js.map +1 -1
  386. package/dist/Toolbar.jsx +15 -2
  387. package/dist/Toolbar.jsx.map +1 -1
  388. package/dist/Tooltip.d.ts +2 -7
  389. package/dist/Tooltip.d.ts.map +1 -1
  390. package/dist/Tooltip.js +105 -68
  391. package/dist/Tooltip.js.map +1 -1
  392. package/dist/Tooltip.jsx +60 -36
  393. package/dist/Tooltip.jsx.map +1 -1
  394. package/dist/Tree.d.ts +8 -11
  395. package/dist/Tree.d.ts.map +1 -1
  396. package/dist/Tree.js +486 -339
  397. package/dist/Tree.js.map +1 -1
  398. package/dist/Tree.jsx +155 -107
  399. package/dist/Tree.jsx.map +1 -1
  400. package/dist/Virtualizer.d.ts +39 -9
  401. package/dist/Virtualizer.d.ts.map +1 -1
  402. package/dist/Virtualizer.js +2 -2
  403. package/dist/Virtualizer.jsx +2 -2
  404. package/dist/Virtualizer2.js +491 -136
  405. package/dist/Virtualizer2.js.map +1 -1
  406. package/dist/Virtualizer2.jsx +455 -122
  407. package/dist/Virtualizer2.jsx.map +1 -1
  408. package/dist/VirtualizerLayouts.d.ts +55 -2
  409. package/dist/VirtualizerLayouts.d.ts.map +1 -1
  410. package/dist/VisuallyHidden.d.ts +4 -3
  411. package/dist/VisuallyHidden.d.ts.map +1 -1
  412. package/dist/VisuallyHidden.js +18 -11
  413. package/dist/VisuallyHidden.js.map +1 -1
  414. package/dist/VisuallyHidden.jsx +15 -9
  415. package/dist/VisuallyHidden.jsx.map +1 -1
  416. package/dist/contexts.d.ts +25 -0
  417. package/dist/contexts.d.ts.map +1 -1
  418. package/dist/contexts.js +3 -0
  419. package/dist/contexts.js.map +1 -1
  420. package/dist/contexts.jsx +3 -0
  421. package/dist/contexts.jsx.map +1 -1
  422. package/dist/index.d.ts +11 -9
  423. package/dist/index.d.ts.map +1 -1
  424. package/dist/index.js +14 -11
  425. package/dist/index.jsx +14 -11
  426. package/dist/intl/index.d.ts +16 -0
  427. package/dist/intl/index.d.ts.map +1 -0
  428. package/dist/intl.js +212 -0
  429. package/dist/intl.js.map +1 -0
  430. package/dist/intl.jsx +212 -0
  431. package/dist/intl.jsx.map +1 -0
  432. package/dist/useDragAndDrop.d.ts +4 -2
  433. package/dist/useDragAndDrop.d.ts.map +1 -1
  434. package/dist/useDragAndDrop2.js +39 -21
  435. package/dist/useDragAndDrop2.js.map +1 -1
  436. package/dist/useDragAndDrop2.jsx +39 -21
  437. package/dist/useDragAndDrop2.jsx.map +1 -1
  438. package/dist/utils.d.ts +28 -9
  439. package/dist/utils.d.ts.map +1 -1
  440. package/dist/utils.js +96 -24
  441. package/dist/utils.js.map +1 -1
  442. package/dist/utils.jsx +81 -24
  443. package/dist/utils.jsx.map +1 -1
  444. package/dist/virtualizer/Layout.d.ts +9 -0
  445. package/dist/virtualizer/Layout.d.ts.map +1 -1
  446. package/dist/virtualizer/Layout.js +23 -2
  447. package/dist/virtualizer/Layout.js.map +1 -1
  448. package/dist/virtualizer/Layout.jsx +23 -2
  449. package/dist/virtualizer/Layout.jsx.map +1 -1
  450. package/package.json +29 -10
  451. package/src/ActionBar.tsx +50 -24
  452. package/src/ActionGroup.tsx +31 -19
  453. package/src/Alert.tsx +10 -4
  454. package/src/Autocomplete.tsx +24 -15
  455. package/src/Breadcrumbs.tsx +32 -16
  456. package/src/Button.tsx +182 -67
  457. package/src/Calendar.tsx +65 -47
  458. package/src/CalendarPicker.tsx +16 -1
  459. package/src/Checkbox.tsx +84 -116
  460. package/src/Collection.tsx +84 -3
  461. package/src/Color.tsx +282 -104
  462. package/src/ColorEditor.tsx +5 -1
  463. package/src/ComboBox.tsx +384 -109
  464. package/src/ContextualHelpTrigger.tsx +47 -41
  465. package/src/DateField.tsx +74 -106
  466. package/src/DatePicker.tsx +156 -352
  467. package/src/DateRangePickerContext.tsx +8 -0
  468. package/src/Dialog.tsx +105 -38
  469. package/src/Disclosure.tsx +29 -19
  470. package/src/DragAndDrop.tsx +43 -8
  471. package/src/DragPreview.tsx +20 -1
  472. package/src/DropZone.tsx +32 -18
  473. package/src/ElementTag.tsx +14 -104
  474. package/src/FieldError.tsx +39 -7
  475. package/src/FileTrigger.tsx +18 -3
  476. package/src/Focusable.tsx +27 -6
  477. package/src/Form.tsx +57 -11
  478. package/src/GridList.tsx +233 -141
  479. package/src/HiddenDateInput.tsx +19 -3
  480. package/src/Icon.tsx +8 -2
  481. package/src/Keyboard.tsx +18 -2
  482. package/src/Label.tsx +77 -0
  483. package/src/Landmark.tsx +6 -1
  484. package/src/Link.tsx +65 -19
  485. package/src/ListBox.tsx +645 -468
  486. package/src/ListDropTargetDelegate.ts +4 -0
  487. package/src/Menu.tsx +512 -349
  488. package/src/Meter.tsx +42 -8
  489. package/src/Modal.tsx +85 -42
  490. package/src/NumberField.tsx +161 -48
  491. package/src/Popover.tsx +424 -148
  492. package/src/Pressable.tsx +27 -6
  493. package/src/PreviewTrigger.tsx +171 -0
  494. package/src/ProgressBar.tsx +25 -3
  495. package/src/RadioGroup.tsx +230 -161
  496. package/src/RangeCalendar.tsx +75 -63
  497. package/src/RouterProvider.tsx +24 -14
  498. package/src/SearchField.tsx +118 -121
  499. package/src/Select.tsx +454 -274
  500. package/src/SelectionIndicator.tsx +21 -3
  501. package/src/Separator.tsx +17 -1
  502. package/src/SharedElementTransition.tsx +115 -97
  503. package/src/Slider.tsx +35 -17
  504. package/src/StepList.tsx +71 -32
  505. package/src/Switch.tsx +45 -29
  506. package/src/Table.tsx +446 -380
  507. package/src/Tabs.tsx +132 -155
  508. package/src/TagGroup.tsx +53 -40
  509. package/src/Text.tsx +23 -6
  510. package/src/TextField.tsx +118 -159
  511. package/src/TimeField.tsx +34 -95
  512. package/src/Toast.tsx +141 -67
  513. package/src/ToggleButton.tsx +33 -15
  514. package/src/ToggleButtonGroup.tsx +27 -9
  515. package/src/TokenField.tsx +379 -0
  516. package/src/Toolbar.tsx +19 -9
  517. package/src/Tooltip.tsx +126 -84
  518. package/src/Tree.tsx +233 -173
  519. package/src/Virtualizer.tsx +400 -138
  520. package/src/VirtualizerLayouts.ts +211 -26
  521. package/src/VisuallyHidden.tsx +22 -8
  522. package/src/contexts.ts +13 -0
  523. package/src/index.ts +32 -11
  524. package/src/intl/ar-AE.json +6 -0
  525. package/src/intl/bg-BG.json +6 -0
  526. package/src/intl/cs-CZ.json +6 -0
  527. package/src/intl/da-DK.json +6 -0
  528. package/src/intl/de-DE.json +6 -0
  529. package/src/intl/el-GR.json +6 -0
  530. package/src/intl/en-US.json +6 -0
  531. package/src/intl/es-ES.json +6 -0
  532. package/src/intl/et-EE.json +6 -0
  533. package/src/intl/fi-FI.json +6 -0
  534. package/src/intl/fr-FR.json +6 -0
  535. package/src/intl/he-IL.json +6 -0
  536. package/src/intl/hr-HR.json +6 -0
  537. package/src/intl/hu-HU.json +6 -0
  538. package/src/intl/index.ts +125 -0
  539. package/src/intl/it-IT.json +6 -0
  540. package/src/intl/ja-JP.json +6 -0
  541. package/src/intl/ko-KR.json +6 -0
  542. package/src/intl/lt-LT.json +6 -0
  543. package/src/intl/lv-LV.json +6 -0
  544. package/src/intl/nb-NO.json +6 -0
  545. package/src/intl/nl-NL.json +6 -0
  546. package/src/intl/pl-PL.json +6 -0
  547. package/src/intl/pt-BR.json +6 -0
  548. package/src/intl/pt-PT.json +6 -0
  549. package/src/intl/ro-RO.json +6 -0
  550. package/src/intl/ru-RU.json +6 -0
  551. package/src/intl/sk-SK.json +6 -0
  552. package/src/intl/sl-SI.json +6 -0
  553. package/src/intl/sr-SP.json +6 -0
  554. package/src/intl/sv-SE.json +6 -0
  555. package/src/intl/tr-TR.json +6 -0
  556. package/src/intl/uk-UA.json +6 -0
  557. package/src/intl/zh-CN.json +6 -0
  558. package/src/intl/zh-TW.json +6 -0
  559. package/src/useDragAndDrop.ts +30 -32
  560. package/src/utils.tsx +124 -68
  561. package/src/virtualizer/Layout.ts +29 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ListBox.jsx","names":["mergeProps"],"sources":["../src/ListBox.tsx"],"sourcesContent":["/**\n * ListBox component for solidaria-components\n *\n * A pre-wired headless listbox that combines state + aria hooks.\n * Port of react-aria-components/src/ListBox.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createEffect,\n createMemo,\n createSignal,\n on,\n onCleanup,\n splitProps,\n useContext,\n For,\n Show,\n} from \"solid-js\";\nimport {\n createListBox,\n createOption,\n createFocusRing,\n createScrollIntoViewOnFocus,\n createStringFormatter,\n createDragSession,\n getGlobalDraggingCollectionRef,\n getGlobalDraggingKeys,\n registerDropItem,\n dndIntlStrings,\n mergeProps,\n moveVirtualFocus,\n useLocale,\n FOCUS_EVENT,\n CLEAR_FOCUS_EVENT,\n type AriaListBoxProps,\n type AriaOptionProps,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n createListState,\n createFilteredListState,\n type ListState,\n type ListFilterFn,\n type Key,\n type DropTarget,\n} from \"@proyecto-viviana/solid-stately\";\nimport { useAutocompleteCollection } from \"./Autocomplete\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from \"./utils\";\nimport { SharedElementTransition } from \"./SharedElementTransition\";\nimport {\n SelectionIndicatorContext,\n type SelectionIndicatorContextValue,\n} from \"./SelectionIndicator\";\nimport { useVirtualizerContext } from \"./Virtualizer\";\nimport { type DragAndDropHooks } from \"./useDragAndDrop\";\nimport {\n getNormalizedDropTargetKey,\n mergePersistedKeysIntoVirtualRange,\n useDndPersistedKeys,\n useRenderDropIndicator,\n DropIndicatorContext,\n type DropIndicatorProps,\n} from \"./DragAndDrop\";\nimport type { ItemDropTarget } from \"@proyecto-viviana/solid-stately\";\nimport {\n CollectionRendererContext,\n Section,\n Header,\n Group,\n type CollectionEntry,\n type CollectionRendererContextValue,\n type SectionProps,\n useCollectionRenderer,\n isCollectionSection,\n flattenCollectionEntries,\n} from \"./Collection\";\n\nexport interface ListBoxRenderProps {\n /** Whether the listbox has focus. */\n isFocused: boolean;\n /** Whether the listbox has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the listbox is disabled. */\n isDisabled: boolean;\n /** Whether the listbox is empty. */\n isEmpty: boolean;\n}\n\ntype RefLike<T> = ((el: T) => void) | { current?: T | null } | undefined;\n\nfunction assignRef<T>(ref: RefLike<T>, el: T): void {\n if (!ref) return;\n if (typeof ref === \"function\") ref(el);\n else ref.current = el;\n}\n\nexport interface ListBoxProps<T> extends Omit<AriaListBoxProps, \"children\">, SlotProps {\n /** The items to render in the listbox. */\n items: CollectionEntry<T>[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item. */\n getTextValue?: (item: T) => string;\n /** Function to check if an item is disabled. */\n getDisabled?: (item: T) => boolean;\n /** The selection mode. */\n selectionMode?: \"none\" | \"single\" | \"multiple\";\n /** The selection behavior (toggle vs replace). */\n selectionBehavior?: \"toggle\" | \"replace\";\n /** Whether disabled items can still receive focus. */\n disabledBehavior?: \"selection\" | \"all\";\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** Currently selected keys (controlled). */\n selectedKeys?: \"all\" | Iterable<Key>;\n /** Default selected keys (uncontrolled). */\n defaultSelectedKeys?: \"all\" | Iterable<Key>;\n /** Handler called when selection changes. */\n onSelectionChange?: (keys: \"all\" | Set<Key>) => void;\n /** The children of the component. A function may be provided to render each item. */\n children: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ListBoxRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ListBoxRenderProps>;\n /** A function to render when the listbox is empty. */\n renderEmptyState?: () => JSX.Element;\n /** Whether there are more items to load. */\n hasMore?: boolean;\n /** Whether additional items are currently loading. */\n isLoading?: boolean;\n /** Called when the load more sentinel becomes visible. */\n onLoadMore?: () => void | Promise<void>;\n /** Ref for the listbox element. */\n ref?: RefLike<HTMLDivElement>;\n /** Drag and drop hooks from `useDragAndDrop`. */\n dragAndDropHooks?: DragAndDropHooks<T>;\n /** Layout hint for styling parity. */\n layout?: \"stack\" | \"grid\";\n /** Orientation hint for styling parity. */\n orientation?: \"vertical\" | \"horizontal\";\n /** Slot definitions provided through ListBoxContext. */\n slots?: Record<string, Partial<ListBoxProps<T>>>;\n}\n\nexport interface ListBoxOptionRenderProps {\n /** Whether the option is selected. */\n isSelected: boolean;\n /** Whether the option is focused. */\n isFocused: boolean;\n /** Whether the option has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the option is pressed. */\n isPressed: boolean;\n /** Whether the option is hovered. */\n isHovered: boolean;\n /** Whether the option is disabled. */\n isDisabled: boolean;\n}\n\nexport interface ListBoxOptionProps<T>\n extends Omit<AriaOptionProps, \"children\" | \"key\">, SlotProps {\n /** The unique key for the option. */\n id: Key;\n /** The item value. */\n item?: T;\n /** The children of the option. A function may be provided to receive render props. */\n children?: RenderChildren<ListBoxOptionRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ListBoxOptionRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ListBoxOptionRenderProps>;\n /** The text value of the option (for typeahead). */\n textValue?: string;\n /** Ref for the option element. */\n ref?: RefLike<HTMLDivElement>;\n}\n\nexport interface ListBoxLoadMoreItemProps extends SlotProps {\n /** Called when the sentinel becomes visible. */\n onLoadMore: () => void | Promise<void>;\n /** Whether additional items are currently loading. */\n isLoading?: boolean;\n /** Scroll offset multiplier for early loading trigger (default: 1 = 100% of viewport height). */\n scrollOffset?: number;\n /** Content for the load more row. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<{ isLoading: boolean }>;\n /** The inline style for the element. */\n style?: StyleOrFunction<{ isLoading: boolean }>;\n}\n\nexport interface ListBoxSectionProps extends SectionProps {}\n\ninterface ListBoxContextValue<T> {\n state: ListState<T>;\n isDisabled: () => boolean;\n dragAndDropHooks?: DragAndDropHooks<unknown>;\n dragState?: unknown;\n dropState?: unknown;\n slots?: Record<string, Partial<ListBoxProps<T>>>;\n}\n\nexport const ListBoxContext = createContext<ListBoxContextValue<unknown> | null>(null);\nexport const ListBoxStateContext = createContext<ListState<unknown> | null>(null);\nexport const ListStateContext = ListBoxStateContext;\n\n/**\n * A listbox displays a list of options and allows a user to select one or more of them.\n */\nexport function ListBox<T>(props: ListBoxProps<T>): JSX.Element {\n const parentContext = useContext(ListBoxContext) as ListBoxContextValue<T> | null;\n const contextSlotProps = parentContext?.slots?.[props.slot ?? \"default\"];\n const mergedListBoxProps = contextSlotProps\n ? (mergeProps(contextSlotProps, props) as ListBoxProps<T>)\n : props;\n const [local, stateProps, ariaProps] = splitProps(\n mergedListBoxProps,\n [\n \"children\",\n \"class\",\n \"style\",\n \"slot\",\n \"renderEmptyState\",\n \"hasMore\",\n \"isLoading\",\n \"onLoadMore\",\n \"dragAndDropHooks\",\n \"slots\",\n \"ref\",\n ],\n [\n \"items\",\n \"getKey\",\n \"getTextValue\",\n \"getDisabled\",\n \"disabledKeys\",\n \"disabledBehavior\",\n \"selectionMode\",\n \"selectionBehavior\",\n \"selectedKeys\",\n \"defaultSelectedKeys\",\n \"onSelectionChange\",\n \"layout\",\n \"orientation\",\n ],\n );\n\n const flatItems = createMemo<T[]>(() => {\n return flattenCollectionEntries(stateProps.items);\n });\n\n const hasSections = createMemo(() => stateProps.items.some((item) => isCollectionSection(item)));\n\n const baseState = createListState<T>({\n get items() {\n return flatItems();\n },\n get getKey() {\n return stateProps.getKey;\n },\n get getTextValue() {\n return stateProps.getTextValue;\n },\n get getDisabled() {\n return stateProps.getDisabled;\n },\n get disabledKeys() {\n return stateProps.disabledKeys;\n },\n get selectionMode() {\n return stateProps.selectionMode;\n },\n get selectionBehavior() {\n return stateProps.selectionBehavior;\n },\n get disabledBehavior() {\n return stateProps.disabledBehavior;\n },\n get selectedKeys() {\n return stateProps.selectedKeys;\n },\n get defaultSelectedKeys() {\n return stateProps.defaultSelectedKeys;\n },\n get onSelectionChange() {\n return stateProps.onSelectionChange;\n },\n });\n\n // When this ListBox is the collection of an Autocomplete, the input and the\n // collection are separate components bridged by context. The collection's\n // state is filtered by the input's predicate (mirrors RAC's\n // UNSTABLE_useFilteredListState), and virtual focus is driven across the\n // component boundary by synthetic DOM events (see the bridge effects below).\n // ComboBox/Picker never provide this context, so their createListBox path is\n // untouched.\n const autocompleteCtx = useAutocompleteCollection();\n const state = autocompleteCtx\n ? createFilteredListState<T>(\n baseState,\n () => autocompleteCtx.filter as ListFilterFn<T> | undefined,\n )\n : baseState;\n\n const resolveDisabled = (): boolean => {\n const disabled = ariaProps.isDisabled;\n if (typeof disabled === \"function\") {\n return (disabled as () => boolean)();\n }\n return !!disabled;\n };\n\n const locale = useLocale();\n // A parent Virtualizer publishes `isVirtualized` through the collection\n // renderer context; the base ListBox forwards it into createListBox so each\n // option emits aria-posinset/aria-setsize for the windowed (incomplete) DOM.\n const parentCollectionRenderer = useCollectionRenderer<unknown>();\n const listBoxAria = createListBox(\n {\n ...ariaProps,\n get isVirtualized() {\n return parentCollectionRenderer?.isVirtualized ?? ariaProps.isVirtualized;\n },\n // Under Autocomplete, the input owns the collection's id (its\n // aria-controls target), accessible name, and virtual-focus/type-ahead\n // config; prefer the bridged values over any locally-passed props.\n get id() {\n return autocompleteCtx?.collectionProps.id ?? (ariaProps as { id?: string }).id;\n },\n get \"aria-label\"() {\n return autocompleteCtx?.collectionProps[\"aria-label\"] ?? ariaProps[\"aria-label\"];\n },\n get shouldUseVirtualFocus() {\n return (\n autocompleteCtx?.collectionProps.shouldUseVirtualFocus ?? ariaProps.shouldUseVirtualFocus\n );\n },\n get disallowTypeAhead() {\n return autocompleteCtx?.collectionProps.disallowTypeAhead ?? ariaProps.disallowTypeAhead;\n },\n get isDisabled() {\n return resolveDisabled();\n },\n get orientation() {\n return stateProps.orientation ?? \"vertical\";\n },\n get direction() {\n return locale().direction;\n },\n },\n state,\n () => listRef(),\n );\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n const renderValues = createMemo<ListBoxRenderProps>(() => ({\n isFocused: state.isFocused() || isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: resolveDisabled(),\n isEmpty: state.collection().size === 0,\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-ListBox\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n return filtered;\n });\n\n const cleanListBoxProps = () => {\n const { ref: _ref1, ...rest } = listBoxAria.listBoxProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref2, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanLabelProps = () => {\n const { ref: _ref3, ...rest } = listBoxAria.labelProps as Record<string, unknown>;\n return rest;\n };\n const [listRef, setListRef] = createSignal<HTMLElement | null>(null);\n\n // Reveal the activedescendant-focused option on keyboard navigation. The\n // listbox keeps real DOM focus on itself, so the browser won't natively scroll\n // an off-screen focused option into view the way roving tabindex would.\n createScrollIntoViewOnFocus({\n focusedKey: () => state.focusedKey(),\n isActive: () => state.isFocused(),\n ref: () => listRef(),\n });\n\n // Autocomplete bridge. createListBox reimplements navigation inline (it does\n // not route through createSelectableCollection), so the virtual-focus event\n // wiring the Autocomplete input relies on lives here, gated on the bridge\n // context. This mirrors createSelectableCollection's FOCUS_EVENT/CLEAR_FOCUS_EVENT\n // handlers and useSelectableItem's per-item moveVirtualFocus, at the component\n // layer, without touching the shared hooks (protecting ComboBox/Picker).\n if (autocompleteCtx) {\n // Forward path: the input dispatches FOCUS_EVENT/CLEAR_FOCUS_EVENT onto the\n // collection element. FOCUS_EVENT marks the collection focused (and, when the\n // user types forward, requests the first item); the actual arrow navigation\n // arrives as a re-dispatched KeyboardEvent handled by createListBox's onKeyDown.\n let shouldVirtualFocusFirst = false;\n createEffect(() => {\n const list = listRef();\n if (!list) return;\n const onFocusEvent = (e: Event) => {\n const detail = (e as CustomEvent).detail;\n e.stopPropagation();\n state.setFocused(true);\n if (detail?.focusStrategy === \"first\") {\n shouldVirtualFocusFirst = true;\n }\n };\n const onClearFocusEvent = (e: Event) => {\n e.stopPropagation();\n state.setFocused(false);\n if ((e as CustomEvent).detail?.clearFocusKey) {\n state.setFocusedKey(null);\n }\n };\n list.addEventListener(FOCUS_EVENT, onFocusEvent);\n list.addEventListener(CLEAR_FOCUS_EVENT, onClearFocusEvent);\n onCleanup(() => {\n list.removeEventListener(FOCUS_EVENT, onFocusEvent);\n list.removeEventListener(CLEAR_FOCUS_EVENT, onClearFocusEvent);\n });\n });\n\n // Focus the first item once the (filtered) collection settles after the user\n // types forward. If nothing survives the filter, clear the input's active\n // descendant by moving virtual focus onto the collection itself (its focusin\n // reaches the input's clear branch). Mirrors useSelectableCollection.\n createEffect(\n on(\n () => [state.collection().getFirstKey?.() ?? null, state.collection().size] as const,\n ([firstKey, size]) => {\n if (!shouldVirtualFocusFirst) return;\n if (firstKey == null) {\n const list = listRef();\n if (list) moveVirtualFocus(list);\n if (size > 0) shouldVirtualFocusFirst = false;\n } else {\n state.setFocusedKey(firstKey);\n shouldVirtualFocusFirst = false;\n }\n },\n { defer: true },\n ),\n );\n\n // Reverse path: mirror the focused key onto the option's DOM element via a\n // synthetic, bubbling focusin (moveVirtualFocus). The input's focusin listener\n // reads target.id into its aria-activedescendant. Option ids are String(key)\n // in this path (createOption). Real DOM focus stays on the input.\n createEffect(() => {\n const key = state.focusedKey();\n const list = listRef();\n if (!list || !state.isFocused()) return;\n if (key == null) return;\n const el = list.ownerDocument.getElementById(String(key));\n if (el) moveVirtualFocus(el);\n });\n }\n\n const isEmpty = () => stateProps.items.length === 0;\n const getItemNodes = createMemo(() =>\n Array.from(state.collection()).filter((node) => node.type === \"item\"),\n );\n const getDropTargetByIndex = (\n index: number,\n position: \"before\" | \"after\" | \"on\",\n ): DropTarget | null => {\n const node = getItemNodes()[index];\n if (!node) return null;\n return { type: \"item\", key: node.key, dropPosition: position };\n };\n const hasDroppableDnd = createMemo(() => {\n const hooks = local.dragAndDropHooks;\n return Boolean(\n hooks?.useDroppableCollectionState &&\n hooks.useDroppableCollection &&\n (hooks.dropTargetDelegate ||\n parentCollectionRenderer?.dropTargetDelegate ||\n hooks.ListDropTargetDelegate),\n );\n });\n const dropState = createMemo(() => {\n if (!hasDroppableDnd()) return undefined;\n return local.dragAndDropHooks?.useDroppableCollectionState?.({});\n });\n const hasDraggableDnd = createMemo(() => {\n const hooks = local.dragAndDropHooks;\n return Boolean(hooks?.useDraggableCollectionState && hooks.useDraggableCollection);\n });\n const dragState = createMemo(() => {\n if (!hasDraggableDnd()) return undefined;\n return local.dragAndDropHooks?.useDraggableCollectionState?.({\n items: flatItems(),\n });\n });\n createEffect(() => {\n if (!hasDraggableDnd()) return;\n const hooks = local.dragAndDropHooks;\n const activeDragState = dragState();\n if (!hooks?.useDraggableCollection || !activeDragState) return;\n hooks.useDraggableCollection({}, activeDragState, () => listRef());\n });\n const droppableCollection = createMemo(() => {\n if (!hasDroppableDnd()) return undefined;\n const hooks = local.dragAndDropHooks;\n const activeDropState = dropState();\n if (!hooks?.useDroppableCollection || !activeDropState) return undefined;\n const resolveDirection = (): \"ltr\" | \"rtl\" => {\n const el = listRef();\n if (el && typeof window !== \"undefined\" && typeof window.getComputedStyle === \"function\") {\n const dir = window.getComputedStyle(el).direction;\n if (dir === \"rtl\") return \"rtl\";\n }\n return typeof document !== \"undefined\" && document.dir === \"rtl\" ? \"rtl\" : \"ltr\";\n };\n const dropTargetDelegate =\n hooks.dropTargetDelegate ??\n parentCollectionRenderer?.dropTargetDelegate ??\n (hooks.ListDropTargetDelegate\n ? new hooks.ListDropTargetDelegate(\n () => state.collection(),\n () => listRef(),\n { layout: \"stack\", orientation: \"vertical\", direction: resolveDirection() },\n )\n : undefined);\n if (!dropTargetDelegate) return undefined;\n return hooks.useDroppableCollection(\n {\n dropTargetDelegate,\n keyboardDelegate: {\n getFirstKey: () => state.collection().getFirstKey(),\n getLastKey: () => state.collection().getLastKey(),\n getKeyBelow: (key) => state.collection().getKeyAfter(key),\n getKeyAbove: (key) => state.collection().getKeyBefore(key),\n getKeyPageBelow: (key) => state.collection().getKeyAfter(key),\n getKeyPageAbove: (key) => state.collection().getKeyBefore(key),\n },\n // The real collection drives keyboard drop-target navigation\n // (`navigate()` walks getKeyAfter/getKeyBefore) and post-drop focus\n // restoration. Reading it here re-registers the drop target when the\n // collection changes (mirrors upstream keying its effect on the state).\n collection: state.collection(),\n selectedKeys: state.selectionManager.selectedKeys,\n setSelectedKeys: (keys) => state.selectionManager.setSelectedKeys(keys),\n setFocusedKey: (key) => state.setFocusedKey(key),\n },\n activeDropState,\n () => listRef(),\n );\n });\n const isRootDropTarget = createMemo(() => {\n return Boolean(dropState()?.target?.type === \"root\");\n });\n const dndRenderDropIndicator = createMemo(() =>\n useRenderDropIndicator(local.dragAndDropHooks, dropState()),\n );\n const dndDropIndicator = (index: number, position: \"before\" | \"after\" | \"on\") => {\n const target = getDropTargetByIndex(index, position);\n if (!target || target.type !== \"item\") return undefined;\n return dndRenderDropIndicator()?.(target);\n };\n\n // ── Drop indicator (Fix B: labeled, self-focusing) ─────────────────────────\n // The port of react-aria-components' ListBoxDropIndicatorWrapper +\n // useDropIndicator. The droppable-collection state layer diverged to a minimal\n // reactive target-holder with no collection reference, so the label (which\n // needs the collection's text values) and the self-focus (which needs the live\n // drag session) are computed here in the host layer, where both are available.\n const dndFormatter = createStringFormatter(dndIntlStrings);\n const dragSession = createDragSession();\n const dropIndicatorTargetsEqual = (\n a: DropTarget | null | undefined,\n b: ItemDropTarget,\n ): boolean =>\n !!a && a.type === \"item\" && a.key === b.key && a.dropPosition === b.dropPosition;\n // Faithful port of useDropIndicator's label logic: \"Drop on X\" for an on-item\n // target, else \"Insert between X and Y\" / \"Insert before X\" / \"Insert after X\"\n // resolved from the target's neighbours in the collection.\n const dropIndicatorLabel = (target: ItemDropTarget): string => {\n const collection = state.collection();\n const getText = (key: Key | null): string => {\n if (key == null) return \"\";\n return collection.getTextValue(key) ?? collection.getItem(key)?.textValue ?? \"\";\n };\n if (target.dropPosition === \"on\") {\n return dndFormatter().format(\"dropOnItem\", { itemText: getText(target.key) });\n }\n let before: Key | null;\n let after: Key | null;\n if (target.dropPosition === \"before\") {\n const prevKey = collection.getKeyBefore(target.key);\n const prevNode = prevKey != null ? collection.getItem(prevKey) : null;\n before = prevNode?.type === \"item\" ? prevNode.key : null;\n } else {\n before = target.key;\n }\n if (target.dropPosition === \"after\") {\n const nextKey = collection.getKeyAfter(target.key);\n const nextNode = nextKey != null ? collection.getItem(nextKey) : null;\n after = nextNode?.type === \"item\" ? nextNode.key : null;\n } else {\n after = target.key;\n }\n if (before != null && after != null) {\n return dndFormatter().format(\"insertBetween\", {\n beforeItemText: getText(before),\n afterItemText: getText(after),\n });\n }\n if (before != null) {\n return dndFormatter().format(\"insertAfter\", { itemText: getText(before) });\n }\n if (after != null) {\n return dndFormatter().format(\"insertBefore\", { itemText: getText(after) });\n }\n return \"\";\n };\n // Wrap the raw Set<string> the DragManager hands drop items into the DragTypes\n // delegate the port state expects (mirrors createDroppableCollection.wrapTypes).\n const wrapDropTypes = (types: Set<string>) => ({\n has: (type: string | string[]) => {\n if (typeof type === \"string\") return types.has(type);\n if (Array.isArray(type)) return type.some((t) => typeof t === \"string\" && types.has(t));\n return false;\n },\n });\n const ListBoxDropIndicator = (props: { target: ItemDropTarget }): JSX.Element => {\n const [indicatorRef, setIndicatorRef] = createSignal<HTMLDivElement | null>(null);\n const isDropTarget = createMemo(() =>\n dropIndicatorTargetsEqual(dropState()?.target, props.target),\n );\n // aria-hidden mirrors useDropIndicator: outside a drag session, or on a\n // non-active target, the indicator is hidden from AT ('true'); the active\n // target during a session is exposed (undefined). isHidden then tells us\n // whether to omit the element entirely (RAC returns null when hidden).\n const ariaHidden = createMemo(() =>\n !dragSession() ? \"true\" : isDropTarget() ? undefined : \"true\",\n );\n const isHidden = createMemo(() => !isDropTarget() && !!ariaHidden());\n // Faithful port of useDroppableItem. Registration (of the indicator element as\n // a DragManager droppable item) and the self-focus must happen in one effect,\n // registration first: the DragManager's onFocus keys off the dropItems map, so\n // if the element self-focused before it was registered, onFocus would treat it\n // as an unknown target and redirect focus back to the collection (a pickup\n // bounce). React's two useDroppableItem effects run in guaranteed order after\n // the ref is attached; Solid's independent effects race, so we fuse them. The\n // dropItems map keys off live elements — the ref nulls itself on Show cleanup\n // (below), so a hidden indicator unregisters instead of lingering as a stale\n // detached entry.\n createEffect(() => {\n const el = indicatorRef();\n if (!el) return;\n const unregister = registerDropItem({\n element: el,\n target: props.target,\n getDropOperation: (types, allowedOperations) => {\n const st = dropState();\n if (!st) return \"cancel\";\n // Thread the same drag identity the collection uses (see\n // createDroppableCollection.isInternalDropOperation): an internal\n // keyboard reorder must report `isInternal` so the state's feature\n // detection keeps before/after indicators valid (and rejects \"on\" for a\n // reorder-only host). Without it every indicator would return \"cancel\"\n // and drop out of the DragManager's ariaHideOutside keep-set.\n const isInternal = getGlobalDraggingCollectionRef() === listRef();\n return st.getDropOperation(\n props.target,\n wrapDropTypes(types) as Parameters<typeof st.getDropOperation>[1],\n allowedOperations,\n isInternal,\n getGlobalDraggingKeys(),\n );\n },\n });\n onCleanup(unregister);\n // While a drag session is active, the current drop target moves real DOM\n // focus onto itself, so keyboard drop navigation lands on the labeled\n // insertion point rather than the collection element. The self-focus is\n // deferred to an animation frame to mirror upstream's timing: in\n // useDroppableItem the focus is a *passive* useEffect, so it commits only\n // after the browser's microtask checkpoint. That ordering matters because\n // the DragManager keeps the active drop indicator visible via\n // ariaHideOutside, whose keep-set is `[dragSource, ...registered drop\n // items]` (the collection is dropped from the set once it owns items). A\n // freshly-mounted indicator is momentarily `inert` — it only leaves the\n // keep-set's blind spot once the DragManager's MutationObserver re-runs\n // updateValidDropTargets on a later microtask. Focusing synchronously (or\n // on a microtask) would call .focus() while the element is still inert and\n // silently no-op; the animation frame runs after that refresh, exactly as\n // React's passive effect does.\n if (dragSession() && isDropTarget()) {\n requestAnimationFrame(() => {\n if (dragSession() && isDropTarget() && indicatorRef() === el) {\n el.focus();\n }\n });\n }\n });\n return (\n <Show when={!isHidden()}>\n <div\n ref={(el) => {\n setIndicatorRef(el);\n onCleanup(() => setIndicatorRef(null));\n }}\n role=\"option\"\n class=\"solidaria-DropIndicator\"\n aria-roledescription={dndFormatter().format(\"dropIndicator\")}\n aria-label={dropIndicatorLabel(props.target)}\n aria-hidden={ariaHidden()}\n tabindex={-1}\n data-drop-target={isDropTarget() || undefined}\n />\n </Show>\n );\n };\n const dropIndicatorContextValue = {\n render: (p: DropIndicatorProps) => <ListBoxDropIndicator target={p.target} />,\n };\n\n const virtualizer = useVirtualizerContext();\n const persistedKeys = useDndPersistedKeys(\n { focusedKey: state.focusedKey },\n local.dragAndDropHooks,\n dropState(),\n state.collection(),\n );\n const virtualRange = createMemo(() => {\n if (!virtualizer || !parentCollectionRenderer?.isVirtualized || hasSections()) return null;\n const baseRange = virtualizer.getVisibleRange(stateProps.items.length);\n const itemNodes = getItemNodes();\n const persistedIndexes = Array.from(persistedKeys())\n .map((key) => itemNodes.findIndex((node) => node.key === key))\n .filter((index) => index >= 0);\n const dropTarget = dropState()?.target;\n const normalizedDropKey = getNormalizedDropTargetKey(dropTarget, state.collection());\n const focusedKey = state.focusedKey();\n const focusedIndex =\n focusedKey != null ? itemNodes.findIndex((node) => node.key === focusedKey) : -1;\n const forceIncludeIndexes = [\n dropTarget?.type === \"item\" ? itemNodes.findIndex((node) => node.key === dropTarget.key) : -1,\n normalizedDropKey != null\n ? itemNodes.findIndex((node) => node.key === normalizedDropKey)\n : -1,\n dropTarget?.type === \"item\" ? -1 : focusedIndex,\n ].filter((index) => index >= 0);\n return mergePersistedKeysIntoVirtualRange(\n baseRange,\n persistedIndexes,\n stateProps.items.length,\n virtualizer,\n 80,\n {\n forceIncludeIndexes,\n forceIncludeMaxSpan: 320,\n },\n );\n });\n createEffect(() => {\n if (!virtualizer || !parentCollectionRenderer?.isVirtualized) return;\n const getItemNodes = () =>\n Array.from(state.collection()).filter((node) => node.type === \"item\");\n virtualizer.setDropTargetItemCountResolver(() => getItemNodes().length);\n virtualizer.setDropTargetIndexResolver((key) => {\n const index = getItemNodes().findIndex((node) => node.key === key);\n return index >= 0 ? index : null;\n });\n virtualizer.setDropTargetResolver((target) => {\n const node = getItemNodes()[target.index];\n if (!node) return target;\n return {\n ...target,\n key: typeof node.key === \"string\" || typeof node.key === \"number\" ? node.key : undefined,\n };\n });\n onCleanup(() => {\n virtualizer.setDropTargetIndexResolver(undefined);\n virtualizer.setDropTargetItemCountResolver(undefined);\n virtualizer.setDropTargetResolver(undefined);\n });\n });\n const visibleItems = createMemo(() => {\n const range = virtualRange();\n if (!range) return stateProps.items;\n return stateProps.items.slice(range.start, range.end);\n });\n // Spacers reserve the windowed-out extent along the virtualizer's primary axis,\n // so a horizontal layout offsets along width rather than height.\n const virtualSpacerStyle = (size: number): JSX.CSSProperties =>\n virtualizer?.orientation === \"horizontal\" ? { width: `${size}px` } : { height: `${size}px` };\n const sectionedRenderEntries = createMemo(() => {\n let globalIndex = 0;\n return stateProps.items.map((entry) => {\n if (isCollectionSection(entry)) {\n const sectionItems = entry.items.map((item) => ({\n item,\n index: globalIndex++,\n }));\n return {\n type: \"section\" as const,\n section: entry,\n items: sectionItems,\n };\n }\n const indexedItem = {\n item: entry as T,\n index: globalIndex++,\n };\n return {\n type: \"item\" as const,\n item: indexedItem,\n };\n });\n });\n const collectionRenderer = createMemo<CollectionRendererContextValue<unknown>>(() => ({\n ...parentCollectionRenderer,\n renderItem: (item) => local.children(item as T),\n renderDropIndicator: (index, position) =>\n dndDropIndicator(index, position) ??\n parentCollectionRenderer?.renderDropIndicator?.(index, position),\n }));\n\n return (\n <ListBoxContext.Provider\n value={\n {\n state,\n isDisabled: resolveDisabled,\n dragAndDropHooks: local.dragAndDropHooks as DragAndDropHooks<unknown> | undefined,\n dragState: dragState(),\n dropState: dropState(),\n slots: local.slots,\n } as ListBoxContextValue<unknown>\n }\n >\n <ListBoxStateContext.Provider value={state}>\n <CollectionRendererContext.Provider value={collectionRenderer()}>\n <DropIndicatorContext.Provider value={dropIndicatorContextValue}>\n <>\n <Show when={ariaProps.label}>\n <span {...cleanLabelProps()}>{ariaProps.label as JSX.Element}</span>\n </Show>\n <div\n {...mergeProps(\n domProps(),\n cleanListBoxProps(),\n cleanFocusProps(),\n (droppableCollection()?.collectionProps as Record<string, unknown> | undefined) ??\n {},\n )}\n ref={(el) => {\n setListRef(el);\n assignRef(local.ref, el);\n autocompleteCtx?.collectionRef(el);\n }}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={state.isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={resolveDisabled() || undefined}\n data-empty={isEmpty() || undefined}\n data-layout={stateProps.layout}\n data-orientation={stateProps.orientation}\n data-drop-target={isRootDropTarget() || undefined}\n slot={local.slot}\n >\n <SharedElementTransition>\n {isEmpty() && local.renderEmptyState ? (\n <div role=\"option\" style={{ display: \"contents\" }} data-empty-state>\n {local.renderEmptyState()}\n </div>\n ) : hasSections() ? (\n <For each={sectionedRenderEntries()}>\n {(entry) =>\n entry.type === \"section\" ? (\n <div role=\"presentation\" data-section-wrapper>\n <Section class=\"solidaria-ListBox-section\">\n {entry.section.title != null && (\n <Header class=\"solidaria-ListBox-sectionHeader\">\n {entry.section.title}\n </Header>\n )}\n <Group class=\"solidaria-ListBox-sectionGroup\">\n <div role=\"group\" aria-label={entry.section[\"aria-label\"]}>\n <For each={entry.items}>\n {(indexedItem) => (\n <>\n {collectionRenderer().renderDropIndicator?.(\n indexedItem.index,\n \"before\",\n )}\n {collectionRenderer().renderDropIndicator?.(\n indexedItem.index,\n \"on\",\n )}\n {local.children(indexedItem.item)}\n {collectionRenderer().renderDropIndicator?.(\n indexedItem.index,\n \"after\",\n )}\n </>\n )}\n </For>\n </div>\n </Group>\n </Section>\n </div>\n ) : (\n <>\n {collectionRenderer().renderDropIndicator?.(entry.item.index, \"before\")}\n {collectionRenderer().renderDropIndicator?.(entry.item.index, \"on\")}\n {local.children(entry.item.item)}\n {collectionRenderer().renderDropIndicator?.(entry.item.index, \"after\")}\n </>\n )\n }\n </For>\n ) : (\n <>\n {virtualRange()?.offsetTop ? (\n <div\n role=\"presentation\"\n aria-hidden=\"true\"\n style={virtualSpacerStyle(virtualRange()!.offsetTop)}\n data-virtualizer-spacer=\"top\"\n />\n ) : null}\n <For each={visibleItems()}>\n {(item, index) => {\n const itemIndex = () => (virtualRange()?.start ?? 0) + index();\n const beforeIndicator = () =>\n collectionRenderer().renderDropIndicator?.(itemIndex(), \"before\");\n const onIndicator = () =>\n collectionRenderer().renderDropIndicator?.(itemIndex(), \"on\");\n const afterIndicator = () =>\n collectionRenderer().renderDropIndicator?.(itemIndex(), \"after\");\n return (\n <>\n {beforeIndicator()}\n {onIndicator()}\n {local.children(item as T)}\n {afterIndicator()}\n </>\n );\n }}\n </For>\n {virtualRange()?.offsetBottom ? (\n <div\n role=\"presentation\"\n aria-hidden=\"true\"\n style={virtualSpacerStyle(virtualRange()!.offsetBottom)}\n data-virtualizer-spacer=\"bottom\"\n />\n ) : null}\n </>\n )}\n </SharedElementTransition>\n {local.hasMore && local.onLoadMore && (\n <ListBoxLoadMoreItem onLoadMore={local.onLoadMore} isLoading={local.isLoading} />\n )}\n </div>\n </>\n </DropIndicatorContext.Provider>\n </CollectionRendererContext.Provider>\n </ListBoxStateContext.Provider>\n </ListBoxContext.Provider>\n );\n}\n\n/**\n * An option in a listbox.\n */\nexport function ListBoxOption<T>(props: ListBoxOptionProps<T>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n \"class\",\n \"style\",\n \"slot\",\n \"id\",\n \"item\",\n \"textValue\",\n \"ref\",\n ]);\n\n const context = useContext(ListBoxStateContext);\n if (!context) {\n throw new Error(\"ListBoxOption must be used within a ListBox\");\n }\n const state = context as ListState<T>;\n const listContext = useContext(ListBoxContext) as ListBoxContextValue<T> | null;\n const [ref, setRef] = createSignal<HTMLDivElement | null>(null);\n\n const optionAria = createOption<T>(\n {\n key: local.id,\n get isDisabled() {\n return Boolean(ariaProps.isDisabled || listContext?.isDisabled());\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"] ?? local.textValue;\n },\n get shouldSelectOnPressUp() {\n return ariaProps.shouldSelectOnPressUp;\n },\n get shouldFocusOnHover() {\n return ariaProps.shouldFocusOnHover;\n },\n get onHoverStart() {\n return ariaProps.onHoverStart;\n },\n get onHoverEnd() {\n return ariaProps.onHoverEnd;\n },\n get onHoverChange() {\n return ariaProps.onHoverChange;\n },\n },\n state,\n ref,\n );\n\n const renderValues = createMemo<ListBoxOptionRenderProps>(() => ({\n isSelected: optionAria.isSelected(),\n isFocused: optionAria.isFocused(),\n isFocusVisible: optionAria.isFocusVisible(),\n isPressed: optionAria.isPressed(),\n isHovered: optionAria.isHovered(),\n isDisabled: optionAria.isDisabled(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-ListBox-option\",\n },\n renderValues,\n );\n const hasPrimitiveLabel = () => {\n return typeof props.children === \"string\" || typeof props.children === \"number\";\n };\n\n const selectionIndicatorContext = createMemo<SelectionIndicatorContextValue>(() => ({\n isSelected: optionAria.isSelected,\n }));\n const draggableItem = createMemo(() => {\n if (!listContext?.dragAndDropHooks?.useDraggableItem || !listContext.dragState)\n return undefined;\n return listContext.dragAndDropHooks.useDraggableItem(\n {\n key: local.id as string | number,\n // Surfaces the drag-affordance description (aria-describedby) only for\n // selectable collections, mirroring upstream useDraggableItem.\n selectionMode: state.selectionManager.selectionMode,\n },\n listContext.dragState as Parameters<NonNullable<DragAndDropHooks<T>[\"useDraggableItem\"]>>[1],\n );\n });\n const droppableItem = createMemo(() => {\n if (!listContext?.dragAndDropHooks?.useDroppableItem || !listContext.dropState)\n return undefined;\n return listContext.dragAndDropHooks.useDroppableItem(\n {\n key: local.id as string | number,\n },\n listContext.dropState as Parameters<NonNullable<DragAndDropHooks<T>[\"useDroppableItem\"]>>[1],\n () => ref(),\n );\n });\n\n const cleanOptionProps = () => {\n const {\n ref: _ref1,\n \"aria-describedby\": _ariaDescribedby,\n ...rest\n } = optionAria.optionProps as Record<string, unknown>;\n if (!hasPrimitiveLabel() && rest[\"aria-label\"] == null) {\n delete rest[\"aria-labelledby\"];\n }\n return rest;\n };\n const domProps = () => filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n\n return (\n <SelectionIndicatorContext.Provider value={selectionIndicatorContext()}>\n <div\n ref={(el) => {\n setRef(el);\n assignRef(local.ref, el);\n }}\n {...mergeProps(\n domProps(),\n cleanOptionProps(),\n (draggableItem()?.dragProps as Record<string, unknown> | undefined) ?? {},\n (droppableItem()?.dropProps as Record<string, unknown> | undefined) ?? {},\n )}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={optionAria.isSelected() || undefined}\n data-focused={optionAria.isFocused() || undefined}\n data-focus-visible={optionAria.isFocusVisible() || undefined}\n data-pressed={optionAria.isPressed() || undefined}\n data-hovered={optionAria.isHovered() || undefined}\n data-disabled={optionAria.isDisabled() || undefined}\n data-dragging={draggableItem()?.isDragging || undefined}\n data-drop-target={droppableItem()?.isDropTarget || undefined}\n slot={local.slot}\n >\n {hasPrimitiveLabel() ? (\n <span {...optionAria.labelProps}>{renderProps.renderChildren()}</span>\n ) : (\n renderProps.renderChildren()\n )}\n </div>\n </SelectionIndicatorContext.Provider>\n );\n}\n\n/**\n * Load more sentinel item for listbox collections.\n */\nexport function ListBoxLoadMoreItem(props: ListBoxLoadMoreItemProps): JSX.Element {\n let sentinelRef: HTMLDivElement | undefined;\n const [isPending, setIsPending] = createSignal(false);\n\n const isLoading = () => !!props.isLoading || isPending();\n\n const triggerLoadMore = async () => {\n if (isLoading()) return;\n setIsPending(true);\n try {\n await props.onLoadMore();\n } finally {\n setIsPending(false);\n }\n };\n\n createEffect(() => {\n if (!sentinelRef || typeof IntersectionObserver !== \"function\") return;\n\n const offset = props.scrollOffset ?? 1;\n const margin = `0px 0px ${100 * offset}% 0px`;\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries[0]?.isIntersecting) {\n void triggerLoadMore();\n }\n },\n { rootMargin: margin },\n );\n\n observer.observe(sentinelRef);\n return () => observer.disconnect();\n });\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children ?? (() => (isLoading() ? \"Loading more...\" : \"Load more\"));\n },\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-ListBox-loadMore\",\n },\n () => ({ isLoading: isLoading() }),\n );\n\n return (\n <>\n <div style={{ position: \"relative\", width: 0, height: 0, overflow: \"hidden\" }} inert>\n <div ref={sentinelRef} style={{ position: \"absolute\", height: \"1px\", width: \"1px\" }} />\n </div>\n <div\n role=\"option\"\n aria-disabled={true}\n tabIndex={0}\n onFocus={() => {\n void triggerLoadMore();\n }}\n class={renderProps.class()}\n style={renderProps.style()}\n data-loading={isLoading() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n </>\n );\n}\n\n/**\n * Section primitive alias for ListBox composition parity.\n */\nexport function ListBoxSection(props: ListBoxSectionProps): JSX.Element {\n return <Section {...props} />;\n}\n\nListBox.Option = ListBoxOption;\nListBox.LoadMoreItem = ListBoxLoadMoreItem;\n"],"mappings":";;;;;;;;;;;;;;;;;AAkGA,SAAS,UAAa,KAAiB,IAAa;CAClD,IAAI,CAAC,KAAK;CACV,IAAI,OAAO,QAAQ,YAAY,IAAI,EAAE;MAChC,IAAI,UAAU;AACrB;AA8GA,MAAa,iBAAiB,cAAmD,IAAI;AACrF,MAAa,sBAAsB,cAAyC,IAAI;AAChF,MAAa,mBAAmB;;;;AAKhC,SAAgB,QAAW,OAAqC;CAE9D,MAAM,mBADgB,WAAW,cACI,CAAC,EAAE,QAAQ,MAAM,QAAQ;CAI9D,MAAM,CAAC,OAAO,YAAY,aAAa,WAHZ,mBACtBA,aAAW,kBAAkB,KAAK,IACnC,OAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,GACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CAEA,MAAM,YAAY,iBAAsB;EACtC,OAAO,yBAAyB,WAAW,KAAK;CAClD,CAAC;CAED,MAAM,cAAc,iBAAiB,WAAW,MAAM,MAAM,SAAS,oBAAoB,IAAI,CAAC,CAAC;CAE/F,MAAM,YAAY,gBAAmB;EACnC,IA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EA,QAAQ,SAAS;AACjB,QAAQ,eAAe"}
1
+ {"version":3,"file":"ListBox.jsx","names":["assignRef"],"sources":["../src/ListBox.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 */\n\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria-components/src/ListBox.tsx\n\n/**\n * ListBox component for solidaria-components\n *\n * A pre-wired headless listbox that combines state + aria hooks.\n * Solid adaptation of the pinned ListBox component.\n */\n\nimport {\n createContext,\n createEffect,\n createMemo,\n createRenderEffect,\n createSignal,\n onCleanup,\n untrack,\n useContext,\n For,\n Show,\n createTrackedEffect,\n} from \"solid-js\";\nimport type { Context, Accessor } from \"solid-js\";\nimport type { JSX } from \"@solidjs/web\";\nimport {\n createListBox,\n createOption,\n createFocusRing,\n createScrollIntoViewOnFocus,\n createStringFormatter,\n dndIntlStrings,\n mergeProps,\n moveVirtualFocus,\n useLocale,\n FOCUS_EVENT,\n CLEAR_FOCUS_EVENT,\n type AriaListBoxProps,\n type AriaOptionProps,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n createListState,\n createFilteredListState,\n type ListState,\n type ListFilterFn,\n type Key,\n type DropTarget,\n type DroppableCollectionState,\n type Collection,\n} from \"@proyecto-viviana/solid-stately\";\nimport { useAutocompleteCollection } from \"./Autocomplete\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n DEFAULT_SLOT,\n OptionContent,\n Provider,\n useRenderProps,\n filterDOMProps,\n dataAttr,\n} from \"./utils\";\nimport { TextContext } from \"./Text\";\nimport { SharedElementTransition } from \"./SharedElementTransition\";\nimport {\n SelectionIndicatorContext,\n type SelectionIndicatorContextValue,\n} from \"./SelectionIndicator\";\nimport { useVirtualizerContext, PersistedVirtualItem, VirtualizerItem } from \"./Virtualizer\";\nimport { type DragAndDropHooks } from \"./useDragAndDrop\";\nimport {\n getNormalizedDropTargetKey,\n indexesOutsideRange,\n mergePersistedKeysIntoVirtualRange,\n useDndPersistedKeys,\n useRenderDropIndicator,\n DropIndicatorContext,\n type DropIndicatorProps,\n} from \"./DragAndDrop\";\nimport type { ItemDropTarget } from \"@proyecto-viviana/solid-stately\";\nimport { splitProps } from \"@proyecto-viviana/solidaria/utils\";\nimport {\n CollectionRendererContext,\n Section,\n Header,\n Group,\n type CollectionEntry,\n type CollectionRendererContextValue,\n type CollectionSection,\n type SectionProps,\n useCollectionRenderer,\n useCollectionRoot,\n isCollectionSection,\n flattenCollectionEntries,\n} from \"./Collection\";\n\nexport interface ListBoxRenderProps {\n /** Whether the listbox has focus. */\n isFocused: boolean;\n /** Whether the listbox has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the listbox is disabled. */\n isDisabled: boolean;\n /** Whether the listbox is empty. */\n isEmpty: boolean;\n}\n\ntype RefLike<T> = ((el: T) => void) | { current?: T | null } | undefined;\n\nfunction assignRef<T>(ref: RefLike<T>, el: T): void {\n if (!ref) return;\n if (typeof ref === \"function\") ref(el);\n else ref.current = el;\n}\n\nexport interface ListBoxProps<T> extends Omit<AriaListBoxProps, \"children\">, SlotProps {\n /** The items to render in the listbox. */\n items: CollectionEntry<T>[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item. */\n getTextValue?: (item: T) => string;\n /** Function to check if an item is disabled. */\n getDisabled?: (item: T) => boolean;\n /** The selection mode. */\n selectionMode?: \"none\" | \"single\" | \"multiple\";\n /** The selection behavior (toggle vs replace). */\n selectionBehavior?: \"toggle\" | \"replace\";\n /** Whether disabled items can still receive focus. */\n disabledBehavior?: \"selection\" | \"all\";\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** Currently selected keys (controlled). */\n selectedKeys?: \"all\" | Iterable<Key>;\n /** Default selected keys (uncontrolled). */\n defaultSelectedKeys?: \"all\" | Iterable<Key>;\n /** Handler called when selection changes. */\n onSelectionChange?: (keys: \"all\" | Set<Key>) => void;\n /** The children of the component. A function may be provided to render each item. */\n children: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ListBoxRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ListBoxRenderProps>;\n /** A function to render when the listbox is empty. */\n renderEmptyState?: () => JSX.Element;\n /** Whether there are more items to load. */\n hasMore?: boolean;\n /** Whether additional items are currently loading. */\n isLoading?: boolean;\n /** Called when the load more sentinel becomes visible. */\n onLoadMore?: () => void | Promise<void>;\n /** Ref for the listbox element. */\n ref?: RefLike<HTMLDivElement>;\n /** Drag and drop hooks from `useDragAndDrop`. */\n dragAndDropHooks?: DragAndDropHooks<T>;\n /** Layout hint for styling parity. */\n layout?: \"stack\" | \"grid\";\n /** Orientation hint for styling parity. */\n orientation?: \"vertical\" | \"horizontal\";\n /** Slot definitions provided through ListBoxContext. */\n slots?: Record<string, Partial<ListBoxProps<T>>>;\n}\n\nexport interface ListBoxOptionRenderProps {\n /** Whether the option is selected. */\n isSelected: boolean;\n /** Whether the option is focused. */\n isFocused: boolean;\n /** Whether the option has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the option is pressed. */\n isPressed: boolean;\n /** Whether the option is hovered. */\n isHovered: boolean;\n /** Whether the option is disabled. */\n isDisabled: boolean;\n}\n\nexport type ListBoxItemProps<T> = ListBoxOptionProps<T>;\nexport type ListBoxItemRenderProps = ListBoxOptionRenderProps;\n\n/**\n * @deprecated Use {@link ListBoxItemProps}. Removed in a future minor.\n */\nexport interface ListBoxOptionProps<T>\n extends Omit<AriaOptionProps, \"children\" | \"key\">, SlotProps {\n /** The unique key for the option. */\n id: Key;\n /** The item value. */\n item?: T;\n /** The children of the option. A function may be provided to receive render props. */\n children?: RenderChildren<ListBoxOptionRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ListBoxOptionRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ListBoxOptionRenderProps>;\n /** The text value of the option (for typeahead). */\n textValue?: string;\n /** Ref for the option element. */\n ref?: RefLike<HTMLDivElement>;\n}\n\nexport interface ListBoxLoadMoreItemProps extends SlotProps {\n /** Called when the sentinel becomes visible. */\n onLoadMore: () => void | Promise<void>;\n /** Whether additional items are currently loading. */\n isLoading?: boolean;\n /** Scroll offset multiplier for early loading trigger (default: 1 = 100% of viewport height). */\n scrollOffset?: number;\n /** Content for the load more row. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<{ isLoading: boolean }>;\n /** The inline style for the element. */\n style?: StyleOrFunction<{ isLoading: boolean }>;\n}\n\nexport interface ListBoxSectionProps extends SectionProps {}\n\ninterface ListBoxContextValue<T> {\n state: ListState<T>;\n isDisabled: () => boolean;\n dragAndDropHooks?: DragAndDropHooks<unknown>;\n dragState?: unknown;\n dropState?: unknown;\n slots?: Record<string, Partial<ListBoxProps<T>>>;\n}\n\nexport const ListBoxContext = createContext<ListBoxContextValue<unknown> | null>(null);\nexport const ListBoxStateContext = createContext<ListState<unknown> | null>(null);\nexport const ListStateContext = ListBoxStateContext;\n\nfunction dropIndicatorLabel(\n target: ItemDropTarget,\n collection: Collection<unknown>,\n format: (\n key: \"dropOnItem\" | \"insertBetween\" | \"insertAfter\" | \"insertBefore\",\n args?: Record<string, string>,\n ) => string,\n): string {\n const getText = (key: Key | null): string => {\n if (key == null) return \"\";\n return collection.getTextValue(key) ?? collection.getItem(key)?.textValue ?? \"\";\n };\n if (target.dropPosition === \"on\") {\n return format(\"dropOnItem\", { itemText: getText(target.key) });\n }\n let before: Key | null;\n let after: Key | null;\n if (target.dropPosition === \"before\") {\n const prevKey = collection.getKeyBefore(target.key);\n const prevNode = prevKey != null ? collection.getItem(prevKey) : null;\n before = prevNode?.type === \"item\" ? prevNode.key : null;\n } else {\n before = target.key;\n }\n if (target.dropPosition === \"after\") {\n const nextKey = collection.getKeyAfter(target.key);\n const nextNode = nextKey != null ? collection.getItem(nextKey) : null;\n after = nextNode?.type === \"item\" ? nextNode.key : null;\n } else {\n after = target.key;\n }\n if (before != null && after != null) {\n return format(\"insertBetween\", {\n beforeItemText: getText(before),\n afterItemText: getText(after),\n });\n }\n if (before != null) {\n return format(\"insertAfter\", { itemText: getText(before) });\n }\n if (after != null) {\n return format(\"insertBefore\", { itemText: getText(after) });\n }\n return \"\";\n}\n\n/**\n * RAC `ListBox.tsx:662-717` `ListBoxDropIndicatorWrapper` — a stable module-level\n * component so Solid does not remount (and unregister) the indicator on every\n * parent ListBox re-render. `useDropIndicator` owns register + focus\n * (`useDroppableItem.ts:49-88`).\n */\nfunction ListBoxDropIndicatorWrapper(props: DropIndicatorProps): JSX.Element {\n const listContext = useContext(ListBoxContext);\n const listState = useContext(ListBoxStateContext);\n const [el, setEl] = createSignal<HTMLDivElement | null>(null);\n const dndFormatter = createStringFormatter(dndIntlStrings);\n const dropState = listContext?.dropState as DroppableCollectionState | undefined;\n const indicator = listContext?.dragAndDropHooks?.useDropIndicator?.(\n { target: props.target },\n dropState as DroppableCollectionState,\n el,\n );\n\n return (\n <Show when={indicator && !indicator.isHidden}>\n <div\n {...indicator?.dropIndicatorProps}\n ref={setEl}\n role=\"option\"\n class=\"solidaria-DropIndicator\"\n aria-label={\n listState\n ? dropIndicatorLabel(props.target, listState.collection(), (key, args) =>\n dndFormatter().format(key, args),\n )\n : undefined\n }\n data-drop-target={dataAttr(indicator?.isDropTarget)}\n />\n </Show>\n );\n}\n\n/**\n * Owns only the collection item. Drop-indicator siblings live in their own\n * components so their tracking cannot remount this node.\n *\n * Comparison hyperscript children (`hc` thunks) are one-shot: if the fragment\n * insert that owns the option also tracks indicator `Show`, the effect\n * re-runs, disposes the option, and Chromium maps focus to\n * `listbox:Permissions`. RAC `ListBoxItem` stays mounted while Collection\n * inserts indicator siblings (`react-aria-components/src/ListBox.tsx`).\n */\nfunction ListBoxRenderedItem<T>(props: {\n item: T;\n renderItem: (item: T) => JSX.Element;\n}): JSX.Element {\n // Comparison `hc` returns a one-shot thunk. Solid's insert treats a function\n // child as an accessor and will call it again when a sibling indicator\n // invalidates. Instantiate once under this owner so the option node stays.\n const child = untrack(() => {\n const rendered = props.renderItem(props.item);\n return typeof rendered === \"function\" ? (rendered as () => JSX.Element)() : rendered;\n });\n return child as JSX.Element;\n}\n\nfunction ListBoxDropIndicatorSlot(props: {\n itemIndex: number | Accessor<number>;\n position: \"before\" | \"after\" | \"on\";\n renderDropIndicator?: (\n index: number,\n position: \"before\" | \"after\" | \"on\",\n ) => JSX.Element | undefined;\n}): JSX.Element {\n const itemIndex = () =>\n typeof props.itemIndex === \"function\" ? props.itemIndex() : props.itemIndex;\n return <>{props.renderDropIndicator?.(itemIndex(), props.position)}</>;\n}\n\n/**\n * Stable per-item row so drop-indicator mount does not remount the option.\n */\nfunction ListBoxItemWithDropIndicators<T>(props: {\n item: T;\n itemIndex: number | Accessor<number>;\n isLastInLevel: boolean | Accessor<boolean>;\n renderItem: (item: T) => JSX.Element;\n renderDropIndicator?: (\n index: number,\n position: \"before\" | \"after\" | \"on\",\n ) => JSX.Element | undefined;\n}): JSX.Element {\n const isLast = () =>\n typeof props.isLastInLevel === \"function\" ? props.isLastInLevel() : props.isLastInLevel;\n return (\n <>\n <ListBoxDropIndicatorSlot\n itemIndex={props.itemIndex}\n position=\"before\"\n renderDropIndicator={props.renderDropIndicator}\n />\n <ListBoxRenderedItem item={props.item} renderItem={props.renderItem} />\n <Show when={isLast()}>\n <ListBoxDropIndicatorSlot\n itemIndex={props.itemIndex}\n position=\"after\"\n renderDropIndicator={props.renderDropIndicator}\n />\n </Show>\n </>\n );\n}\n\n/**\n * A listbox displays a list of options and allows a user to select one or more of them.\n */\nexport function ListBox<T>(props: ListBoxProps<T>): JSX.Element {\n const parentContext = useContext(ListBoxContext) as ListBoxContextValue<T> | null;\n const contextSlotProps =\n parentContext?.slots?.[typeof props.slot === \"string\" ? props.slot : \"default\"];\n const mergedListBoxProps = contextSlotProps\n ? (mergeProps(contextSlotProps, props) as ListBoxProps<T>)\n : props;\n const [local, stateProps, ariaProps] = splitProps(\n mergedListBoxProps,\n [\n \"children\",\n \"class\",\n \"style\",\n \"slot\",\n \"renderEmptyState\",\n \"hasMore\",\n \"isLoading\",\n \"onLoadMore\",\n \"dragAndDropHooks\",\n \"slots\",\n \"ref\",\n ],\n [\n \"items\",\n \"getKey\",\n \"getTextValue\",\n \"getDisabled\",\n \"disabledKeys\",\n \"disabledBehavior\",\n \"selectionMode\",\n \"selectionBehavior\",\n \"selectedKeys\",\n \"defaultSelectedKeys\",\n \"onSelectionChange\",\n \"layout\",\n \"orientation\",\n ],\n );\n\n const flatItems = createMemo<T[]>(() => {\n return flattenCollectionEntries(stateProps.items);\n });\n\n const hasSections = createMemo(() => stateProps.items.some((item) => isCollectionSection(item)));\n\n const baseState = createListState<T>({\n get items() {\n return flatItems();\n },\n get getKey() {\n return stateProps.getKey;\n },\n get getTextValue() {\n return stateProps.getTextValue;\n },\n get getDisabled() {\n return stateProps.getDisabled;\n },\n get disabledKeys() {\n return stateProps.disabledKeys;\n },\n get selectionMode() {\n return stateProps.selectionMode;\n },\n get selectionBehavior() {\n return stateProps.selectionBehavior;\n },\n get disabledBehavior() {\n return stateProps.disabledBehavior;\n },\n get selectedKeys() {\n return stateProps.selectedKeys;\n },\n get defaultSelectedKeys() {\n return stateProps.defaultSelectedKeys;\n },\n get onSelectionChange() {\n return stateProps.onSelectionChange;\n },\n });\n\n // When this ListBox is the collection of an Autocomplete, the input and the\n // collection are separate components bridged by context. The collection's\n // state is filtered by the input's predicate (mirrors RAC's\n // UNSTABLE_useFilteredListState), and virtual focus is driven across the\n // component boundary by synthetic DOM events (see the bridge effects below).\n // ComboBox/Picker never provide this context, so their createListBox path is\n // untouched.\n const autocompleteCtx = useAutocompleteCollection();\n const state = autocompleteCtx\n ? createFilteredListState<T>(\n baseState,\n () => autocompleteCtx.filter as ListFilterFn<T> | undefined,\n )\n : baseState;\n\n const resolveDisabled = (): boolean => {\n const disabled = ariaProps.isDisabled;\n if (typeof disabled === \"function\") {\n return (disabled as () => boolean)();\n }\n return !!disabled;\n };\n\n const locale = useLocale();\n // A parent Virtualizer publishes `isVirtualized` through the collection\n // renderer context; the base ListBox forwards it into createListBox so each\n // option emits aria-posinset/aria-setsize for the windowed (incomplete) DOM.\n const parentCollectionRenderer = useCollectionRenderer<unknown>();\n const listBoxAria = createListBox(\n mergeProps(ariaProps, {\n get isVirtualized() {\n return parentCollectionRenderer?.isVirtualized ?? ariaProps.isVirtualized;\n },\n // Under Autocomplete, the input owns the collection's id (its\n // aria-controls target), accessible name, and virtual-focus/type-ahead\n // config; prefer the bridged values over any locally-passed props.\n get id() {\n return autocompleteCtx?.collectionProps.id ?? (ariaProps as { id?: string }).id;\n },\n get \"aria-label\"() {\n return autocompleteCtx?.collectionProps[\"aria-label\"] ?? ariaProps[\"aria-label\"];\n },\n get shouldUseVirtualFocus() {\n return (\n autocompleteCtx?.collectionProps.shouldUseVirtualFocus ?? ariaProps.shouldUseVirtualFocus\n );\n },\n get disallowTypeAhead() {\n return autocompleteCtx?.collectionProps.disallowTypeAhead ?? ariaProps.disallowTypeAhead;\n },\n get isDisabled() {\n return resolveDisabled();\n },\n get orientation() {\n return stateProps.orientation ?? \"vertical\";\n },\n get direction() {\n return locale().direction;\n },\n }),\n state,\n () => listRef(),\n );\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n const renderValues = createMemo<ListBoxRenderProps>(() => ({\n // RAC ListBox.tsx:366-414: `data-focused` / render-prop `isFocused` come from\n // `useFocusRing` on the listbox element, not collection focus. Virtual focus\n // (ComboBox) leaves the listbox itself unfocused.\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: resolveDisabled(),\n isEmpty: state.collection().size === 0,\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-ListBox\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n return filtered;\n });\n\n const cleanListBoxProps = () => {\n const { ref: _ref1, ...rest } = listBoxAria.listBoxProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref2, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanLabelProps = () => {\n const { ref: _ref3, ...rest } = listBoxAria.labelProps as Record<string, unknown>;\n return rest;\n };\n const [listRef, setListRef] = createSignal<HTMLElement | null>(null);\n\n // Reveal the activedescendant-focused option on keyboard navigation. The\n // listbox keeps real DOM focus on itself, so the browser won't natively scroll\n // an off-screen focused option into view the way roving tabindex would.\n createScrollIntoViewOnFocus({\n focusedKey: () => state.focusedKey(),\n isActive: () => state.isFocused(),\n ref: () => listRef(),\n });\n\n // Autocomplete bridge. The shared selectable collection owns keyboard\n // navigation and collection focus. This component keeps the Solid DOM handoff\n // that mirrors the focused key to the input's active descendant. Ticket #100\n // tracks moving the remaining virtual-focus work into the shared item layer.\n if (autocompleteCtx) {\n // Forward path: the input dispatches FOCUS_EVENT/CLEAR_FOCUS_EVENT onto the\n // collection element. FOCUS_EVENT marks the collection focused (and, when the\n // user types forward, requests the first item). The shared collection handles\n // the re-dispatched keyboard event.\n let shouldVirtualFocusFirst = false;\n createTrackedEffect(() => {\n const _s2Cleanups: Array<() => void> = [];\n\n const list = listRef();\n if (!list) return;\n const onFocusEvent = (e: Event) => {\n const detail = (e as CustomEvent).detail;\n e.stopPropagation();\n state.setFocused(true);\n if (detail?.focusStrategy === \"first\") {\n shouldVirtualFocusFirst = true;\n }\n };\n const onClearFocusEvent = (e: Event) => {\n e.stopPropagation();\n state.setFocused(false);\n if ((e as CustomEvent).detail?.clearFocusKey) {\n state.setFocusedKey(null);\n }\n };\n list.addEventListener(FOCUS_EVENT, onFocusEvent);\n list.addEventListener(CLEAR_FOCUS_EVENT, onClearFocusEvent);\n _s2Cleanups.push(() => {\n list.removeEventListener(FOCUS_EVENT, onFocusEvent);\n list.removeEventListener(CLEAR_FOCUS_EVENT, onClearFocusEvent);\n });\n\n return () => {\n for (const c of _s2Cleanups) c();\n };\n });\n\n // Focus the first item once the (filtered) collection settles after the user\n // types forward. If nothing survives the filter, clear the input's active\n // descendant by moving virtual focus onto the collection itself (its focusin\n // reaches the input's clear branch). Mirrors useSelectableCollection.\n createEffect(\n () => [state.collection().getFirstKey?.() ?? null, state.collection().size] as const,\n ([firstKey, size]) => {\n if (!shouldVirtualFocusFirst) return;\n if (firstKey == null) {\n const list = listRef();\n if (list) moveVirtualFocus(list);\n if (size > 0) shouldVirtualFocusFirst = false;\n } else {\n state.setFocusedKey(firstKey);\n shouldVirtualFocusFirst = false;\n }\n },\n { defer: true },\n );\n\n // Reverse path: mirror the focused key onto the option's DOM element via a\n // synthetic, bubbling focusin (moveVirtualFocus). The input's focusin listener\n // reads target.id into its aria-activedescendant. Option ids are String(key)\n // in this path (createOption). Real DOM focus stays on the input.\n createEffect(\n () => {\n const key = state.focusedKey();\n const list = listRef();\n const focused = state.isFocused();\n return { key, list, focused };\n },\n ({ key, list, focused }) => {\n if (!list || !focused) return;\n if (key == null) return;\n const el = list.ownerDocument.getElementById(String(key));\n if (el) moveVirtualFocus(el);\n },\n );\n }\n\n // RAC ListBox iterates CollectionRoot's filtered collection, not the\n // unfiltered `items` prop. Keyboard already walks `state.collection()`\n // (createFilteredListState under Autocomplete; baseState otherwise).\n const getItemNodes = createMemo(() =>\n Array.from(state.collection()).filter((node) => node.type === \"item\"),\n );\n const collectionItems = createMemo(() => getItemNodes().map((node) => node.value as T));\n const isEmpty = () => state.collection().size === 0;\n const isLastDropItem = (itemIndex: number | Accessor<number>) => {\n const i = typeof itemIndex === \"function\" ? itemIndex() : itemIndex;\n return getItemNodes().length > 0 && i === getItemNodes().length - 1;\n };\n const getDropTargetByIndex = (\n index: number,\n position: \"before\" | \"after\" | \"on\",\n ): DropTarget | null => {\n const node = getItemNodes()[index];\n if (!node) return null;\n return { type: \"item\", key: node.key, dropPosition: position };\n };\n const hasDroppableDnd = createMemo(() => {\n const hooks = local.dragAndDropHooks;\n return Boolean(\n hooks?.useDroppableCollectionState &&\n hooks.useDroppableCollection &&\n (hooks.dropTargetDelegate ||\n parentCollectionRenderer?.dropTargetDelegate ||\n hooks.ListDropTargetDelegate),\n );\n });\n const dropStateValue = hasDroppableDnd()\n ? local.dragAndDropHooks?.useDroppableCollectionState?.({\n get collection() {\n return state.collection();\n },\n })\n : undefined;\n const dropState = () => dropStateValue;\n const hasDraggableDnd = createMemo(() => {\n const hooks = local.dragAndDropHooks;\n return Boolean(hooks?.useDraggableCollectionState && hooks.useDraggableCollection);\n });\n const dragStateValue = hasDraggableDnd()\n ? local.dragAndDropHooks?.useDraggableCollectionState?.({\n items: flatItems(),\n collection: state.collection(),\n selectedKeys: state.selectionManager.selectedKeys,\n isSelected: (key) => state.selectionManager.isSelected(key),\n })\n : undefined;\n const dragState = () => dragStateValue;\n if (local.dragAndDropHooks?.useDraggableCollection && dragStateValue) {\n local.dragAndDropHooks.useDraggableCollection({}, dragStateValue, () => listRef());\n }\n const droppableCollectionValue = (() => {\n if (!hasDroppableDnd()) return undefined;\n const hooks = local.dragAndDropHooks;\n const activeDropState = dropStateValue;\n if (!hooks?.useDroppableCollection || !activeDropState) return undefined;\n const resolveDirection = (): \"ltr\" | \"rtl\" => locale().direction;\n const dropTargetDelegate =\n hooks.dropTargetDelegate ??\n parentCollectionRenderer?.dropTargetDelegate ??\n (hooks.ListDropTargetDelegate\n ? new hooks.ListDropTargetDelegate(\n () => state.collection(),\n () => listRef(),\n { layout: \"stack\", orientation: \"vertical\", direction: resolveDirection() },\n )\n : undefined);\n if (!dropTargetDelegate) return undefined;\n return hooks.useDroppableCollection(\n {\n dropTargetDelegate,\n keyboardDelegate: {\n getFirstKey: () => state.collection().getFirstKey(),\n getLastKey: () => state.collection().getLastKey(),\n getKeyBelow: (key) => state.collection().getKeyAfter(key),\n getKeyAbove: (key) => state.collection().getKeyBefore(key),\n getKeyPageBelow: (key) => state.collection().getKeyAfter(key),\n getKeyPageAbove: (key) => state.collection().getKeyBefore(key),\n },\n // The real collection drives keyboard drop-target navigation\n // (`navigate()` walks getKeyAfter/getKeyBefore) and post-drop focus\n // restoration. Reading it here re-registers the drop target when the\n // collection changes (mirrors upstream keying its effect on the state).\n get collection() {\n return state.collection();\n },\n get selectedKeys() {\n return state.selectionManager.selectedKeys;\n },\n setSelectedKeys: (keys) => state.selectionManager.setSelectedKeys(keys),\n setFocusedKey: (key) => state.setFocusedKey(key),\n setFocused: (isFocused) => state.setFocused(isFocused),\n },\n activeDropState,\n () => listRef(),\n );\n })();\n const droppableCollection = () => droppableCollectionValue;\n const isRootDropTarget = createMemo(() => {\n return Boolean(dropState()?.target?.type === \"root\");\n });\n const dndRenderDropIndicator = createMemo(() =>\n useRenderDropIndicator(local.dragAndDropHooks, dropState()),\n );\n const dndDropIndicator = (index: number, position: \"before\" | \"after\" | \"on\") => {\n const target = getDropTargetByIndex(index, position);\n if (!target || target.type !== \"item\") return undefined;\n return dndRenderDropIndicator()?.(target);\n };\n // Stable callback so `For` item templates do not track drop-indicator\n // reactivity (that remounts the option). The row component reads this.\n const renderItemDropIndicator = (index: number, position: \"before\" | \"after\" | \"on\") =>\n dndDropIndicator(index, position) ??\n parentCollectionRenderer?.renderDropIndicator?.(index, position);\n\n const dropIndicatorContextValue = {\n render: (p: DropIndicatorProps) => <ListBoxDropIndicatorWrapper {...p} />,\n };\n\n const virtualizer = useVirtualizerContext();\n const persistedKeys = useDndPersistedKeys(\n { focusedKey: state.focusedKey },\n local.dragAndDropHooks,\n dropState(),\n state.collection(),\n );\n const virtualRange = createMemo(() => {\n if (!virtualizer || !parentCollectionRenderer?.isVirtualized || hasSections()) return null;\n const itemCount = getItemNodes().length;\n const baseRange = virtualizer.getVisibleRange(itemCount);\n const itemNodes = getItemNodes();\n const dropTarget = dropState()?.target;\n const normalizedDropKey = getNormalizedDropTargetKey(dropTarget, state.collection());\n const forceIncludeIndexes = [\n dropTarget?.type === \"item\" ? itemNodes.findIndex((node) => node.key === dropTarget.key) : -1,\n normalizedDropKey != null\n ? itemNodes.findIndex((node) => node.key === normalizedDropKey)\n : -1,\n ].filter((index) => index >= 0);\n return mergePersistedKeysIntoVirtualRange(baseRange, [], itemCount, virtualizer, 80, {\n forceIncludeIndexes,\n forceIncludeMaxSpan: 320,\n });\n });\n const persistedOutsideIndexes = createMemo(() => {\n const range = virtualRange();\n if (!range) return [] as number[];\n const itemNodes = getItemNodes();\n const persistedIndexes = Array.from(persistedKeys())\n .map((key) => itemNodes.findIndex((node) => node.key === key))\n .filter((index) => index >= 0);\n return indexesOutsideRange(range, persistedIndexes);\n });\n createTrackedEffect(() => {\n const _s2Cleanups: Array<() => void> = [];\n\n if (!virtualizer || !parentCollectionRenderer?.isVirtualized) return;\n const getItemNodes = () =>\n Array.from(state.collection()).filter((node) => node.type === \"item\");\n virtualizer.setDropTargetItemCountResolver(() => getItemNodes().length);\n virtualizer.setDropTargetIndexResolver((key) => {\n const index = getItemNodes().findIndex((node) => node.key === key);\n return index >= 0 ? index : null;\n });\n virtualizer.setDropTargetResolver((target) => {\n const node = getItemNodes()[target.index];\n if (!node) return target;\n return {\n ...target,\n key: typeof node.key === \"string\" || typeof node.key === \"number\" ? node.key : undefined,\n };\n });\n _s2Cleanups.push(() => {\n virtualizer.setDropTargetIndexResolver(undefined);\n virtualizer.setDropTargetItemCountResolver(undefined);\n virtualizer.setDropTargetResolver(undefined);\n });\n\n return () => {\n for (const c of _s2Cleanups) c();\n };\n });\n const visibleItems = createMemo(() => {\n const range = virtualRange();\n const items = collectionItems();\n if (!range) return items;\n return items.slice(range.start, range.end);\n });\n const sectionedRenderEntries = createMemo(() => {\n const values = new Set(collectionItems());\n let globalIndex = 0;\n const entries: Array<\n | { type: \"section\"; section: CollectionSection<T>; items: { item: T; index: number }[] }\n | { type: \"item\"; item: { item: T; index: number } }\n > = [];\n for (const entry of stateProps.items) {\n if (isCollectionSection(entry)) {\n const sectionItems = entry.items\n .filter((item) => values.has(item))\n .map((item) => ({\n item,\n index: globalIndex++,\n }));\n if (sectionItems.length === 0) continue;\n entries.push({\n type: \"section\" as const,\n section: entry,\n items: sectionItems,\n });\n } else if (values.has(entry as T)) {\n entries.push({\n type: \"item\" as const,\n item: {\n item: entry as T,\n index: globalIndex++,\n },\n });\n }\n }\n return entries;\n });\n const collectionRenderer = createMemo<CollectionRendererContextValue<unknown>>(() => ({\n ...parentCollectionRenderer,\n renderItem: (item) => local.children(item as T),\n renderDropIndicator: (index, position) =>\n dndDropIndicator(index, position) ??\n parentCollectionRenderer?.renderDropIndicator?.(index, position),\n }));\n const CollectionRoot = useCollectionRoot();\n\n return (\n <ListBoxContext\n value={\n {\n state,\n isDisabled: resolveDisabled,\n dragAndDropHooks: local.dragAndDropHooks as DragAndDropHooks<unknown> | undefined,\n dragState: dragState(),\n dropState: dropState(),\n slots: local.slots,\n } as ListBoxContextValue<unknown>\n }\n >\n <ListBoxStateContext value={state}>\n <CollectionRendererContext value={collectionRenderer()}>\n <DropIndicatorContext value={dropIndicatorContextValue}>\n <>\n <Show when={ariaProps.label}>\n <span {...cleanLabelProps()}>{ariaProps.label as JSX.Element}</span>\n </Show>\n <div\n {...mergeProps(\n domProps(),\n cleanListBoxProps(),\n cleanFocusProps(),\n (droppableCollection()?.collectionProps as Record<string, unknown> | undefined) ??\n {},\n )}\n ref={(el) => {\n setListRef(el);\n assignRef(local.ref, el);\n autocompleteCtx?.collectionRef(el);\n }}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={dataAttr(isFocused())}\n data-focus-visible={dataAttr(isFocusVisible())}\n data-disabled={dataAttr(resolveDisabled())}\n data-empty={dataAttr(isEmpty())}\n data-layout={stateProps.layout || \"stack\"}\n data-orientation={stateProps.orientation || \"vertical\"}\n data-drop-target={dataAttr(isRootDropTarget())}\n slot={local.slot}\n >\n <SharedElementTransition>\n {parentCollectionRenderer?.isVirtualized ? (\n <>\n <CollectionRoot\n collection={virtualRange() ? collectionItems() : []}\n scrollRef={() => listRef()}\n persistedKeys={persistedKeys()}\n >\n {isEmpty() && local.renderEmptyState ? null : hasSections() ? (\n <For each={sectionedRenderEntries()}>\n {(entry) =>\n entry.type === \"section\" ? (\n <div role=\"presentation\" data-section-wrapper>\n <Section class=\"solidaria-ListBox-section\">\n {entry.section.title != null && (\n <Header class=\"solidaria-ListBox-sectionHeader\">\n {entry.section.title}\n </Header>\n )}\n <Group class=\"solidaria-ListBox-sectionGroup\">\n <div role=\"group\" aria-label={entry.section[\"aria-label\"]}>\n <For each={entry.items}>\n {(indexedItem) => (\n <VirtualizerItem index={indexedItem.index}>\n <ListBoxItemWithDropIndicators\n item={indexedItem.item}\n itemIndex={indexedItem.index}\n isLastInLevel={() =>\n isLastDropItem(indexedItem.index)\n }\n renderItem={local.children}\n renderDropIndicator={renderItemDropIndicator}\n />\n </VirtualizerItem>\n )}\n </For>\n </div>\n </Group>\n </Section>\n </div>\n ) : (\n <VirtualizerItem index={entry.item.index}>\n <ListBoxItemWithDropIndicators\n item={entry.item.item}\n itemIndex={entry.item.index}\n isLastInLevel={() => isLastDropItem(entry.item.index)}\n renderItem={local.children}\n renderDropIndicator={renderItemDropIndicator}\n />\n </VirtualizerItem>\n )\n }\n </For>\n ) : (\n <>\n <For each={visibleItems()}>\n {(item, index) => (\n <VirtualizerItem\n index={() => (virtualRange()?.start ?? 0) + index()}\n >\n <ListBoxItemWithDropIndicators\n item={item as T}\n itemIndex={() => (virtualRange()?.start ?? 0) + index()}\n isLastInLevel={() =>\n isLastDropItem((virtualRange()?.start ?? 0) + index())\n }\n renderItem={local.children}\n renderDropIndicator={renderItemDropIndicator}\n />\n </VirtualizerItem>\n )}\n </For>\n <For each={persistedOutsideIndexes()}>\n {(index) => (\n <PersistedVirtualItem index={index}>\n <ListBoxItemWithDropIndicators\n item={collectionItems()[index] as T}\n itemIndex={() => index}\n isLastInLevel={() => isLastDropItem(index)}\n renderItem={local.children}\n renderDropIndicator={renderItemDropIndicator}\n />\n </PersistedVirtualItem>\n )}\n </For>\n </>\n )}\n </CollectionRoot>\n {isEmpty() && local.renderEmptyState ? (\n <div role=\"option\" style={{ display: \"contents\" }} data-empty-state>\n {local.renderEmptyState()}\n </div>\n ) : null}\n </>\n ) : isEmpty() && local.renderEmptyState ? (\n <div role=\"option\" style={{ display: \"contents\" }} data-empty-state>\n {local.renderEmptyState()}\n </div>\n ) : hasSections() ? (\n <For each={sectionedRenderEntries()}>\n {(entry) =>\n entry.type === \"section\" ? (\n <div role=\"presentation\" data-section-wrapper>\n <Section class=\"solidaria-ListBox-section\">\n {entry.section.title != null && (\n <Header class=\"solidaria-ListBox-sectionHeader\">\n {entry.section.title}\n </Header>\n )}\n <Group class=\"solidaria-ListBox-sectionGroup\">\n <div role=\"group\" aria-label={entry.section[\"aria-label\"]}>\n <For each={entry.items}>\n {(indexedItem) => (\n <ListBoxItemWithDropIndicators\n item={indexedItem.item}\n itemIndex={indexedItem.index}\n isLastInLevel={() => isLastDropItem(indexedItem.index)}\n renderItem={local.children}\n renderDropIndicator={renderItemDropIndicator}\n />\n )}\n </For>\n </div>\n </Group>\n </Section>\n </div>\n ) : (\n <ListBoxItemWithDropIndicators\n item={entry.item.item}\n itemIndex={entry.item.index}\n isLastInLevel={() => isLastDropItem(entry.item.index)}\n renderItem={local.children}\n renderDropIndicator={renderItemDropIndicator}\n />\n )\n }\n </For>\n ) : (\n <>\n <For each={visibleItems()}>\n {(item, index) => (\n <ListBoxItemWithDropIndicators\n item={item as T}\n itemIndex={() => (virtualRange()?.start ?? 0) + index()}\n isLastInLevel={() =>\n isLastDropItem((virtualRange()?.start ?? 0) + index())\n }\n renderItem={local.children}\n renderDropIndicator={renderItemDropIndicator}\n />\n )}\n </For>\n </>\n )}\n </SharedElementTransition>\n {local.hasMore && local.onLoadMore && (\n <ListBoxLoadMoreItem onLoadMore={local.onLoadMore} isLoading={local.isLoading} />\n )}\n </div>\n </>\n </DropIndicatorContext>\n </CollectionRendererContext>\n </ListBoxStateContext>\n </ListBoxContext>\n );\n}\n\n/**\n * An item in a listbox.\n */\nexport function ListBoxItem<T>(props: ListBoxItemProps<T>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n \"class\",\n \"style\",\n \"slot\",\n \"id\",\n \"item\",\n \"textValue\",\n \"ref\",\n ]);\n\n const context = useContext(ListBoxStateContext);\n if (!context) {\n throw new Error(\"ListBoxItem must be used within a ListBox\");\n }\n const state = context as ListState<T>;\n const listContext = useContext(ListBoxContext) as ListBoxContextValue<T> | null;\n const [ref, setRef] = createSignal<HTMLDivElement | null>(null);\n\n const optionAria = createOption<T>(\n {\n key: local.id,\n get isDisabled() {\n return Boolean(ariaProps.isDisabled || listContext?.isDisabled());\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get shouldSelectOnPressUp() {\n return ariaProps.shouldSelectOnPressUp;\n },\n get shouldFocusOnHover() {\n return ariaProps.shouldFocusOnHover;\n },\n get onHoverStart() {\n return ariaProps.onHoverStart;\n },\n get onHoverEnd() {\n return ariaProps.onHoverEnd;\n },\n get onHoverChange() {\n return ariaProps.onHoverChange;\n },\n },\n state,\n ref,\n );\n\n const renderValues = createMemo<ListBoxOptionRenderProps>(() => ({\n isSelected: optionAria.isSelected(),\n isFocused: optionAria.isFocused(),\n isFocusVisible: optionAria.isFocusVisible(),\n isPressed: optionAria.isPressed(),\n isHovered: optionAria.isHovered(),\n isDisabled: optionAria.isDisabled(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-ListBox-option\",\n },\n renderValues,\n );\n\n const selectionIndicatorContext = createMemo<SelectionIndicatorContextValue>(() => ({\n isSelected: optionAria.isSelected,\n }));\n const draggableItem = createMemo(() => {\n if (!listContext?.dragAndDropHooks?.useDraggableItem || !listContext.dragState)\n return undefined;\n return listContext.dragAndDropHooks.useDraggableItem(\n {\n key: local.id as string | number,\n // Surfaces the drag-affordance description (aria-describedby) only for\n // selectable collections, mirroring upstream useDraggableItem.\n selectionMode: state.selectionManager.selectionMode,\n },\n listContext.dragState as Parameters<NonNullable<DragAndDropHooks<T>[\"useDraggableItem\"]>>[1],\n );\n });\n const droppableItem = createMemo(() => {\n if (!listContext?.dragAndDropHooks?.useDroppableItem || !listContext.dropState)\n return undefined;\n return listContext.dragAndDropHooks.useDroppableItem(\n {\n key: local.id as string | number,\n },\n listContext.dropState as Parameters<NonNullable<DragAndDropHooks<T>[\"useDroppableItem\"]>>[1],\n () => ref(),\n );\n });\n\n const cleanOptionProps = () => {\n const { ref: _ref1, ...rest } = optionAria.optionProps as Record<string, unknown>;\n return rest;\n };\n\n const optionTextSlots = {\n slots: {\n get [DEFAULT_SLOT]() {\n return optionAria.labelProps;\n },\n get label() {\n return optionAria.labelProps;\n },\n get description() {\n return optionAria.descriptionProps;\n },\n },\n };\n\n // Styled hosts (S2 ComboBoxItem / PickerItem) emit `<span slot=\"label\">` rather\n // than `<Text>`. Stamp the slot id onto that node before `createSlotId` probes\n // the DOM, matching RAC TextContext + useSlotId.\n createRenderEffect(\n () => ({\n el: ref(),\n labelId: optionAria.labelProps.id,\n descriptionId: optionAria.descriptionProps.id,\n }),\n ({ el, labelId, descriptionId }) => {\n if (!el) return;\n if (labelId) {\n const label = el.querySelector(\"[slot='label']\");\n if (label && !label.id) label.id = labelId;\n }\n if (descriptionId) {\n const description = el.querySelector(\"[slot='description']\");\n if (description && !description.id) description.id = descriptionId;\n }\n },\n );\n const domProps = () => filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n\n const selectionMode = () => state.selectionMode();\n\n return (\n <SelectionIndicatorContext value={selectionIndicatorContext()}>\n <div\n ref={(el) => {\n setRef(el);\n assignRef(local.ref, el);\n const dragRef = (\n draggableItem()?.dragProps as { ref?: (el: HTMLDivElement) => void } | undefined\n )?.ref;\n if (typeof dragRef === \"function\") dragRef(el);\n }}\n {...mergeProps(\n domProps(),\n cleanOptionProps(),\n (draggableItem()?.dragProps as Record<string, unknown> | undefined) ?? {},\n (droppableItem()?.dropProps as Record<string, unknown> | undefined) ?? {},\n )}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(optionAria.isSelected())}\n data-focused={dataAttr(optionAria.isFocused())}\n data-focus-visible={dataAttr(optionAria.isFocusVisible())}\n data-pressed={dataAttr(optionAria.isPressed())}\n data-hovered={dataAttr(optionAria.isHovered())}\n data-disabled={dataAttr(optionAria.isDisabled())}\n data-dragging={dataAttr(draggableItem()?.isDragging)}\n data-drop-target={dataAttr(droppableItem()?.isDropTarget)}\n data-selection-mode={selectionMode() === \"none\" ? undefined : selectionMode()}\n slot={local.slot}\n >\n <Provider values={[[TextContext, optionTextSlots] as [Context<unknown>, unknown]]}>\n <OptionContent\n render={renderProps.renderChildrenStable}\n labelProps={optionAria.labelProps}\n />\n </Provider>\n </div>\n </SelectionIndicatorContext>\n );\n}\n\n/**\n * Load more sentinel item for listbox collections.\n */\nexport function ListBoxLoadMoreItem(props: ListBoxLoadMoreItemProps): JSX.Element {\n const [sentinel, setSentinel] = createSignal<HTMLDivElement | undefined>();\n const [isPending, setIsPending] = createSignal(false);\n const scrollOffsetValue = createMemo(() => props.scrollOffset ?? 1);\n\n const isLoading = () => !!props.isLoading || isPending();\n\n const triggerLoadMore = async () => {\n if (isLoading()) return;\n setIsPending(true);\n try {\n await props.onLoadMore();\n } finally {\n setIsPending(false);\n }\n };\n\n createEffect(\n () => ({\n current: sentinel(),\n scrollOffset: scrollOffsetValue(),\n }),\n ({ current, scrollOffset }) => {\n if (!current || typeof IntersectionObserver !== \"function\") return;\n const margin = `0px 0px ${100 * scrollOffset}% 0px`;\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries[0]?.isIntersecting) {\n void triggerLoadMore();\n }\n },\n { rootMargin: margin },\n );\n observer.observe(current);\n return () => observer.disconnect();\n },\n );\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-ListBox-loadMore\",\n },\n () => ({ isLoading: isLoading() }),\n );\n\n // RAC ListBoxLoadMoreItem (ListBox.tsx:781-803): always mount the 0×0\n // sentinel; render the loader `option` only while `isLoading` and children\n // exist. A visible \"Load more\" row when idle/`loading` is a local invention.\n return (\n <>\n <div style={{ position: \"relative\", width: 0, height: 0, overflow: \"hidden\" }} inert>\n <div\n data-testid=\"loadMoreSentinel\"\n ref={setSentinel}\n style={{ position: \"absolute\", height: \"1px\", width: \"1px\" }}\n />\n </div>\n <Show when={isLoading() && props.children}>\n <div\n role=\"option\"\n tabindex={-1}\n class={renderProps.class()}\n style={renderProps.style()}\n data-loading\n >\n {renderProps.renderChildren()}\n </div>\n </Show>\n </>\n );\n}\n\n/**\n * Section primitive alias for ListBox composition parity.\n */\nexport function ListBoxSection(props: ListBoxSectionProps): JSX.Element {\n return <Section {...props} />;\n}\n\n/**\n * @deprecated Use {@link ListBoxItem}. Removed in a future minor.\n */\nexport const ListBoxOption = ListBoxItem;\n\nListBox.Option = ListBoxItem;\nListBox.LoadMoreItem = ListBoxLoadMoreItem;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyHA,SAASA,YAAa,KAAiB,IAAa;CAClD,IAAI,CAAC,KAAK;CACV,IAAI,OAAO,QAAQ,YAAY,IAAI,EAAE;MAChC,IAAI,UAAU;AACrB;AAoHA,MAAa,iBAAiB,cAAmD,IAAI;AACrF,MAAa,sBAAsB,cAAyC,IAAI;AAChF,MAAa,mBAAmB;AAEhC,SAAS,mBACP,QACA,YACA,QAIQ;CACR,MAAM,WAAW,QAA4B;EAC3C,IAAI,OAAO,MAAM,OAAO;EACxB,OAAO,WAAW,aAAa,GAAG,KAAK,WAAW,QAAQ,GAAG,CAAC,EAAE,aAA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AO,YAAY,MAAM,GACzB,aACD;WACE,YAAY,eAAe,EAAE;QAChC,EAAE,IAAI;MACR,EAAE,KAAK;IACT;AAEJ;;;;AAKA,SAAgB,eAAe,OAAyC;CACtE,OAAO,CAAC,YAAY;AACtB;;;;AAKA,MAAa,gBAAgB;AAE7B,QAAQ,SAAS;AACjB,QAAQ,eAAe"}
@@ -1,3 +1,6 @@
1
+ /**
2
+ * Based on packages/react-aria/src/dnd/ListDropTargetDelegate.ts.
3
+ */
1
4
  import type { Accessor } from "solid-js";
2
5
  import type { DropTarget } from "@proyecto-viviana/solid-stately";
3
6
  type Direction = "ltr" | "rtl";
@@ -1 +1 @@
1
- {"version":3,"file":"ListDropTargetDelegate.d.ts","sourceRoot":"","sources":["../src/ListDropTargetDelegate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC;AAC/B,KAAK,WAAW,GAAG,YAAY,GAAG,UAAU,CAAC;AAC7C,KAAK,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAE/B,UAAU,kBAAkB;IAC1B,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,6BAA6B;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAOD,qBAAa,sBAAsB;IACjC,OAAO,CAAC,UAAU,CAAsE;IACxF,OAAO,CAAC,GAAG,CAA+B;IAC1C,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,SAAS,CAAY;gBAG3B,UAAU,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG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Port of react-aria-components/src/Menu.tsx
6
- */
7
- import { type JSX } from "solid-js";
8
- import { type AriaMenuProps, type AriaMenuItemProps, type AriaMenuTriggerProps } from "@proyecto-viviana/solidaria";
9
- import { type MenuState, type MenuStateProps, type OverlayTriggerState, type Key, type SelectionMode, type SelectionStateProps } from "@proyecto-viviana/solid-stately";
10
- import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from "./utils";
1
+ import type { JSX } from "@solidjs/web";
2
+ import { type MenuTriggerMenuProps, type AriaMenuProps, type AriaMenuItemProps, type AriaMenuTriggerProps } from "@proyecto-viviana/solidaria";
3
+ import { type MenuState, type MenuStateProps, type MenuTriggerState, type Key, type SelectionMode, type SelectionStateProps } from "@proyecto-viviana/solid-stately";
4
+ import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps, type RefLike } from "./utils";
11
5
  import { type DragAndDropHooks } from "./useDragAndDrop";
12
6
  import { type CollectionEntry, type SectionProps } from "./Collection";
13
7
  export interface MenuRenderProps {
@@ -166,9 +160,12 @@ interface MenuContextValue<T> {
166
160
  dropState?: unknown;
167
161
  }
168
162
  interface MenuTriggerContextValue {
169
- state: OverlayTriggerState;
163
+ state: MenuTriggerState;
170
164
  triggerProps: JSX.HTMLAttributes<HTMLElement>;
171
- menuProps: JSX.HTMLAttributes<HTMLElement>;
165
+ menuProps: MenuTriggerMenuProps;
166
+ triggerRef?: () => HTMLElement | null;
167
+ setTriggerRef?: (element: HTMLElement | null) => void;
168
+ isDisabled?: () => boolean;
172
169
  isPressed?: () => boolean;
173
170
  onPressStart?: (e: {
174
171
  pointerType?: string;
@@ -177,39 +174,23 @@ interface MenuTriggerContextValue {
177
174
  export declare const MenuContext: import("solid-js").Context<MenuContextValue<unknown> | null>;
178
175
  export declare const MenuStateContext: import("solid-js").Context<MenuState<unknown> | null>;
179
176
  export declare const MenuTriggerContext: import("solid-js").Context<MenuTriggerContextValue | null>;
180
- export declare const RootMenuTriggerStateContext: import("solid-js").Context<OverlayTriggerState | null>;
181
- type RefLike<T> = ((el: T) => void) | {
182
- current?: T | null;
183
- } | undefined;
177
+ export declare const RootMenuTriggerStateContext: import("solid-js").Context<MenuTriggerState | null>;
184
178
  /**
185
179
  * A menu trigger wraps a button and menu, handling the open/close state.
186
180
  */
187
181
  export declare function MenuTrigger(props: MenuTriggerProps): JSX.Element;
188
182
  export declare function SubmenuTrigger(props: SubmenuTriggerProps): JSX.Element;
189
- /**
190
- * A button that opens a menu.
191
- */
192
- export interface MenuButtonProps extends SlotProps, Omit<JSX.HTMLAttributes<HTMLButtonElement>, "class" | "style" | "children"> {
193
- /** The children of the button. A function may be provided to receive render props. */
194
- children?: RenderChildren<MenuTriggerRenderProps>;
195
- /** The CSS className for the element. */
196
- class?: ClassNameOrFunction<MenuTriggerRenderProps>;
197
- /** The inline style for the element. */
198
- style?: StyleOrFunction<MenuTriggerRenderProps>;
199
- /** Whether the button is disabled. */
200
- isDisabled?: boolean;
201
- }
202
183
  export interface MenuSectionProps extends SectionProps, Pick<SelectionStateProps, "selectionMode" | "selectionBehavior" | "disallowEmptySelection" | "selectedKeys" | "defaultSelectedKeys" | "onSelectionChange" | "disabledKeys" | "disabledBehavior" | "allowDuplicateSelectionEvents"> {
203
184
  /** Whether menu items in this section should close the menu when selected. */
204
185
  shouldCloseOnSelect?: boolean;
205
186
  }
206
- export declare function MenuButton(props: MenuButtonProps): JSX.Element;
207
187
  /**
208
188
  * A menu displays a list of actions or options for the user to choose from.
209
189
  */
210
190
  export declare function Menu<T>(props: MenuProps<T>): JSX.Element;
211
191
  export declare namespace Menu {
212
192
  var Item: typeof MenuItem;
193
+ var LoadMoreItem: typeof MenuLoadMoreItem;
213
194
  }
214
195
  /**
215
196
  * An item in a menu.
@@ -219,5 +200,33 @@ export declare function MenuItem<T>(props: MenuItemProps<T>): JSX.Element;
219
200
  * Section primitive alias for Menu composition parity.
220
201
  */
221
202
  export declare function MenuSection(props: MenuSectionProps): JSX.Element;
203
+ export interface MenuLoadMoreItemProps extends SlotProps {
204
+ /** Called when the sentinel intersects the scroll parent. */
205
+ onLoadMore?: () => void | Promise<void>;
206
+ /** Whether the loading spinner should be rendered. */
207
+ isLoading?: boolean;
208
+ /**
209
+ * Offset from the bottom of the scroll region that should trigger load more,
210
+ * as a percentage of the scroll body's client height. `1` = 100%.
211
+ */
212
+ scrollOffset?: number;
213
+ /** The load more spinner to render when loading additional items. */
214
+ children?: JSX.Element;
215
+ /** The CSS className for the element. */
216
+ class?: ClassNameOrFunction<{
217
+ isLoading: boolean;
218
+ }>;
219
+ /** The inline style for the element. */
220
+ style?: StyleOrFunction<{
221
+ isLoading: boolean;
222
+ }>;
223
+ /** Ref for the loading indicator element. */
224
+ ref?: RefLike<HTMLDivElement>;
225
+ }
226
+ /**
227
+ * Load more sentinel item for menu collections.
228
+ * Port of RAC `MenuLoadMoreItem` (`react-aria-components/src/Menu.tsx`).
229
+ */
230
+ export declare function MenuLoadMoreItem(props: MenuLoadMoreItemProps): JSX.Element;
222
231
  export {};
223
232
  //# sourceMappingURL=Menu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../src/Menu.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,GAAG,EAWT,MAAM,UAAU,CAAC;AAClB,OAAO,EAWL,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,GAAG,EAER,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,SAAS,EAGf,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAA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