@proyecto-viviana/solidaria 0.4.2 → 0.6.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 (1377) hide show
  1. package/LICENSE-APACHE-2.0 +201 -0
  2. package/NOTICE +91 -0
  3. package/dist/_chunk/DragManager.js +71 -25
  4. package/dist/_chunk/DragManager.js.map +1 -1
  5. package/dist/_chunk/DragManager.jsx +71 -25
  6. package/dist/_chunk/DragManager.jsx.map +1 -1
  7. package/dist/_chunk/FocusScope.js +281 -66
  8. package/dist/_chunk/FocusScope.js.map +1 -1
  9. package/dist/_chunk/FocusScope.jsx +274 -55
  10. package/dist/_chunk/FocusScope.jsx.map +1 -1
  11. package/dist/_chunk/actiongroup.js +43 -19
  12. package/dist/_chunk/actiongroup.js.map +1 -1
  13. package/dist/_chunk/actiongroup.jsx +43 -19
  14. package/dist/_chunk/actiongroup.jsx.map +1 -1
  15. package/dist/_chunk/announce.js +19 -6
  16. package/dist/_chunk/announce.js.map +1 -1
  17. package/dist/_chunk/announce.jsx +19 -6
  18. package/dist/_chunk/announce.jsx.map +1 -1
  19. package/dist/_chunk/ariaHideOutside.js +212 -10
  20. package/dist/_chunk/ariaHideOutside.js.map +1 -1
  21. package/dist/_chunk/ariaHideOutside.jsx +212 -10
  22. package/dist/_chunk/ariaHideOutside.jsx.map +1 -1
  23. package/dist/_chunk/autocomplete.js +26 -7
  24. package/dist/_chunk/autocomplete.js.map +1 -1
  25. package/dist/_chunk/autocomplete.jsx +26 -7
  26. package/dist/_chunk/autocomplete.jsx.map +1 -1
  27. package/dist/_chunk/breadcrumbs.js +17 -2
  28. package/dist/_chunk/breadcrumbs.js.map +1 -1
  29. package/dist/_chunk/breadcrumbs.jsx +17 -2
  30. package/dist/_chunk/breadcrumbs.jsx.map +1 -1
  31. package/dist/_chunk/button.js +53 -20
  32. package/dist/_chunk/button.js.map +1 -1
  33. package/dist/_chunk/button.jsx +53 -20
  34. package/dist/_chunk/button.jsx.map +1 -1
  35. package/dist/_chunk/calendar.js +341 -56
  36. package/dist/_chunk/calendar.js.map +1 -1
  37. package/dist/_chunk/calendar.jsx +341 -56
  38. package/dist/_chunk/calendar.jsx.map +1 -1
  39. package/dist/_chunk/checkbox.js +69 -26
  40. package/dist/_chunk/checkbox.js.map +1 -1
  41. package/dist/_chunk/checkbox.jsx +69 -26
  42. package/dist/_chunk/checkbox.jsx.map +1 -1
  43. package/dist/_chunk/color.js +307 -48
  44. package/dist/_chunk/color.js.map +1 -1
  45. package/dist/_chunk/color.jsx +307 -48
  46. package/dist/_chunk/color.jsx.map +1 -1
  47. package/dist/_chunk/combobox.js +193 -103
  48. package/dist/_chunk/combobox.js.map +1 -1
  49. package/dist/_chunk/combobox.jsx +193 -103
  50. package/dist/_chunk/combobox.jsx.map +1 -1
  51. package/dist/_chunk/constants.js +12 -0
  52. package/dist/_chunk/constants.js.map +1 -1
  53. package/dist/_chunk/constants.jsx +12 -0
  54. package/dist/_chunk/constants.jsx.map +1 -1
  55. package/dist/_chunk/createCollator.js +12 -0
  56. package/dist/_chunk/createCollator.js.map +1 -1
  57. package/dist/_chunk/createCollator.jsx +12 -0
  58. package/dist/_chunk/createCollator.jsx.map +1 -1
  59. package/dist/_chunk/createCollectionRowInteraction.js +50 -13
  60. package/dist/_chunk/createCollectionRowInteraction.js.map +1 -1
  61. package/dist/_chunk/createCollectionRowInteraction.jsx +50 -13
  62. package/dist/_chunk/createCollectionRowInteraction.jsx.map +1 -1
  63. package/dist/_chunk/createField.js +35 -25
  64. package/dist/_chunk/createField.js.map +1 -1
  65. package/dist/_chunk/createField.jsx +35 -25
  66. package/dist/_chunk/createField.jsx.map +1 -1
  67. package/dist/_chunk/createFocus.js +18 -5
  68. package/dist/_chunk/createFocus.js.map +1 -1
  69. package/dist/_chunk/createFocus.jsx +18 -5
  70. package/dist/_chunk/createFocus.jsx.map +1 -1
  71. package/dist/_chunk/createFocusRing.js +16 -7
  72. package/dist/_chunk/createFocusRing.js.map +1 -1
  73. package/dist/_chunk/createFocusRing.jsx +16 -7
  74. package/dist/_chunk/createFocusRing.jsx.map +1 -1
  75. package/dist/_chunk/createFocusWithin.js +16 -4
  76. package/dist/_chunk/createFocusWithin.js.map +1 -1
  77. package/dist/_chunk/createFocusWithin.jsx +16 -4
  78. package/dist/_chunk/createFocusWithin.jsx.map +1 -1
  79. package/dist/_chunk/createFocusable.js +39 -53
  80. package/dist/_chunk/createFocusable.js.map +1 -1
  81. package/dist/_chunk/createFocusable.jsx +39 -53
  82. package/dist/_chunk/createFocusable.jsx.map +1 -1
  83. package/dist/_chunk/createFormReset.js +24 -12
  84. package/dist/_chunk/createFormReset.js.map +1 -1
  85. package/dist/_chunk/createFormReset.jsx +24 -12
  86. package/dist/_chunk/createFormReset.jsx.map +1 -1
  87. package/dist/_chunk/createFormValidation.js +41 -17
  88. package/dist/_chunk/createFormValidation.js.map +1 -1
  89. package/dist/_chunk/createFormValidation.jsx +41 -17
  90. package/dist/_chunk/createFormValidation.jsx.map +1 -1
  91. package/dist/_chunk/createHover.js +56 -42
  92. package/dist/_chunk/createHover.js.map +1 -1
  93. package/dist/_chunk/createHover.jsx +56 -42
  94. package/dist/_chunk/createHover.jsx.map +1 -1
  95. package/dist/_chunk/createKeyboard.js +205 -0
  96. package/dist/_chunk/createKeyboard.js.map +1 -0
  97. package/dist/_chunk/createKeyboard.jsx +205 -0
  98. package/dist/_chunk/createKeyboard.jsx.map +1 -0
  99. package/dist/_chunk/createLabel.js +17 -4
  100. package/dist/_chunk/createLabel.js.map +1 -1
  101. package/dist/_chunk/createLabel.jsx +17 -4
  102. package/dist/_chunk/createLabel.jsx.map +1 -1
  103. package/dist/_chunk/createLabels.js +14 -2
  104. package/dist/_chunk/createLabels.js.map +1 -1
  105. package/dist/_chunk/createLabels.jsx +14 -2
  106. package/dist/_chunk/createLabels.jsx.map +1 -1
  107. package/dist/_chunk/createLandmark.js +19 -3
  108. package/dist/_chunk/createLandmark.js.map +1 -1
  109. package/dist/_chunk/createLandmark.jsx +19 -3
  110. package/dist/_chunk/createLandmark.jsx.map +1 -1
  111. package/dist/_chunk/createLongPress.js +105 -0
  112. package/dist/_chunk/createLongPress.js.map +1 -0
  113. package/dist/_chunk/createLongPress.jsx +105 -0
  114. package/dist/_chunk/createLongPress.jsx.map +1 -0
  115. package/dist/_chunk/createOverlay.js +220 -111
  116. package/dist/_chunk/createOverlay.js.map +1 -1
  117. package/dist/_chunk/createOverlay.jsx +220 -111
  118. package/dist/_chunk/createOverlay.jsx.map +1 -1
  119. package/dist/_chunk/createOverlayTrigger.js +58 -0
  120. package/dist/_chunk/createOverlayTrigger.js.map +1 -0
  121. package/dist/_chunk/createOverlayTrigger.jsx +58 -0
  122. package/dist/_chunk/createOverlayTrigger.jsx.map +1 -0
  123. package/dist/_chunk/createPress.js +38 -28
  124. package/dist/_chunk/createPress.js.map +1 -1
  125. package/dist/_chunk/createPress.jsx +38 -28
  126. package/dist/_chunk/createPress.jsx.map +1 -1
  127. package/dist/_chunk/createProgressBar.js +17 -4
  128. package/dist/_chunk/createProgressBar.js.map +1 -1
  129. package/dist/_chunk/createProgressBar.jsx +17 -4
  130. package/dist/_chunk/createProgressBar.jsx.map +1 -1
  131. package/dist/_chunk/createSelectableItem.js +58 -20
  132. package/dist/_chunk/createSelectableItem.js.map +1 -1
  133. package/dist/_chunk/createSelectableItem.jsx +58 -20
  134. package/dist/_chunk/createSelectableItem.jsx.map +1 -1
  135. package/dist/_chunk/createSelectableList.js +776 -0
  136. package/dist/_chunk/createSelectableList.js.map +1 -0
  137. package/dist/_chunk/createSelectableList.jsx +776 -0
  138. package/dist/_chunk/createSelectableList.jsx.map +1 -0
  139. package/dist/_chunk/createStringFormatter.js +350 -5
  140. package/dist/_chunk/createStringFormatter.js.map +1 -1
  141. package/dist/_chunk/createStringFormatter.jsx +350 -5
  142. package/dist/_chunk/createStringFormatter.jsx.map +1 -1
  143. package/dist/_chunk/createToggle.js +68 -19
  144. package/dist/_chunk/createToggle.js.map +1 -1
  145. package/dist/_chunk/createToggle.jsx +68 -19
  146. package/dist/_chunk/createToggle.jsx.map +1 -1
  147. package/dist/_chunk/createTypeSelect.js +15 -3
  148. package/dist/_chunk/createTypeSelect.js.map +1 -1
  149. package/dist/_chunk/createTypeSelect.jsx +15 -3
  150. package/dist/_chunk/createTypeSelect.jsx.map +1 -1
  151. package/dist/_chunk/{visually-hidden.js → createVisuallyHidden.js} +16 -4
  152. package/dist/_chunk/createVisuallyHidden.js.map +1 -0
  153. package/dist/_chunk/{visually-hidden.jsx → createVisuallyHidden.jsx} +16 -4
  154. package/dist/_chunk/createVisuallyHidden.jsx.map +1 -0
  155. package/dist/_chunk/datepicker.js +687 -602
  156. package/dist/_chunk/datepicker.js.map +1 -1
  157. package/dist/_chunk/datepicker.jsx +687 -602
  158. package/dist/_chunk/datepicker.jsx.map +1 -1
  159. package/dist/_chunk/dialog.js +49 -19
  160. package/dist/_chunk/dialog.js.map +1 -1
  161. package/dist/_chunk/dialog.jsx +49 -19
  162. package/dist/_chunk/dialog.jsx.map +1 -1
  163. package/dist/_chunk/disclosure.js +48 -28
  164. package/dist/_chunk/disclosure.js.map +1 -1
  165. package/dist/_chunk/disclosure.jsx +48 -28
  166. package/dist/_chunk/disclosure.jsx.map +1 -1
  167. package/dist/_chunk/dnd.js +1340 -1172
  168. package/dist/_chunk/dnd.js.map +1 -1
  169. package/dist/_chunk/dnd.jsx +1340 -1172
  170. package/dist/_chunk/dnd.jsx.map +1 -1
  171. package/dist/_chunk/dom.js +1200 -0
  172. package/dist/_chunk/dom.js.map +1 -0
  173. package/dist/_chunk/dom.jsx +1200 -0
  174. package/dist/_chunk/dom.jsx.map +1 -0
  175. package/dist/_chunk/env.js +1 -57
  176. package/dist/_chunk/env.js.map +1 -1
  177. package/dist/_chunk/env.jsx +1 -57
  178. package/dist/_chunk/env.jsx.map +1 -1
  179. package/dist/_chunk/filterDOMProps.js +32 -7
  180. package/dist/_chunk/filterDOMProps.js.map +1 -1
  181. package/dist/_chunk/filterDOMProps.jsx +32 -7
  182. package/dist/_chunk/filterDOMProps.jsx.map +1 -1
  183. package/dist/_chunk/focus.js +570 -338
  184. package/dist/_chunk/focus.js.map +1 -1
  185. package/dist/_chunk/focus.jsx +570 -338
  186. package/dist/_chunk/focus.jsx.map +1 -1
  187. package/dist/_chunk/grid.js +62 -8
  188. package/dist/_chunk/grid.js.map +1 -1
  189. package/dist/_chunk/grid.jsx +62 -8
  190. package/dist/_chunk/grid.jsx.map +1 -1
  191. package/dist/_chunk/gridlist.js +192 -53
  192. package/dist/_chunk/gridlist.js.map +1 -1
  193. package/dist/_chunk/gridlist.jsx +192 -53
  194. package/dist/_chunk/gridlist.jsx.map +1 -1
  195. package/dist/_chunk/i18n.js +68 -1
  196. package/dist/_chunk/i18n.js.map +1 -1
  197. package/dist/_chunk/i18n.jsx +68 -1
  198. package/dist/_chunk/i18n.jsx.map +1 -1
  199. package/dist/_chunk/interactions.js +38 -102
  200. package/dist/_chunk/interactions.js.map +1 -1
  201. package/dist/_chunk/interactions.jsx +38 -100
  202. package/dist/_chunk/interactions.jsx.map +1 -1
  203. package/dist/_chunk/intl.js +280 -0
  204. package/dist/_chunk/intl.js.map +1 -0
  205. package/dist/_chunk/intl.jsx +280 -0
  206. package/dist/_chunk/intl.jsx.map +1 -0
  207. package/dist/_chunk/link.js +15 -4
  208. package/dist/_chunk/link.js.map +1 -1
  209. package/dist/_chunk/link.jsx +15 -4
  210. package/dist/_chunk/link.jsx.map +1 -1
  211. package/dist/_chunk/listbox.js +99 -175
  212. package/dist/_chunk/listbox.js.map +1 -1
  213. package/dist/_chunk/listbox.jsx +99 -175
  214. package/dist/_chunk/listbox.jsx.map +1 -1
  215. package/dist/_chunk/locale.js +58 -12
  216. package/dist/_chunk/locale.js.map +1 -1
  217. package/dist/_chunk/locale.jsx +57 -11
  218. package/dist/_chunk/locale.jsx.map +1 -1
  219. package/dist/_chunk/menu.js +298 -57
  220. package/dist/_chunk/menu.js.map +1 -1
  221. package/dist/_chunk/menu.jsx +298 -57
  222. package/dist/_chunk/menu.jsx.map +1 -1
  223. package/dist/_chunk/mergeProps.js +216 -0
  224. package/dist/_chunk/mergeProps.js.map +1 -0
  225. package/dist/_chunk/mergeProps.jsx +216 -0
  226. package/dist/_chunk/mergeProps.jsx.map +1 -0
  227. package/dist/_chunk/meter.js +16 -4
  228. package/dist/_chunk/meter.js.map +1 -1
  229. package/dist/_chunk/meter.jsx +16 -4
  230. package/dist/_chunk/meter.jsx.map +1 -1
  231. package/dist/_chunk/numberfield.js +167 -22
  232. package/dist/_chunk/numberfield.js.map +1 -1
  233. package/dist/_chunk/numberfield.jsx +167 -22
  234. package/dist/_chunk/numberfield.jsx.map +1 -1
  235. package/dist/_chunk/overlays.js +87 -74
  236. package/dist/_chunk/overlays.js.map +1 -1
  237. package/dist/_chunk/overlays.jsx +71 -57
  238. package/dist/_chunk/overlays.jsx.map +1 -1
  239. package/dist/_chunk/owner.js +23 -0
  240. package/dist/_chunk/owner.js.map +1 -0
  241. package/dist/_chunk/owner.jsx +23 -0
  242. package/dist/_chunk/owner.jsx.map +1 -0
  243. package/dist/_chunk/popover.js +180 -42
  244. package/dist/_chunk/popover.js.map +1 -1
  245. package/dist/_chunk/popover.jsx +180 -42
  246. package/dist/_chunk/popover.jsx.map +1 -1
  247. package/dist/_chunk/radio.js +92 -32
  248. package/dist/_chunk/radio.js.map +1 -1
  249. package/dist/_chunk/radio.jsx +92 -32
  250. package/dist/_chunk/radio.jsx.map +1 -1
  251. package/dist/_chunk/reactivity.js.map +1 -1
  252. package/dist/_chunk/reactivity.jsx.map +1 -1
  253. package/dist/_chunk/refs.js +41 -0
  254. package/dist/_chunk/refs.js.map +1 -0
  255. package/dist/_chunk/refs.jsx +41 -0
  256. package/dist/_chunk/refs.jsx.map +1 -0
  257. package/dist/_chunk/searchfield.js +69 -3
  258. package/dist/_chunk/searchfield.js.map +1 -1
  259. package/dist/_chunk/searchfield.jsx +69 -3
  260. package/dist/_chunk/searchfield.jsx.map +1 -1
  261. package/dist/_chunk/select.js +226 -80
  262. package/dist/_chunk/select.js.map +1 -1
  263. package/dist/_chunk/select.jsx +162 -70
  264. package/dist/_chunk/select.jsx.map +1 -1
  265. package/dist/_chunk/selection.js +20 -638
  266. package/dist/_chunk/selection.js.map +1 -1
  267. package/dist/_chunk/selection.jsx +20 -638
  268. package/dist/_chunk/selection.jsx.map +1 -1
  269. package/dist/_chunk/separator.js +12 -0
  270. package/dist/_chunk/separator.js.map +1 -1
  271. package/dist/_chunk/separator.jsx +12 -0
  272. package/dist/_chunk/separator.jsx.map +1 -1
  273. package/dist/_chunk/slider.js +25 -16
  274. package/dist/_chunk/slider.js.map +1 -1
  275. package/dist/_chunk/slider.jsx +25 -16
  276. package/dist/_chunk/slider.jsx.map +1 -1
  277. package/dist/_chunk/spinbutton.js +52 -42
  278. package/dist/_chunk/spinbutton.js.map +1 -1
  279. package/dist/_chunk/spinbutton.jsx +52 -42
  280. package/dist/_chunk/spinbutton.jsx.map +1 -1
  281. package/dist/_chunk/steplist.js +14 -1
  282. package/dist/_chunk/steplist.js.map +1 -1
  283. package/dist/_chunk/steplist.jsx +14 -1
  284. package/dist/_chunk/steplist.jsx.map +1 -1
  285. package/dist/_chunk/switch.js +21 -3
  286. package/dist/_chunk/switch.js.map +1 -1
  287. package/dist/_chunk/switch.jsx +21 -3
  288. package/dist/_chunk/switch.jsx.map +1 -1
  289. package/dist/_chunk/table.js +666 -88
  290. package/dist/_chunk/table.js.map +1 -1
  291. package/dist/_chunk/table.jsx +666 -88
  292. package/dist/_chunk/table.jsx.map +1 -1
  293. package/dist/_chunk/tabs.js +115 -17
  294. package/dist/_chunk/tabs.js.map +1 -1
  295. package/dist/_chunk/tabs.jsx +115 -17
  296. package/dist/_chunk/tabs.jsx.map +1 -1
  297. package/dist/_chunk/tag.js +240 -39
  298. package/dist/_chunk/tag.js.map +1 -1
  299. package/dist/_chunk/tag.jsx +240 -39
  300. package/dist/_chunk/tag.jsx.map +1 -1
  301. package/dist/_chunk/textfield.js +83 -12
  302. package/dist/_chunk/textfield.js.map +1 -1
  303. package/dist/_chunk/textfield.jsx +83 -12
  304. package/dist/_chunk/textfield.jsx.map +1 -1
  305. package/dist/_chunk/toast.js +61 -28
  306. package/dist/_chunk/toast.js.map +1 -1
  307. package/dist/_chunk/toast.jsx +61 -28
  308. package/dist/_chunk/toast.jsx.map +1 -1
  309. package/dist/_chunk/tokenfield.js +567 -0
  310. package/dist/_chunk/tokenfield.js.map +1 -0
  311. package/dist/_chunk/tokenfield.jsx +567 -0
  312. package/dist/_chunk/tokenfield.jsx.map +1 -0
  313. package/dist/_chunk/toolbar.js +25 -8
  314. package/dist/_chunk/toolbar.js.map +1 -1
  315. package/dist/_chunk/toolbar.jsx +25 -8
  316. package/dist/_chunk/toolbar.jsx.map +1 -1
  317. package/dist/_chunk/tooltip.js +379 -6
  318. package/dist/_chunk/tooltip.js.map +1 -1
  319. package/dist/_chunk/tooltip.jsx +379 -6
  320. package/dist/_chunk/tooltip.jsx.map +1 -1
  321. package/dist/_chunk/tree.js +280 -69
  322. package/dist/_chunk/tree.js.map +1 -1
  323. package/dist/_chunk/tree.jsx +280 -69
  324. package/dist/_chunk/tree.jsx.map +1 -1
  325. package/dist/_chunk/utils.js +192 -150
  326. package/dist/_chunk/utils.js.map +1 -1
  327. package/dist/_chunk/utils.jsx +192 -150
  328. package/dist/_chunk/utils.jsx.map +1 -1
  329. package/dist/_chunk/virtualFocus.js +54 -0
  330. package/dist/_chunk/virtualFocus.js.map +1 -0
  331. package/dist/_chunk/virtualFocus.jsx +54 -0
  332. package/dist/_chunk/virtualFocus.jsx.map +1 -0
  333. package/dist/_chunk/virtualizer.js +202 -0
  334. package/dist/_chunk/virtualizer.js.map +1 -0
  335. package/dist/_chunk/virtualizer.jsx +202 -0
  336. package/dist/_chunk/virtualizer.jsx.map +1 -0
  337. package/dist/actiongroup/createActionGroup.d.ts +2 -1
  338. package/dist/actiongroup/createActionGroup.d.ts.map +1 -1
  339. package/dist/autocomplete/createAutocomplete.d.ts +1 -9
  340. package/dist/autocomplete/createAutocomplete.d.ts.map +1 -1
  341. package/dist/autocomplete/intl/index.d.ts +13 -0
  342. package/dist/autocomplete/intl/index.d.ts.map +1 -0
  343. package/dist/breadcrumbs/createBreadcrumbs.d.ts +3 -1
  344. package/dist/breadcrumbs/createBreadcrumbs.d.ts.map +1 -1
  345. package/dist/breadcrumbs/intl/index.d.ts +13 -0
  346. package/dist/breadcrumbs/intl/index.d.ts.map +1 -0
  347. package/dist/button/createButton.d.ts.map +1 -1
  348. package/dist/button/createToggleButton.d.ts.map +1 -1
  349. package/dist/button/createToggleButtonGroup.d.ts +1 -1
  350. package/dist/button/createToggleButtonGroup.d.ts.map +1 -1
  351. package/dist/button/types.d.ts +14 -0
  352. package/dist/button/types.d.ts.map +1 -1
  353. package/dist/calendar/createCalendar.d.ts +1 -7
  354. package/dist/calendar/createCalendar.d.ts.map +1 -1
  355. package/dist/calendar/createCalendarCell.d.ts +0 -6
  356. package/dist/calendar/createCalendarCell.d.ts.map +1 -1
  357. package/dist/calendar/createCalendarGrid.d.ts +1 -7
  358. package/dist/calendar/createCalendarGrid.d.ts.map +1 -1
  359. package/dist/calendar/createCalendarMonthPicker.d.ts +0 -8
  360. package/dist/calendar/createCalendarMonthPicker.d.ts.map +1 -1
  361. package/dist/calendar/createCalendarYearPicker.d.ts +0 -8
  362. package/dist/calendar/createCalendarYearPicker.d.ts.map +1 -1
  363. package/dist/calendar/createRangeCalendar.d.ts +13 -7
  364. package/dist/calendar/createRangeCalendar.d.ts.map +1 -1
  365. package/dist/calendar/createRangeCalendarCell.d.ts +2 -6
  366. package/dist/calendar/createRangeCalendarCell.d.ts.map +1 -1
  367. package/dist/calendar/intl/index.d.ts.map +1 -1
  368. package/dist/calendar/utils.d.ts.map +1 -1
  369. package/dist/checkbox/createCheckbox.d.ts +2 -1
  370. package/dist/checkbox/createCheckbox.d.ts.map +1 -1
  371. package/dist/checkbox/createCheckboxGroup.d.ts +1 -9
  372. package/dist/checkbox/createCheckboxGroup.d.ts.map +1 -1
  373. package/dist/checkbox/createCheckboxGroupItem.d.ts +0 -8
  374. package/dist/checkbox/createCheckboxGroupItem.d.ts.map +1 -1
  375. package/dist/collections/index.d.ts +1 -1
  376. package/dist/collections/index.d.ts.map +1 -1
  377. package/dist/collections/index.js +18 -2
  378. package/dist/collections/index.js.map +1 -1
  379. package/dist/collections/index.jsx +18 -2
  380. package/dist/collections/index.jsx.map +1 -1
  381. package/dist/color/createColorArea.d.ts +2 -7
  382. package/dist/color/createColorArea.d.ts.map +1 -1
  383. package/dist/color/createColorField.d.ts +2 -7
  384. package/dist/color/createColorField.d.ts.map +1 -1
  385. package/dist/color/createColorSlider.d.ts +1 -6
  386. package/dist/color/createColorSlider.d.ts.map +1 -1
  387. package/dist/color/createColorSwatch.d.ts +1 -6
  388. package/dist/color/createColorSwatch.d.ts.map +1 -1
  389. package/dist/color/createColorWheel.d.ts +1 -6
  390. package/dist/color/createColorWheel.d.ts.map +1 -1
  391. package/dist/color/intl/index.d.ts.map +1 -1
  392. package/dist/color/types.d.ts +47 -1
  393. package/dist/color/types.d.ts.map +1 -1
  394. package/dist/combobox/createComboBox.d.ts +17 -8
  395. package/dist/combobox/createComboBox.d.ts.map +1 -1
  396. package/dist/combobox/intl/generated-locales.d.ts +3 -0
  397. package/dist/combobox/intl/generated-locales.d.ts.map +1 -1
  398. package/dist/combobox/intl/index.d.ts +3 -2
  399. package/dist/combobox/intl/index.d.ts.map +1 -1
  400. package/dist/datepicker/createDateField.d.ts +0 -10
  401. package/dist/datepicker/createDateField.d.ts.map +1 -1
  402. package/dist/datepicker/createDatePicker.d.ts +0 -16
  403. package/dist/datepicker/createDatePicker.d.ts.map +1 -1
  404. package/dist/datepicker/createDatePickerGroup.d.ts +1 -1
  405. package/dist/datepicker/createDatePickerGroup.d.ts.map +1 -1
  406. package/dist/datepicker/createDateRangePicker.d.ts +0 -21
  407. package/dist/datepicker/createDateRangePicker.d.ts.map +1 -1
  408. package/dist/datepicker/createDateSegment.d.ts +0 -9
  409. package/dist/datepicker/createDateSegment.d.ts.map +1 -1
  410. package/dist/datepicker/createDisplayNames.d.ts +1 -9
  411. package/dist/datepicker/createDisplayNames.d.ts.map +1 -1
  412. package/dist/datepicker/createTimeField.d.ts.map +1 -1
  413. package/dist/datepicker/intl.d.ts.map +1 -1
  414. package/dist/dialog/createDialog.d.ts +2 -4
  415. package/dist/dialog/createDialog.d.ts.map +1 -1
  416. package/dist/dialog/types.d.ts +14 -0
  417. package/dist/dialog/types.d.ts.map +1 -1
  418. package/dist/disclosure/createDisclosure.d.ts +1 -8
  419. package/dist/disclosure/createDisclosure.d.ts.map +1 -1
  420. package/dist/disclosure/createDisclosureGroup.d.ts +3 -4
  421. package/dist/disclosure/createDisclosureGroup.d.ts.map +1 -1
  422. package/dist/dnd/DragManager.d.ts +1 -16
  423. package/dist/dnd/DragManager.d.ts.map +1 -1
  424. package/dist/dnd/DropTargetKeyboardNavigation.d.ts +2 -2
  425. package/dist/dnd/createDrag.d.ts +1 -7
  426. package/dist/dnd/createDrag.d.ts.map +1 -1
  427. package/dist/dnd/createDraggableCollection.d.ts +1 -7
  428. package/dist/dnd/createDraggableCollection.d.ts.map +1 -1
  429. package/dist/dnd/createDraggableItem.d.ts +2 -7
  430. package/dist/dnd/createDraggableItem.d.ts.map +1 -1
  431. package/dist/dnd/createDrop.d.ts +1 -7
  432. package/dist/dnd/createDrop.d.ts.map +1 -1
  433. package/dist/dnd/createDropIndicator.d.ts +27 -0
  434. package/dist/dnd/createDropIndicator.d.ts.map +1 -0
  435. package/dist/dnd/createDroppableCollection.d.ts +6 -8
  436. package/dist/dnd/createDroppableCollection.d.ts.map +1 -1
  437. package/dist/dnd/createDroppableItem.d.ts +12 -10
  438. package/dist/dnd/createDroppableItem.d.ts.map +1 -1
  439. package/dist/dnd/index.d.ts +3 -1
  440. package/dist/dnd/index.d.ts.map +1 -1
  441. package/dist/dnd/index.js +2 -2
  442. package/dist/dnd/index.jsx +2 -2
  443. package/dist/dnd/intl/index.d.ts +6 -4
  444. package/dist/dnd/intl/index.d.ts.map +1 -1
  445. package/dist/dnd/types.d.ts +20 -1
  446. package/dist/dnd/types.d.ts.map +1 -1
  447. package/dist/dnd/utils.d.ts +4 -0
  448. package/dist/dnd/utils.d.ts.map +1 -1
  449. package/dist/focus/FocusScope.d.ts +9 -5
  450. package/dist/focus/FocusScope.d.ts.map +1 -1
  451. package/dist/focus/createAutoFocus.d.ts +3 -0
  452. package/dist/focus/createAutoFocus.d.ts.map +1 -1
  453. package/dist/focus/createFocusRestore.d.ts +3 -0
  454. package/dist/focus/createFocusRestore.d.ts.map +1 -1
  455. package/dist/focus/createHasTabbableChild.d.ts +13 -0
  456. package/dist/focus/createHasTabbableChild.d.ts.map +1 -0
  457. package/dist/focus/createVirtualFocus.d.ts +4 -1
  458. package/dist/focus/createVirtualFocus.d.ts.map +1 -1
  459. package/dist/focus/index.js +3 -2
  460. package/dist/focus/index.jsx +3 -2
  461. package/dist/focus/virtualFocus.d.ts +1 -1
  462. package/dist/form/createFormReset.d.ts +1 -7
  463. package/dist/form/createFormReset.d.ts.map +1 -1
  464. package/dist/form/createFormValidation.d.ts +1 -9
  465. package/dist/form/createFormValidation.d.ts.map +1 -1
  466. package/dist/grid/GridKeyboardDelegate.d.ts.map +1 -1
  467. package/dist/grid/createGrid.d.ts +1 -5
  468. package/dist/grid/createGrid.d.ts.map +1 -1
  469. package/dist/grid/createGridCell.d.ts +1 -5
  470. package/dist/grid/createGridCell.d.ts.map +1 -1
  471. package/dist/grid/createGridRow.d.ts +1 -5
  472. package/dist/grid/createGridRow.d.ts.map +1 -1
  473. package/dist/grid/index.d.ts +2 -2
  474. package/dist/grid/intl/index.d.ts +18 -0
  475. package/dist/grid/intl/index.d.ts.map +1 -0
  476. package/dist/grid/types.d.ts +25 -2
  477. package/dist/grid/types.d.ts.map +1 -1
  478. package/dist/gridlist/createGridList.d.ts +3 -5
  479. package/dist/gridlist/createGridList.d.ts.map +1 -1
  480. package/dist/gridlist/createGridListItem.d.ts +1 -5
  481. package/dist/gridlist/createGridListItem.d.ts.map +1 -1
  482. package/dist/gridlist/createGridListSection.d.ts +0 -4
  483. package/dist/gridlist/createGridListSection.d.ts.map +1 -1
  484. package/dist/gridlist/createGridListSelectionCheckbox.d.ts +1 -5
  485. package/dist/gridlist/createGridListSelectionCheckbox.d.ts.map +1 -1
  486. package/dist/gridlist/intl/index.d.ts +14 -0
  487. package/dist/gridlist/intl/index.d.ts.map +1 -0
  488. package/dist/gridlist/types.d.ts +56 -2
  489. package/dist/gridlist/types.d.ts.map +1 -1
  490. package/dist/i18n/compileIcu.d.ts +24 -0
  491. package/dist/i18n/compileIcu.d.ts.map +1 -0
  492. package/dist/i18n/createCollator.d.ts +0 -7
  493. package/dist/i18n/createCollator.d.ts.map +1 -1
  494. package/dist/i18n/createDateFormatter.d.ts +0 -7
  495. package/dist/i18n/createDateFormatter.d.ts.map +1 -1
  496. package/dist/i18n/createFilter.d.ts +0 -7
  497. package/dist/i18n/createFilter.d.ts.map +1 -1
  498. package/dist/i18n/createListFormatter.d.ts +9 -0
  499. package/dist/i18n/createListFormatter.d.ts.map +1 -0
  500. package/dist/i18n/createNumberFormatter.d.ts +0 -7
  501. package/dist/i18n/createNumberFormatter.d.ts.map +1 -1
  502. package/dist/i18n/createStringFormatter.d.ts +14 -4
  503. package/dist/i18n/createStringFormatter.d.ts.map +1 -1
  504. package/dist/i18n/index.d.ts +1 -0
  505. package/dist/i18n/index.d.ts.map +1 -1
  506. package/dist/i18n/index.js +2 -2
  507. package/dist/i18n/index.jsx +2 -2
  508. package/dist/i18n/locale.d.ts +2 -8
  509. package/dist/i18n/locale.d.ts.map +1 -1
  510. package/dist/i18n/utils.d.ts +0 -7
  511. package/dist/i18n/utils.d.ts.map +1 -1
  512. package/dist/index.d.ts +10 -7
  513. package/dist/index.d.ts.map +1 -1
  514. package/dist/index.js +27 -21
  515. package/dist/index.jsx +27 -21
  516. package/dist/interactions/FocusableProvider.d.ts +3 -2
  517. package/dist/interactions/FocusableProvider.d.ts.map +1 -1
  518. package/dist/interactions/PressEvent.d.ts +2 -1
  519. package/dist/interactions/PressEvent.d.ts.map +1 -1
  520. package/dist/interactions/createContextMenu.d.ts +24 -0
  521. package/dist/interactions/createContextMenu.d.ts.map +1 -0
  522. package/dist/interactions/createFocus.d.ts +3 -2
  523. package/dist/interactions/createFocus.d.ts.map +1 -1
  524. package/dist/interactions/createFocusRing.d.ts +2 -1
  525. package/dist/interactions/createFocusRing.d.ts.map +1 -1
  526. package/dist/interactions/createFocusWithin.d.ts +1 -6
  527. package/dist/interactions/createFocusWithin.d.ts.map +1 -1
  528. package/dist/interactions/createFocusable.d.ts +2 -6
  529. package/dist/interactions/createFocusable.d.ts.map +1 -1
  530. package/dist/interactions/createHover.d.ts +3 -10
  531. package/dist/interactions/createHover.d.ts.map +1 -1
  532. package/dist/interactions/createInteractionModality.d.ts +12 -10
  533. package/dist/interactions/createInteractionModality.d.ts.map +1 -1
  534. package/dist/interactions/createKeyboard.d.ts +12 -3
  535. package/dist/interactions/createKeyboard.d.ts.map +1 -1
  536. package/dist/interactions/createKeyboardShortcutHandler.d.ts +24 -0
  537. package/dist/interactions/createKeyboardShortcutHandler.d.ts.map +1 -0
  538. package/dist/interactions/createLongPress.d.ts +4 -7
  539. package/dist/interactions/createLongPress.d.ts.map +1 -1
  540. package/dist/interactions/createMove.d.ts +1 -6
  541. package/dist/interactions/createMove.d.ts.map +1 -1
  542. package/dist/interactions/createPress.d.ts +2 -7
  543. package/dist/interactions/createPress.d.ts.map +1 -1
  544. package/dist/interactions/index.d.ts +1 -1
  545. package/dist/interactions/index.d.ts.map +1 -1
  546. package/dist/interactions/index.js +5 -3
  547. package/dist/interactions/index.jsx +5 -3
  548. package/dist/label/createField.d.ts +7 -1
  549. package/dist/label/createField.d.ts.map +1 -1
  550. package/dist/label/createLabel.d.ts +1 -1
  551. package/dist/label/createLabel.d.ts.map +1 -1
  552. package/dist/label/createLabels.d.ts +0 -7
  553. package/dist/label/createLabels.d.ts.map +1 -1
  554. package/dist/landmark/createLandmark.d.ts +4 -1
  555. package/dist/landmark/createLandmark.d.ts.map +1 -1
  556. package/dist/link/createLink.d.ts +1 -1
  557. package/dist/link/createLink.d.ts.map +1 -1
  558. package/dist/listbox/createListBox.d.ts +8 -7
  559. package/dist/listbox/createListBox.d.ts.map +1 -1
  560. package/dist/listbox/createOption.d.ts +7 -1
  561. package/dist/listbox/createOption.d.ts.map +1 -1
  562. package/dist/live-announcer/announce.d.ts +2 -13
  563. package/dist/live-announcer/announce.d.ts.map +1 -1
  564. package/dist/menu/createMenu.d.ts +3 -7
  565. package/dist/menu/createMenu.d.ts.map +1 -1
  566. package/dist/menu/createMenuItem.d.ts +2 -1
  567. package/dist/menu/createMenuItem.d.ts.map +1 -1
  568. package/dist/menu/createMenuTrigger.d.ts +24 -20
  569. package/dist/menu/createMenuTrigger.d.ts.map +1 -1
  570. package/dist/menu/index.d.ts +1 -1
  571. package/dist/menu/index.d.ts.map +1 -1
  572. package/dist/menu/intl/index.d.ts +4 -0
  573. package/dist/menu/intl/index.d.ts.map +1 -0
  574. package/dist/meter/createMeter.d.ts +2 -1
  575. package/dist/meter/createMeter.d.ts.map +1 -1
  576. package/dist/numberfield/createNumberField.d.ts +29 -6
  577. package/dist/numberfield/createNumberField.d.ts.map +1 -1
  578. package/dist/overlays/ariaHideOutside.d.ts +0 -4
  579. package/dist/overlays/ariaHideOutside.d.ts.map +1 -1
  580. package/dist/overlays/createInteractOutside.d.ts +2 -5
  581. package/dist/overlays/createInteractOutside.d.ts.map +1 -1
  582. package/dist/overlays/createModal.d.ts +3 -6
  583. package/dist/overlays/createModal.d.ts.map +1 -1
  584. package/dist/overlays/createOverlay.d.ts +1 -5
  585. package/dist/overlays/createOverlay.d.ts.map +1 -1
  586. package/dist/overlays/createOverlayTrigger.d.ts +2 -6
  587. package/dist/overlays/createOverlayTrigger.d.ts.map +1 -1
  588. package/dist/overlays/createPreventScroll.d.ts +0 -4
  589. package/dist/overlays/createPreventScroll.d.ts.map +1 -1
  590. package/dist/overlays/index.d.ts +1 -0
  591. package/dist/overlays/index.d.ts.map +1 -1
  592. package/dist/overlays/index.js +3 -2
  593. package/dist/overlays/index.jsx +3 -2
  594. package/dist/overlays/intl/index.d.ts +13 -0
  595. package/dist/overlays/intl/index.d.ts.map +1 -0
  596. package/dist/popover/calculatePosition.d.ts +1 -1
  597. package/dist/popover/calculatePosition.d.ts.map +1 -1
  598. package/dist/popover/createOverlayPosition.d.ts +1 -7
  599. package/dist/popover/createOverlayPosition.d.ts.map +1 -1
  600. package/dist/popover/createPopover.d.ts +6 -7
  601. package/dist/popover/createPopover.d.ts.map +1 -1
  602. package/dist/progress/createProgressBar.d.ts +2 -10
  603. package/dist/progress/createProgressBar.d.ts.map +1 -1
  604. package/dist/radio/createRadio.d.ts +8 -1
  605. package/dist/radio/createRadio.d.ts.map +1 -1
  606. package/dist/radio/createRadioGroup.d.ts +1 -9
  607. package/dist/radio/createRadioGroup.d.ts.map +1 -1
  608. package/dist/searchfield/createSearchField.d.ts +1 -1
  609. package/dist/searchfield/createSearchField.d.ts.map +1 -1
  610. package/dist/searchfield/intl/index.d.ts +13 -0
  611. package/dist/searchfield/intl/index.d.ts.map +1 -0
  612. package/dist/select/createHiddenSelect.d.ts +3 -10
  613. package/dist/select/createHiddenSelect.d.ts.map +1 -1
  614. package/dist/select/createSelect.d.ts +10 -6
  615. package/dist/select/createSelect.d.ts.map +1 -1
  616. package/dist/selection/DOMLayoutDelegate.d.ts.map +1 -1
  617. package/dist/selection/ListKeyboardDelegate.d.ts +2 -1
  618. package/dist/selection/ListKeyboardDelegate.d.ts.map +1 -1
  619. package/dist/selection/constants.d.ts.map +1 -1
  620. package/dist/selection/createCollectionRowInteraction.d.ts +12 -1
  621. package/dist/selection/createCollectionRowInteraction.d.ts.map +1 -1
  622. package/dist/selection/createScrollIntoViewOnFocus.d.ts +0 -11
  623. package/dist/selection/createScrollIntoViewOnFocus.d.ts.map +1 -1
  624. package/dist/selection/createSelectableCollection.d.ts +1 -23
  625. package/dist/selection/createSelectableCollection.d.ts.map +1 -1
  626. package/dist/selection/createSelectableItem.d.ts +2 -29
  627. package/dist/selection/createSelectableItem.d.ts.map +1 -1
  628. package/dist/selection/createSelectableList.d.ts +4 -17
  629. package/dist/selection/createSelectableList.d.ts.map +1 -1
  630. package/dist/selection/createTypeSelect.d.ts +2 -8
  631. package/dist/selection/createTypeSelect.d.ts.map +1 -1
  632. package/dist/selection/index.js +3 -2
  633. package/dist/selection/index.jsx +3 -2
  634. package/dist/selection/selectItem.d.ts.map +1 -1
  635. package/dist/selection/utils.d.ts +1 -1
  636. package/dist/selection/utils.d.ts.map +1 -1
  637. package/dist/separator/createSeparator.d.ts +3 -1
  638. package/dist/separator/createSeparator.d.ts.map +1 -1
  639. package/dist/slider/createSlider.d.ts +1 -6
  640. package/dist/slider/createSlider.d.ts.map +1 -1
  641. package/dist/spinbutton/createSpinButton.d.ts +0 -9
  642. package/dist/spinbutton/createSpinButton.d.ts.map +1 -1
  643. package/dist/spinbutton/index.d.ts +2 -2
  644. package/dist/spinbutton/index.d.ts.map +1 -1
  645. package/dist/spinbutton/intl.d.ts.map +1 -1
  646. package/dist/ssr/index.d.ts +3 -9
  647. package/dist/ssr/index.d.ts.map +1 -1
  648. package/dist/ssr/index.js +47 -26
  649. package/dist/ssr/index.js.map +1 -1
  650. package/dist/ssr/index.jsx +47 -26
  651. package/dist/ssr/index.jsx.map +1 -1
  652. package/dist/steplist/createStepList.d.ts +1 -1
  653. package/dist/steplist/createStepList.d.ts.map +1 -1
  654. package/dist/switch/createSwitch.d.ts +2 -1
  655. package/dist/switch/createSwitch.d.ts.map +1 -1
  656. package/dist/table/createTable.d.ts +1 -5
  657. package/dist/table/createTable.d.ts.map +1 -1
  658. package/dist/table/createTableCell.d.ts +1 -5
  659. package/dist/table/createTableCell.d.ts.map +1 -1
  660. package/dist/table/createTableColumnHeader.d.ts +1 -5
  661. package/dist/table/createTableColumnHeader.d.ts.map +1 -1
  662. package/dist/table/createTableColumnResize.d.ts +2 -8
  663. package/dist/table/createTableColumnResize.d.ts.map +1 -1
  664. package/dist/table/createTableHeaderRow.d.ts +1 -5
  665. package/dist/table/createTableHeaderRow.d.ts.map +1 -1
  666. package/dist/table/createTableRow.d.ts +1 -5
  667. package/dist/table/createTableRow.d.ts.map +1 -1
  668. package/dist/table/createTableRowGroup.d.ts +1 -5
  669. package/dist/table/createTableRowGroup.d.ts.map +1 -1
  670. package/dist/table/createTableSelectAllCheckbox.d.ts +1 -5
  671. package/dist/table/createTableSelectAllCheckbox.d.ts.map +1 -1
  672. package/dist/table/createTableSelectionCheckbox.d.ts +1 -5
  673. package/dist/table/createTableSelectionCheckbox.d.ts.map +1 -1
  674. package/dist/table/index.d.ts +2 -2
  675. package/dist/table/intl/index.d.ts +23 -0
  676. package/dist/table/intl/index.d.ts.map +1 -0
  677. package/dist/table/types.d.ts +44 -2
  678. package/dist/table/types.d.ts.map +1 -1
  679. package/dist/table/utils.d.ts.map +1 -1
  680. package/dist/tabs/createTabs.d.ts +5 -9
  681. package/dist/tabs/createTabs.d.ts.map +1 -1
  682. package/dist/tag/createTag.d.ts +4 -8
  683. package/dist/tag/createTag.d.ts.map +1 -1
  684. package/dist/tag/createTagGroup.d.ts +0 -9
  685. package/dist/tag/createTagGroup.d.ts.map +1 -1
  686. package/dist/tag/intl/index.d.ts +14 -0
  687. package/dist/tag/intl/index.d.ts.map +1 -0
  688. package/dist/textfield/createTextField.d.ts +6 -8
  689. package/dist/textfield/createTextField.d.ts.map +1 -1
  690. package/dist/toast/createToast.d.ts +1 -8
  691. package/dist/toast/createToast.d.ts.map +1 -1
  692. package/dist/toast/createToastRegion.d.ts +7 -18
  693. package/dist/toast/createToastRegion.d.ts.map +1 -1
  694. package/dist/toast/intl/index.d.ts +14 -0
  695. package/dist/toast/intl/index.d.ts.map +1 -0
  696. package/dist/toggle/createToggle.d.ts +8 -1
  697. package/dist/toggle/createToggle.d.ts.map +1 -1
  698. package/dist/tokenfield/createToken.d.ts +15 -0
  699. package/dist/tokenfield/createToken.d.ts.map +1 -0
  700. package/dist/tokenfield/createTokenField.d.ts +52 -0
  701. package/dist/tokenfield/createTokenField.d.ts.map +1 -0
  702. package/dist/tokenfield/index.d.ts +3 -0
  703. package/dist/tokenfield/index.d.ts.map +1 -0
  704. package/dist/tokenfield/index.js +2 -0
  705. package/dist/tokenfield/index.jsx +2 -0
  706. package/dist/toolbar/createToolbar.d.ts +1 -1
  707. package/dist/toolbar/createToolbar.d.ts.map +1 -1
  708. package/dist/tooltip/createPreviewTrigger.d.ts +23 -0
  709. package/dist/tooltip/createPreviewTrigger.d.ts.map +1 -0
  710. package/dist/tooltip/createSafeArea.d.ts +20 -0
  711. package/dist/tooltip/createSafeArea.d.ts.map +1 -0
  712. package/dist/tooltip/createTooltip.d.ts +1 -1
  713. package/dist/tooltip/createTooltip.d.ts.map +1 -1
  714. package/dist/tooltip/createTooltipTrigger.d.ts +1 -9
  715. package/dist/tooltip/createTooltipTrigger.d.ts.map +1 -1
  716. package/dist/tooltip/index.d.ts +2 -0
  717. package/dist/tooltip/index.d.ts.map +1 -1
  718. package/dist/tooltip/index.js +2 -2
  719. package/dist/tooltip/index.jsx +2 -2
  720. package/dist/tooltip/intl/index.d.ts +4 -0
  721. package/dist/tooltip/intl/index.d.ts.map +1 -0
  722. package/dist/tree/createTree.d.ts +1 -5
  723. package/dist/tree/createTree.d.ts.map +1 -1
  724. package/dist/tree/createTreeItem.d.ts +1 -5
  725. package/dist/tree/createTreeItem.d.ts.map +1 -1
  726. package/dist/tree/createTreeSelectionCheckbox.d.ts +1 -5
  727. package/dist/tree/createTreeSelectionCheckbox.d.ts.map +1 -1
  728. package/dist/tree/intl/index.d.ts +14 -0
  729. package/dist/tree/intl/index.d.ts.map +1 -0
  730. package/dist/tree/types.d.ts +35 -2
  731. package/dist/tree/types.d.ts.map +1 -1
  732. package/dist/utils/ShadowTreeWalker.d.ts +30 -0
  733. package/dist/utils/ShadowTreeWalker.d.ts.map +1 -0
  734. package/dist/utils/animation.d.ts +1 -29
  735. package/dist/utils/animation.d.ts.map +1 -1
  736. package/dist/utils/capture.d.ts +14 -0
  737. package/dist/utils/capture.d.ts.map +1 -0
  738. package/dist/utils/createDescription.d.ts +1 -25
  739. package/dist/utils/createDescription.d.ts.map +1 -1
  740. package/dist/utils/dom.d.ts +45 -11
  741. package/dist/utils/dom.d.ts.map +1 -1
  742. package/dist/utils/domAttrs.d.ts +16 -0
  743. package/dist/utils/domAttrs.d.ts.map +1 -0
  744. package/dist/utils/env.d.ts +2 -0
  745. package/dist/utils/env.d.ts.map +1 -1
  746. package/dist/utils/events.d.ts +0 -4
  747. package/dist/utils/events.d.ts.map +1 -1
  748. package/dist/utils/filterDOMProps.d.ts +0 -6
  749. package/dist/utils/filterDOMProps.d.ts.map +1 -1
  750. package/dist/utils/focus.d.ts +19 -6
  751. package/dist/utils/focus.d.ts.map +1 -1
  752. package/dist/utils/geometry.d.ts +1 -1
  753. package/dist/utils/geometry.d.ts.map +1 -1
  754. package/dist/utils/getMetaValue.d.ts +13 -0
  755. package/dist/utils/getMetaValue.d.ts.map +1 -0
  756. package/dist/utils/getNonce.d.ts +9 -0
  757. package/dist/utils/getNonce.d.ts.map +1 -0
  758. package/dist/utils/globalListeners.d.ts +0 -6
  759. package/dist/utils/globalListeners.d.ts.map +1 -1
  760. package/dist/utils/index.d.ts +6 -1
  761. package/dist/utils/index.d.ts.map +1 -1
  762. package/dist/utils/index.js +7 -4
  763. package/dist/utils/index.jsx +7 -4
  764. package/dist/utils/keyboard.d.ts +0 -4
  765. package/dist/utils/keyboard.d.ts.map +1 -1
  766. package/dist/utils/mergeProps.d.ts +5 -2
  767. package/dist/utils/mergeProps.d.ts.map +1 -1
  768. package/dist/utils/owner.d.ts +14 -0
  769. package/dist/utils/owner.d.ts.map +1 -0
  770. package/dist/utils/platform.d.ts +0 -4
  771. package/dist/utils/platform.d.ts.map +1 -1
  772. package/dist/utils/reactivity.d.ts +2 -0
  773. package/dist/utils/reactivity.d.ts.map +1 -1
  774. package/dist/utils/refs.d.ts +20 -0
  775. package/dist/utils/refs.d.ts.map +1 -0
  776. package/dist/utils/runAfterTransition.d.ts +2 -0
  777. package/dist/utils/runAfterTransition.d.ts.map +1 -0
  778. package/dist/utils/scrollIntoView.d.ts +0 -4
  779. package/dist/utils/scrollIntoView.d.ts.map +1 -1
  780. package/dist/utils/splitProps.d.ts +17 -0
  781. package/dist/utils/splitProps.d.ts.map +1 -0
  782. package/dist/utils/textSelection.d.ts +0 -8
  783. package/dist/utils/textSelection.d.ts.map +1 -1
  784. package/dist/virtualizer/ScrollView.d.ts +38 -0
  785. package/dist/virtualizer/ScrollView.d.ts.map +1 -0
  786. package/dist/virtualizer/index.d.ts +3 -0
  787. package/dist/virtualizer/index.d.ts.map +1 -0
  788. package/dist/virtualizer/index.js +2 -0
  789. package/dist/virtualizer/index.jsx +2 -0
  790. package/dist/virtualizer/utils.d.ts +10 -0
  791. package/dist/virtualizer/utils.d.ts.map +1 -0
  792. package/dist/visually-hidden/createVisuallyHidden.d.ts +2 -9
  793. package/dist/visually-hidden/createVisuallyHidden.d.ts.map +1 -1
  794. package/dist/visually-hidden/index.js +1 -1
  795. package/dist/visually-hidden/index.jsx +1 -1
  796. package/package.json +30 -11
  797. package/src/actiongroup/createActionGroup.ts +49 -27
  798. package/src/autocomplete/createAutocomplete.ts +32 -5
  799. package/src/autocomplete/intl/ar-AE.json +3 -0
  800. package/src/autocomplete/intl/bg-BG.json +3 -0
  801. package/src/autocomplete/intl/cs-CZ.json +3 -0
  802. package/src/autocomplete/intl/da-DK.json +3 -0
  803. package/src/autocomplete/intl/de-DE.json +3 -0
  804. package/src/autocomplete/intl/el-GR.json +3 -0
  805. package/src/autocomplete/intl/en-US.json +3 -0
  806. package/src/autocomplete/intl/es-ES.json +3 -0
  807. package/src/autocomplete/intl/et-EE.json +3 -0
  808. package/src/autocomplete/intl/fi-FI.json +3 -0
  809. package/src/autocomplete/intl/fr-FR.json +3 -0
  810. package/src/autocomplete/intl/he-IL.json +3 -0
  811. package/src/autocomplete/intl/hr-HR.json +3 -0
  812. package/src/autocomplete/intl/hu-HU.json +3 -0
  813. package/src/autocomplete/intl/index.ts +122 -0
  814. package/src/autocomplete/intl/it-IT.json +3 -0
  815. package/src/autocomplete/intl/ja-JP.json +3 -0
  816. package/src/autocomplete/intl/ko-KR.json +3 -0
  817. package/src/autocomplete/intl/lt-LT.json +3 -0
  818. package/src/autocomplete/intl/lv-LV.json +3 -0
  819. package/src/autocomplete/intl/nb-NO.json +3 -0
  820. package/src/autocomplete/intl/nl-NL.json +3 -0
  821. package/src/autocomplete/intl/pl-PL.json +3 -0
  822. package/src/autocomplete/intl/pt-BR.json +3 -0
  823. package/src/autocomplete/intl/pt-PT.json +3 -0
  824. package/src/autocomplete/intl/ro-RO.json +3 -0
  825. package/src/autocomplete/intl/ru-RU.json +3 -0
  826. package/src/autocomplete/intl/sk-SK.json +3 -0
  827. package/src/autocomplete/intl/sl-SI.json +3 -0
  828. package/src/autocomplete/intl/sr-SP.json +3 -0
  829. package/src/autocomplete/intl/sv-SE.json +3 -0
  830. package/src/autocomplete/intl/tr-TR.json +3 -0
  831. package/src/autocomplete/intl/uk-UA.json +3 -0
  832. package/src/autocomplete/intl/zh-CN.json +3 -0
  833. package/src/autocomplete/intl/zh-TW.json +3 -0
  834. package/src/breadcrumbs/createBreadcrumbs.ts +18 -1
  835. package/src/breadcrumbs/intl/ar-AE.json +3 -0
  836. package/src/breadcrumbs/intl/bg-BG.json +3 -0
  837. package/src/breadcrumbs/intl/cs-CZ.json +3 -0
  838. package/src/breadcrumbs/intl/da-DK.json +3 -0
  839. package/src/breadcrumbs/intl/de-DE.json +3 -0
  840. package/src/breadcrumbs/intl/el-GR.json +3 -0
  841. package/src/breadcrumbs/intl/en-US.json +3 -0
  842. package/src/breadcrumbs/intl/es-ES.json +3 -0
  843. package/src/breadcrumbs/intl/et-EE.json +3 -0
  844. package/src/breadcrumbs/intl/fi-FI.json +3 -0
  845. package/src/breadcrumbs/intl/fr-FR.json +3 -0
  846. package/src/breadcrumbs/intl/he-IL.json +3 -0
  847. package/src/breadcrumbs/intl/hr-HR.json +3 -0
  848. package/src/breadcrumbs/intl/hu-HU.json +3 -0
  849. package/src/breadcrumbs/intl/index.ts +122 -0
  850. package/src/breadcrumbs/intl/it-IT.json +3 -0
  851. package/src/breadcrumbs/intl/ja-JP.json +3 -0
  852. package/src/breadcrumbs/intl/ko-KR.json +3 -0
  853. package/src/breadcrumbs/intl/lt-LT.json +3 -0
  854. package/src/breadcrumbs/intl/lv-LV.json +3 -0
  855. package/src/breadcrumbs/intl/nb-NO.json +3 -0
  856. package/src/breadcrumbs/intl/nl-NL.json +3 -0
  857. package/src/breadcrumbs/intl/pl-PL.json +3 -0
  858. package/src/breadcrumbs/intl/pt-BR.json +3 -0
  859. package/src/breadcrumbs/intl/pt-PT.json +3 -0
  860. package/src/breadcrumbs/intl/ro-RO.json +3 -0
  861. package/src/breadcrumbs/intl/ru-RU.json +3 -0
  862. package/src/breadcrumbs/intl/sk-SK.json +3 -0
  863. package/src/breadcrumbs/intl/sl-SI.json +3 -0
  864. package/src/breadcrumbs/intl/sr-SP.json +3 -0
  865. package/src/breadcrumbs/intl/sv-SE.json +3 -0
  866. package/src/breadcrumbs/intl/tr-TR.json +3 -0
  867. package/src/breadcrumbs/intl/uk-UA.json +3 -0
  868. package/src/breadcrumbs/intl/zh-CN.json +3 -0
  869. package/src/breadcrumbs/intl/zh-TW.json +3 -0
  870. package/src/button/createButton.ts +15 -1
  871. package/src/button/createToggleButton.ts +18 -5
  872. package/src/button/createToggleButtonGroup.ts +23 -8
  873. package/src/button/types.ts +16 -0
  874. package/src/calendar/createCalendar.ts +22 -3
  875. package/src/calendar/createCalendarCell.ts +104 -15
  876. package/src/calendar/createCalendarGrid.ts +37 -13
  877. package/src/calendar/createCalendarMonthPicker.ts +14 -0
  878. package/src/calendar/createCalendarYearPicker.ts +14 -0
  879. package/src/calendar/createRangeCalendar.ts +124 -1
  880. package/src/calendar/createRangeCalendarCell.ts +179 -40
  881. package/src/calendar/intl/index.ts +37 -0
  882. package/src/calendar/utils.ts +14 -0
  883. package/src/checkbox/createCheckbox.ts +32 -17
  884. package/src/checkbox/createCheckboxGroup.ts +31 -13
  885. package/src/checkbox/createCheckboxGroupItem.ts +15 -1
  886. package/src/collections/index.ts +21 -3
  887. package/src/color/createColorArea.ts +226 -29
  888. package/src/color/createColorField.ts +98 -22
  889. package/src/color/createColorSlider.ts +24 -3
  890. package/src/color/createColorSwatch.ts +18 -1
  891. package/src/color/createColorWheel.ts +27 -5
  892. package/src/color/intl/index.ts +35 -0
  893. package/src/color/types.ts +47 -1
  894. package/src/combobox/createComboBox.ts +303 -152
  895. package/src/combobox/intl/generated-locales.ts +38 -1
  896. package/src/combobox/intl/index.ts +38 -2
  897. package/src/datepicker/createDateField.ts +38 -22
  898. package/src/datepicker/createDatePicker.ts +14 -0
  899. package/src/datepicker/createDatePickerGroup.ts +24 -12
  900. package/src/datepicker/createDateRangePicker.ts +14 -0
  901. package/src/datepicker/createDateSegment.ts +110 -46
  902. package/src/datepicker/createDisplayNames.ts +16 -1
  903. package/src/datepicker/createTimeField.ts +15 -5
  904. package/src/datepicker/intl.ts +623 -544
  905. package/src/dialog/createDialog.ts +57 -30
  906. package/src/dialog/types.ts +14 -0
  907. package/src/disclosure/createDisclosure.ts +28 -6
  908. package/src/disclosure/createDisclosureGroup.ts +3 -4
  909. package/src/dnd/DragManager.ts +60 -9
  910. package/src/dnd/DropTargetKeyboardNavigation.ts +8 -6
  911. package/src/dnd/createDrag.ts +18 -1
  912. package/src/dnd/createDraggableCollection.ts +96 -32
  913. package/src/dnd/createDraggableItem.ts +73 -31
  914. package/src/dnd/createDrop.ts +18 -1
  915. package/src/dnd/createDropIndicator.ts +92 -0
  916. package/src/dnd/createDroppableCollection.ts +113 -48
  917. package/src/dnd/createDroppableItem.ts +161 -13
  918. package/src/dnd/index.ts +3 -0
  919. package/src/dnd/intl/index.ts +77 -66
  920. package/src/dnd/types.ts +20 -1
  921. package/src/dnd/utils.ts +19 -0
  922. package/src/focus/FocusScope.tsx +542 -157
  923. package/src/focus/createAutoFocus.ts +94 -68
  924. package/src/focus/createFocusRestore.ts +16 -12
  925. package/src/focus/createHasTabbableChild.ts +78 -0
  926. package/src/focus/createVirtualFocus.ts +21 -5
  927. package/src/focus/virtualFocus.ts +1 -1
  928. package/src/form/createFormReset.ts +40 -17
  929. package/src/form/createFormValidation.ts +128 -86
  930. package/src/grid/GridKeyboardDelegate.ts +14 -0
  931. package/src/grid/createGrid.ts +17 -2
  932. package/src/grid/createGridCell.ts +17 -2
  933. package/src/grid/createGridRow.ts +17 -2
  934. package/src/grid/index.ts +2 -2
  935. package/src/grid/intl/ar-AE.json +8 -0
  936. package/src/grid/intl/bg-BG.json +8 -0
  937. package/src/grid/intl/cs-CZ.json +8 -0
  938. package/src/grid/intl/da-DK.json +8 -0
  939. package/src/grid/intl/de-DE.json +8 -0
  940. package/src/grid/intl/el-GR.json +8 -0
  941. package/src/grid/intl/en-US.json +8 -0
  942. package/src/grid/intl/es-ES.json +8 -0
  943. package/src/grid/intl/et-EE.json +8 -0
  944. package/src/grid/intl/fi-FI.json +8 -0
  945. package/src/grid/intl/fr-FR.json +8 -0
  946. package/src/grid/intl/he-IL.json +8 -0
  947. package/src/grid/intl/hr-HR.json +8 -0
  948. package/src/grid/intl/hu-HU.json +8 -0
  949. package/src/grid/intl/index.ts +127 -0
  950. package/src/grid/intl/it-IT.json +8 -0
  951. package/src/grid/intl/ja-JP.json +8 -0
  952. package/src/grid/intl/ko-KR.json +8 -0
  953. package/src/grid/intl/lt-LT.json +8 -0
  954. package/src/grid/intl/lv-LV.json +8 -0
  955. package/src/grid/intl/nb-NO.json +8 -0
  956. package/src/grid/intl/nl-NL.json +8 -0
  957. package/src/grid/intl/pl-PL.json +8 -0
  958. package/src/grid/intl/pt-BR.json +8 -0
  959. package/src/grid/intl/pt-PT.json +8 -0
  960. package/src/grid/intl/ro-RO.json +8 -0
  961. package/src/grid/intl/ru-RU.json +8 -0
  962. package/src/grid/intl/sk-SK.json +8 -0
  963. package/src/grid/intl/sl-SI.json +8 -0
  964. package/src/grid/intl/sr-SP.json +8 -0
  965. package/src/grid/intl/sv-SE.json +8 -0
  966. package/src/grid/intl/tr-TR.json +8 -0
  967. package/src/grid/intl/uk-UA.json +8 -0
  968. package/src/grid/intl/zh-CN.json +8 -0
  969. package/src/grid/intl/zh-TW.json +8 -0
  970. package/src/grid/types.ts +25 -2
  971. package/src/gridlist/createGridList.ts +172 -42
  972. package/src/gridlist/createGridListItem.ts +51 -13
  973. package/src/gridlist/createGridListSection.ts +14 -0
  974. package/src/gridlist/createGridListSelectionCheckbox.ts +31 -4
  975. package/src/gridlist/intl/ar-AE.json +4 -0
  976. package/src/gridlist/intl/bg-BG.json +4 -0
  977. package/src/gridlist/intl/cs-CZ.json +4 -0
  978. package/src/gridlist/intl/da-DK.json +4 -0
  979. package/src/gridlist/intl/de-DE.json +4 -0
  980. package/src/gridlist/intl/el-GR.json +4 -0
  981. package/src/gridlist/intl/en-US.json +4 -0
  982. package/src/gridlist/intl/es-ES.json +4 -0
  983. package/src/gridlist/intl/et-EE.json +4 -0
  984. package/src/gridlist/intl/fi-FI.json +4 -0
  985. package/src/gridlist/intl/fr-FR.json +4 -0
  986. package/src/gridlist/intl/he-IL.json +4 -0
  987. package/src/gridlist/intl/hr-HR.json +4 -0
  988. package/src/gridlist/intl/hu-HU.json +4 -0
  989. package/src/gridlist/intl/index.ts +123 -0
  990. package/src/gridlist/intl/it-IT.json +4 -0
  991. package/src/gridlist/intl/ja-JP.json +4 -0
  992. package/src/gridlist/intl/ko-KR.json +4 -0
  993. package/src/gridlist/intl/lt-LT.json +4 -0
  994. package/src/gridlist/intl/lv-LV.json +4 -0
  995. package/src/gridlist/intl/nb-NO.json +4 -0
  996. package/src/gridlist/intl/nl-NL.json +4 -0
  997. package/src/gridlist/intl/pl-PL.json +4 -0
  998. package/src/gridlist/intl/pt-BR.json +4 -0
  999. package/src/gridlist/intl/pt-PT.json +4 -0
  1000. package/src/gridlist/intl/ro-RO.json +4 -0
  1001. package/src/gridlist/intl/ru-RU.json +4 -0
  1002. package/src/gridlist/intl/sk-SK.json +4 -0
  1003. package/src/gridlist/intl/sl-SI.json +4 -0
  1004. package/src/gridlist/intl/sr-SP.json +4 -0
  1005. package/src/gridlist/intl/sv-SE.json +4 -0
  1006. package/src/gridlist/intl/tr-TR.json +4 -0
  1007. package/src/gridlist/intl/uk-UA.json +4 -0
  1008. package/src/gridlist/intl/zh-CN.json +4 -0
  1009. package/src/gridlist/intl/zh-TW.json +4 -0
  1010. package/src/gridlist/types.ts +54 -2
  1011. package/src/i18n/compileIcu.ts +440 -0
  1012. package/src/i18n/createCollator.ts +14 -0
  1013. package/src/i18n/createDateFormatter.ts +14 -0
  1014. package/src/i18n/createFilter.ts +14 -0
  1015. package/src/i18n/createListFormatter.ts +38 -0
  1016. package/src/i18n/createNumberFormatter.ts +14 -0
  1017. package/src/i18n/createStringFormatter.ts +64 -8
  1018. package/src/i18n/index.ts +3 -0
  1019. package/src/i18n/locale.tsx +60 -19
  1020. package/src/i18n/utils.ts +14 -0
  1021. package/src/index.ts +49 -1
  1022. package/src/interactions/FocusableProvider.tsx +28 -11
  1023. package/src/interactions/PressEvent.ts +16 -1
  1024. package/src/interactions/createContextMenu.ts +108 -0
  1025. package/src/interactions/createFocus.ts +26 -6
  1026. package/src/interactions/createFocusRing.ts +28 -13
  1027. package/src/interactions/createFocusWithin.ts +23 -3
  1028. package/src/interactions/createFocusable.ts +45 -28
  1029. package/src/interactions/createHover.ts +102 -81
  1030. package/src/interactions/createInteractionModality.ts +135 -45
  1031. package/src/interactions/createKeyboard.ts +85 -9
  1032. package/src/interactions/createKeyboardShortcutHandler.ts +157 -0
  1033. package/src/interactions/createLongPress.ts +31 -9
  1034. package/src/interactions/createMove.ts +24 -3
  1035. package/src/interactions/createPress.ts +85 -41
  1036. package/src/interactions/index.ts +1 -0
  1037. package/src/label/createField.ts +58 -63
  1038. package/src/label/createLabel.ts +21 -4
  1039. package/src/label/createLabels.ts +25 -1
  1040. package/src/landmark/createLandmark.ts +27 -4
  1041. package/src/link/createLink.ts +20 -12
  1042. package/src/listbox/createListBox.ts +86 -310
  1043. package/src/listbox/createOption.ts +50 -14
  1044. package/src/live-announcer/announce.ts +21 -6
  1045. package/src/menu/createMenu.ts +92 -5
  1046. package/src/menu/createMenuItem.ts +40 -23
  1047. package/src/menu/createMenuTrigger.ts +179 -51
  1048. package/src/menu/index.ts +2 -0
  1049. package/src/menu/intl/index.ts +130 -0
  1050. package/src/meter/createMeter.ts +20 -5
  1051. package/src/numberfield/createNumberField.ts +254 -14
  1052. package/src/overlays/ariaHideOutside.ts +76 -11
  1053. package/src/overlays/createInteractOutside.ts +74 -47
  1054. package/src/overlays/createModal.tsx +42 -27
  1055. package/src/overlays/createOverlay.ts +107 -66
  1056. package/src/overlays/createOverlayTrigger.ts +21 -6
  1057. package/src/overlays/createPreventScroll.ts +92 -62
  1058. package/src/overlays/index.ts +2 -0
  1059. package/src/overlays/intl/ar-AE.json +3 -0
  1060. package/src/overlays/intl/bg-BG.json +3 -0
  1061. package/src/overlays/intl/cs-CZ.json +3 -0
  1062. package/src/overlays/intl/da-DK.json +3 -0
  1063. package/src/overlays/intl/de-DE.json +3 -0
  1064. package/src/overlays/intl/el-GR.json +3 -0
  1065. package/src/overlays/intl/en-US.json +3 -0
  1066. package/src/overlays/intl/es-ES.json +3 -0
  1067. package/src/overlays/intl/et-EE.json +3 -0
  1068. package/src/overlays/intl/fi-FI.json +3 -0
  1069. package/src/overlays/intl/fr-FR.json +3 -0
  1070. package/src/overlays/intl/he-IL.json +3 -0
  1071. package/src/overlays/intl/hr-HR.json +3 -0
  1072. package/src/overlays/intl/hu-HU.json +3 -0
  1073. package/src/overlays/intl/index.ts +122 -0
  1074. package/src/overlays/intl/it-IT.json +3 -0
  1075. package/src/overlays/intl/ja-JP.json +3 -0
  1076. package/src/overlays/intl/ko-KR.json +3 -0
  1077. package/src/overlays/intl/lt-LT.json +3 -0
  1078. package/src/overlays/intl/lv-LV.json +3 -0
  1079. package/src/overlays/intl/nb-NO.json +3 -0
  1080. package/src/overlays/intl/nl-NL.json +3 -0
  1081. package/src/overlays/intl/pl-PL.json +3 -0
  1082. package/src/overlays/intl/pt-BR.json +3 -0
  1083. package/src/overlays/intl/pt-PT.json +3 -0
  1084. package/src/overlays/intl/ro-RO.json +3 -0
  1085. package/src/overlays/intl/ru-RU.json +3 -0
  1086. package/src/overlays/intl/sk-SK.json +3 -0
  1087. package/src/overlays/intl/sl-SI.json +3 -0
  1088. package/src/overlays/intl/sr-SP.json +3 -0
  1089. package/src/overlays/intl/sv-SE.json +3 -0
  1090. package/src/overlays/intl/tr-TR.json +3 -0
  1091. package/src/overlays/intl/uk-UA.json +3 -0
  1092. package/src/overlays/intl/zh-CN.json +3 -0
  1093. package/src/overlays/intl/zh-TW.json +3 -0
  1094. package/src/popover/calculatePosition.ts +21 -3
  1095. package/src/popover/createOverlayPosition.ts +149 -41
  1096. package/src/popover/createPopover.ts +88 -23
  1097. package/src/progress/createProgressBar.ts +19 -4
  1098. package/src/radio/createRadio.ts +80 -25
  1099. package/src/radio/createRadioGroup.ts +47 -13
  1100. package/src/searchfield/createSearchField.ts +31 -2
  1101. package/src/searchfield/intl/ar-AE.json +3 -0
  1102. package/src/searchfield/intl/bg-BG.json +3 -0
  1103. package/src/searchfield/intl/cs-CZ.json +3 -0
  1104. package/src/searchfield/intl/da-DK.json +3 -0
  1105. package/src/searchfield/intl/de-DE.json +3 -0
  1106. package/src/searchfield/intl/el-GR.json +3 -0
  1107. package/src/searchfield/intl/en-US.json +3 -0
  1108. package/src/searchfield/intl/es-ES.json +3 -0
  1109. package/src/searchfield/intl/et-EE.json +3 -0
  1110. package/src/searchfield/intl/fi-FI.json +3 -0
  1111. package/src/searchfield/intl/fr-FR.json +3 -0
  1112. package/src/searchfield/intl/he-IL.json +3 -0
  1113. package/src/searchfield/intl/hr-HR.json +3 -0
  1114. package/src/searchfield/intl/hu-HU.json +3 -0
  1115. package/src/searchfield/intl/index.ts +122 -0
  1116. package/src/searchfield/intl/it-IT.json +3 -0
  1117. package/src/searchfield/intl/ja-JP.json +3 -0
  1118. package/src/searchfield/intl/ko-KR.json +3 -0
  1119. package/src/searchfield/intl/lt-LT.json +3 -0
  1120. package/src/searchfield/intl/lv-LV.json +3 -0
  1121. package/src/searchfield/intl/nb-NO.json +3 -0
  1122. package/src/searchfield/intl/nl-NL.json +3 -0
  1123. package/src/searchfield/intl/pl-PL.json +3 -0
  1124. package/src/searchfield/intl/pt-BR.json +3 -0
  1125. package/src/searchfield/intl/pt-PT.json +3 -0
  1126. package/src/searchfield/intl/ro-RO.json +3 -0
  1127. package/src/searchfield/intl/ru-RU.json +3 -0
  1128. package/src/searchfield/intl/sk-SK.json +3 -0
  1129. package/src/searchfield/intl/sl-SI.json +3 -0
  1130. package/src/searchfield/intl/sr-SP.json +3 -0
  1131. package/src/searchfield/intl/sv-SE.json +3 -0
  1132. package/src/searchfield/intl/tr-TR.json +3 -0
  1133. package/src/searchfield/intl/uk-UA.json +3 -0
  1134. package/src/searchfield/intl/zh-CN.json +3 -0
  1135. package/src/searchfield/intl/zh-TW.json +3 -0
  1136. package/src/select/createHiddenSelect.tsx +166 -69
  1137. package/src/select/createSelect.ts +80 -34
  1138. package/src/selection/DOMLayoutDelegate.ts +14 -0
  1139. package/src/selection/ListKeyboardDelegate.ts +16 -1
  1140. package/src/selection/constants.ts +14 -0
  1141. package/src/selection/createCollectionRowInteraction.ts +75 -6
  1142. package/src/selection/createScrollIntoViewOnFocus.ts +23 -8
  1143. package/src/selection/createSelectableCollection.ts +352 -226
  1144. package/src/selection/createSelectableItem.ts +51 -12
  1145. package/src/selection/createSelectableList.ts +21 -1
  1146. package/src/selection/createTypeSelect.ts +21 -5
  1147. package/src/selection/selectItem.ts +14 -0
  1148. package/src/selection/utils.ts +15 -1
  1149. package/src/separator/createSeparator.ts +17 -1
  1150. package/src/slider/createSlider.ts +24 -18
  1151. package/src/spinbutton/createSpinButton.ts +16 -2
  1152. package/src/spinbutton/index.ts +2 -10
  1153. package/src/spinbutton/intl.ts +70 -34
  1154. package/src/ssr/index.tsx +79 -48
  1155. package/src/steplist/createStepList.ts +17 -2
  1156. package/src/switch/createSwitch.ts +25 -4
  1157. package/src/table/createTable.ts +104 -52
  1158. package/src/table/createTableCell.ts +17 -2
  1159. package/src/table/createTableColumnHeader.ts +21 -3
  1160. package/src/table/createTableColumnResize.ts +19 -3
  1161. package/src/table/createTableHeaderRow.ts +17 -2
  1162. package/src/table/createTableRow.ts +29 -22
  1163. package/src/table/createTableRowGroup.ts +18 -3
  1164. package/src/table/createTableSelectAllCheckbox.ts +30 -14
  1165. package/src/table/createTableSelectionCheckbox.ts +21 -3
  1166. package/src/table/index.ts +2 -2
  1167. package/src/table/intl/ar-AE.json +13 -0
  1168. package/src/table/intl/bg-BG.json +13 -0
  1169. package/src/table/intl/cs-CZ.json +13 -0
  1170. package/src/table/intl/da-DK.json +13 -0
  1171. package/src/table/intl/de-DE.json +13 -0
  1172. package/src/table/intl/el-GR.json +13 -0
  1173. package/src/table/intl/en-US.json +13 -0
  1174. package/src/table/intl/es-ES.json +13 -0
  1175. package/src/table/intl/et-EE.json +13 -0
  1176. package/src/table/intl/fi-FI.json +13 -0
  1177. package/src/table/intl/fr-FR.json +13 -0
  1178. package/src/table/intl/he-IL.json +13 -0
  1179. package/src/table/intl/hr-HR.json +13 -0
  1180. package/src/table/intl/hu-HU.json +13 -0
  1181. package/src/table/intl/index.ts +132 -0
  1182. package/src/table/intl/it-IT.json +13 -0
  1183. package/src/table/intl/ja-JP.json +13 -0
  1184. package/src/table/intl/ko-KR.json +13 -0
  1185. package/src/table/intl/lt-LT.json +13 -0
  1186. package/src/table/intl/lv-LV.json +13 -0
  1187. package/src/table/intl/nb-NO.json +13 -0
  1188. package/src/table/intl/nl-NL.json +13 -0
  1189. package/src/table/intl/pl-PL.json +13 -0
  1190. package/src/table/intl/pt-BR.json +13 -0
  1191. package/src/table/intl/pt-PT.json +13 -0
  1192. package/src/table/intl/ro-RO.json +13 -0
  1193. package/src/table/intl/ru-RU.json +13 -0
  1194. package/src/table/intl/sk-SK.json +13 -0
  1195. package/src/table/intl/sl-SI.json +13 -0
  1196. package/src/table/intl/sr-SP.json +13 -0
  1197. package/src/table/intl/sv-SE.json +13 -0
  1198. package/src/table/intl/tr-TR.json +13 -0
  1199. package/src/table/intl/uk-UA.json +13 -0
  1200. package/src/table/intl/zh-CN.json +13 -0
  1201. package/src/table/intl/zh-TW.json +13 -0
  1202. package/src/table/types.ts +44 -2
  1203. package/src/table/utils.ts +15 -6
  1204. package/src/tabs/createTabs.ts +104 -37
  1205. package/src/tag/createTag.ts +118 -37
  1206. package/src/tag/createTagGroup.ts +20 -12
  1207. package/src/tag/intl/ar-AE.json +4 -0
  1208. package/src/tag/intl/bg-BG.json +4 -0
  1209. package/src/tag/intl/cs-CZ.json +4 -0
  1210. package/src/tag/intl/da-DK.json +4 -0
  1211. package/src/tag/intl/de-DE.json +4 -0
  1212. package/src/tag/intl/el-GR.json +4 -0
  1213. package/src/tag/intl/en-US.json +4 -0
  1214. package/src/tag/intl/es-ES.json +4 -0
  1215. package/src/tag/intl/et-EE.json +4 -0
  1216. package/src/tag/intl/fi-FI.json +4 -0
  1217. package/src/tag/intl/fr-FR.json +4 -0
  1218. package/src/tag/intl/he-IL.json +4 -0
  1219. package/src/tag/intl/hr-HR.json +4 -0
  1220. package/src/tag/intl/hu-HU.json +4 -0
  1221. package/src/tag/intl/index.ts +123 -0
  1222. package/src/tag/intl/it-IT.json +4 -0
  1223. package/src/tag/intl/ja-JP.json +4 -0
  1224. package/src/tag/intl/ko-KR.json +4 -0
  1225. package/src/tag/intl/lt-LT.json +4 -0
  1226. package/src/tag/intl/lv-LV.json +4 -0
  1227. package/src/tag/intl/nb-NO.json +4 -0
  1228. package/src/tag/intl/nl-NL.json +4 -0
  1229. package/src/tag/intl/pl-PL.json +4 -0
  1230. package/src/tag/intl/pt-BR.json +4 -0
  1231. package/src/tag/intl/pt-PT.json +4 -0
  1232. package/src/tag/intl/ro-RO.json +4 -0
  1233. package/src/tag/intl/ru-RU.json +4 -0
  1234. package/src/tag/intl/sk-SK.json +4 -0
  1235. package/src/tag/intl/sl-SI.json +4 -0
  1236. package/src/tag/intl/sr-SP.json +4 -0
  1237. package/src/tag/intl/sv-SE.json +4 -0
  1238. package/src/tag/intl/tr-TR.json +4 -0
  1239. package/src/tag/intl/uk-UA.json +4 -0
  1240. package/src/tag/intl/zh-CN.json +4 -0
  1241. package/src/tag/intl/zh-TW.json +4 -0
  1242. package/src/textfield/createTextField.ts +104 -14
  1243. package/src/toast/createToast.ts +39 -6
  1244. package/src/toast/createToastRegion.ts +28 -15
  1245. package/src/toast/intl/ar-AE.json +4 -0
  1246. package/src/toast/intl/bg-BG.json +4 -0
  1247. package/src/toast/intl/cs-CZ.json +4 -0
  1248. package/src/toast/intl/da-DK.json +4 -0
  1249. package/src/toast/intl/de-DE.json +4 -0
  1250. package/src/toast/intl/el-GR.json +4 -0
  1251. package/src/toast/intl/en-US.json +4 -0
  1252. package/src/toast/intl/es-ES.json +4 -0
  1253. package/src/toast/intl/et-EE.json +4 -0
  1254. package/src/toast/intl/fi-FI.json +4 -0
  1255. package/src/toast/intl/fr-FR.json +4 -0
  1256. package/src/toast/intl/he-IL.json +4 -0
  1257. package/src/toast/intl/hr-HR.json +4 -0
  1258. package/src/toast/intl/hu-HU.json +4 -0
  1259. package/src/toast/intl/index.ts +123 -0
  1260. package/src/toast/intl/it-IT.json +4 -0
  1261. package/src/toast/intl/ja-JP.json +4 -0
  1262. package/src/toast/intl/ko-KR.json +4 -0
  1263. package/src/toast/intl/lt-LT.json +4 -0
  1264. package/src/toast/intl/lv-LV.json +4 -0
  1265. package/src/toast/intl/nb-NO.json +4 -0
  1266. package/src/toast/intl/nl-NL.json +4 -0
  1267. package/src/toast/intl/pl-PL.json +4 -0
  1268. package/src/toast/intl/pt-BR.json +4 -0
  1269. package/src/toast/intl/pt-PT.json +4 -0
  1270. package/src/toast/intl/ro-RO.json +4 -0
  1271. package/src/toast/intl/ru-RU.json +4 -0
  1272. package/src/toast/intl/sk-SK.json +4 -0
  1273. package/src/toast/intl/sl-SI.json +4 -0
  1274. package/src/toast/intl/sr-SP.json +4 -0
  1275. package/src/toast/intl/sv-SE.json +4 -0
  1276. package/src/toast/intl/tr-TR.json +4 -0
  1277. package/src/toast/intl/uk-UA.json +4 -0
  1278. package/src/toast/intl/zh-CN.json +4 -0
  1279. package/src/toast/intl/zh-TW.json +4 -0
  1280. package/src/toggle/createToggle.ts +96 -15
  1281. package/src/tokenfield/createToken.ts +82 -0
  1282. package/src/tokenfield/createTokenField.ts +859 -0
  1283. package/src/tokenfield/index.ts +10 -0
  1284. package/src/toolbar/createToolbar.ts +26 -5
  1285. package/src/tooltip/createPreviewTrigger.ts +301 -0
  1286. package/src/tooltip/createSafeArea.ts +165 -0
  1287. package/src/tooltip/createTooltip.ts +15 -1
  1288. package/src/tooltip/createTooltipTrigger.ts +24 -3
  1289. package/src/tooltip/index.ts +7 -0
  1290. package/src/tooltip/intl/index.ts +76 -0
  1291. package/src/tree/createTree.ts +66 -50
  1292. package/src/tree/createTreeItem.ts +85 -21
  1293. package/src/tree/createTreeSelectionCheckbox.ts +29 -28
  1294. package/src/tree/intl/ar-AE.json +4 -0
  1295. package/src/tree/intl/bg-BG.json +4 -0
  1296. package/src/tree/intl/cs-CZ.json +4 -0
  1297. package/src/tree/intl/da-DK.json +4 -0
  1298. package/src/tree/intl/de-DE.json +4 -0
  1299. package/src/tree/intl/el-GR.json +4 -0
  1300. package/src/tree/intl/en-US.json +4 -0
  1301. package/src/tree/intl/es-ES.json +4 -0
  1302. package/src/tree/intl/et-EE.json +4 -0
  1303. package/src/tree/intl/fi-FI.json +4 -0
  1304. package/src/tree/intl/fr-FR.json +4 -0
  1305. package/src/tree/intl/he-IL.json +4 -0
  1306. package/src/tree/intl/hr-HR.json +4 -0
  1307. package/src/tree/intl/hu-HU.json +4 -0
  1308. package/src/tree/intl/index.ts +123 -0
  1309. package/src/tree/intl/it-IT.json +4 -0
  1310. package/src/tree/intl/ja-JP.json +4 -0
  1311. package/src/tree/intl/ko-KR.json +4 -0
  1312. package/src/tree/intl/lt-LT.json +4 -0
  1313. package/src/tree/intl/lv-LV.json +4 -0
  1314. package/src/tree/intl/nb-NO.json +4 -0
  1315. package/src/tree/intl/nl-NL.json +4 -0
  1316. package/src/tree/intl/pl-PL.json +4 -0
  1317. package/src/tree/intl/pt-BR.json +4 -0
  1318. package/src/tree/intl/pt-PT.json +4 -0
  1319. package/src/tree/intl/ro-RO.json +4 -0
  1320. package/src/tree/intl/ru-RU.json +4 -0
  1321. package/src/tree/intl/sk-SK.json +4 -0
  1322. package/src/tree/intl/sl-SI.json +4 -0
  1323. package/src/tree/intl/sr-SP.json +4 -0
  1324. package/src/tree/intl/sv-SE.json +4 -0
  1325. package/src/tree/intl/tr-TR.json +4 -0
  1326. package/src/tree/intl/uk-UA.json +4 -0
  1327. package/src/tree/intl/zh-CN.json +4 -0
  1328. package/src/tree/intl/zh-TW.json +4 -0
  1329. package/src/tree/types.ts +35 -2
  1330. package/src/utils/ShadowTreeWalker.ts +249 -0
  1331. package/src/utils/animation.ts +106 -85
  1332. package/src/utils/capture.ts +51 -0
  1333. package/src/utils/createDescription.ts +31 -8
  1334. package/src/utils/dom.ts +314 -33
  1335. package/src/utils/domAttrs.ts +84 -0
  1336. package/src/utils/env.ts +2 -0
  1337. package/src/utils/events.ts +39 -3
  1338. package/src/utils/filterDOMProps.ts +34 -2
  1339. package/src/utils/focus.ts +186 -32
  1340. package/src/utils/geometry.ts +15 -1
  1341. package/src/utils/getMetaValue.ts +57 -0
  1342. package/src/utils/getNonce.ts +40 -0
  1343. package/src/utils/globalListeners.ts +16 -3
  1344. package/src/utils/index.ts +14 -0
  1345. package/src/utils/keyboard.ts +15 -1
  1346. package/src/utils/mergeProps.ts +149 -16
  1347. package/src/utils/owner.ts +26 -0
  1348. package/src/utils/platform.ts +15 -1
  1349. package/src/utils/reactivity.ts +2 -0
  1350. package/src/utils/refs.ts +53 -0
  1351. package/src/utils/runAfterTransition.ts +117 -0
  1352. package/src/utils/scrollIntoView.ts +14 -0
  1353. package/src/utils/splitProps.ts +70 -0
  1354. package/src/utils/textSelection.ts +15 -1
  1355. package/src/virtualizer/ScrollView.ts +210 -0
  1356. package/src/virtualizer/index.ts +2 -0
  1357. package/src/virtualizer/utils.ts +100 -0
  1358. package/src/visually-hidden/createVisuallyHidden.ts +20 -4
  1359. package/dist/_chunk/createInteractionModality.js +0 -268
  1360. package/dist/_chunk/createInteractionModality.js.map +0 -1
  1361. package/dist/_chunk/createInteractionModality.jsx +0 -268
  1362. package/dist/_chunk/createInteractionModality.jsx.map +0 -1
  1363. package/dist/_chunk/focus2.js +0 -631
  1364. package/dist/_chunk/focus2.js.map +0 -1
  1365. package/dist/_chunk/focus2.jsx +0 -631
  1366. package/dist/_chunk/focus2.jsx.map +0 -1
  1367. package/dist/_chunk/visually-hidden.js.map +0 -1
  1368. package/dist/_chunk/visually-hidden.jsx.map +0 -1
  1369. package/dist/checkbox/createCheckboxGroupState.d.ts +0 -71
  1370. package/dist/checkbox/createCheckboxGroupState.d.ts.map +0 -1
  1371. package/dist/radio/createRadioGroupState.d.ts +0 -77
  1372. package/dist/radio/createRadioGroupState.d.ts.map +0 -1
  1373. package/dist/toggle/createToggleState.d.ts +0 -34
  1374. package/dist/toggle/createToggleState.d.ts.map +0 -1
  1375. package/src/checkbox/createCheckboxGroupState.ts +0 -174
  1376. package/src/radio/createRadioGroupState.ts +0 -177
  1377. package/src/toggle/createToggleState.ts +0 -86
@@ -1 +1 @@
1
- {"version":3,"file":"utils.jsx","names":[],"sources":["../../src/utils/platform.ts","../../src/utils/scrollIntoView.ts","../../src/utils/geometry.ts","../../src/utils/events.ts","../../src/utils/textSelection.ts","../../src/utils/keyboard.ts","../../src/utils/globalListeners.ts","../../src/utils/createDescription.ts","../../src/utils/animation.ts"],"sourcesContent":["/**\n * Platform detection utilities.\n * Based on @react-aria/utils platform detection.\n */\n\ninterface NavigatorWithUserAgentData extends Navigator {\n userAgentData?: {\n platform?: string;\n };\n}\n\nfunction getNavigator(): NavigatorWithUserAgentData | null {\n if (typeof window === \"undefined\" || window.navigator == null) return null;\n return window.navigator as NavigatorWithUserAgentData;\n}\n\nfunction testPlatform(re: RegExp): boolean {\n const nav = getNavigator();\n if (!nav) return false;\n return re.test(nav.platform || nav.userAgentData?.platform || \"\");\n}\n\nfunction testUserAgent(re: RegExp): boolean {\n const nav = getNavigator();\n return nav ? re.test(nav.userAgent) : false;\n}\n\nexport function isMac(): boolean {\n return testPlatform(/^Mac/i);\n}\n\nexport function isIPhone(): boolean {\n return testPlatform(/^iPhone/i);\n}\n\nexport function isIPad(): boolean {\n return testPlatform(/^iPad/i) || (isMac() && navigator.maxTouchPoints > 1);\n}\n\nexport function isIOS(): boolean {\n return isIPhone() || isIPad();\n}\n\nexport function isAppleDevice(): boolean {\n return isMac() || isIOS();\n}\n\nexport function isWebKit(): boolean {\n return testUserAgent(/AppleWebKit/i) && !isChrome();\n}\n\nexport function isChrome(): boolean {\n return testUserAgent(/Chrome/i);\n}\n\nexport function isAndroid(): boolean {\n return testUserAgent(/Android/i);\n}\n\nexport function isFirefox(): boolean {\n return testUserAgent(/Firefox/i);\n}\n","/**\n * Scroll-into-view utilities.\n * Based on @react-aria/utils scrollIntoView (react-aria/src/utils/scrollIntoView.ts).\n */\n\nimport { getScrollParents } from \"./dom\";\nimport { isIOS } from \"./platform\";\nimport { isTestEnv } from \"./env\";\n\ninterface ScrollIntoViewOpts {\n /** The position to align items along the block axis in. */\n block?: ScrollLogicalPosition;\n /** The position to align items along the inline axis in. */\n inline?: ScrollLogicalPosition;\n}\n\ninterface ScrollIntoViewportOpts {\n /** The optional containing element of the target to be centered in the viewport. */\n containingElement?: Element | null;\n}\n\n/**\n * Scrolls `scrollView` so that `element` is visible.\n * Similar to `element.scrollIntoView({block: 'nearest'})` (not supported in Edge),\n * but doesn't affect parents above `scrollView`.\n */\nexport function scrollIntoView(\n scrollView: HTMLElement,\n element: HTMLElement,\n opts: ScrollIntoViewOpts = {},\n): void {\n const { block = \"nearest\", inline = \"nearest\" } = opts;\n\n if (scrollView === element) {\n return;\n }\n\n let y = scrollView.scrollTop;\n let x = scrollView.scrollLeft;\n\n const target = element.getBoundingClientRect();\n const view = scrollView.getBoundingClientRect();\n const itemStyle = window.getComputedStyle(element);\n const viewStyle = window.getComputedStyle(scrollView);\n const root = document.scrollingElement || document.documentElement;\n const isRoot = scrollView === root;\n\n const viewTop = scrollView === root ? 0 : view.top;\n const viewBottom = scrollView === root ? scrollView.clientHeight : view.bottom;\n const viewLeft = scrollView === root ? 0 : view.left;\n const viewRight = scrollView === root ? scrollView.clientWidth : view.right;\n\n const scrollMarginTop = parseFloat(itemStyle.scrollMarginTop) || 0;\n const scrollMarginBottom = parseFloat(itemStyle.scrollMarginBottom) || 0;\n const scrollMarginLeft = parseFloat(itemStyle.scrollMarginLeft) || 0;\n const scrollMarginRight = parseFloat(itemStyle.scrollMarginRight) || 0;\n\n const scrollPaddingTop = parseFloat(viewStyle.scrollPaddingTop) || 0;\n const scrollPaddingBottom = parseFloat(viewStyle.scrollPaddingBottom) || 0;\n const scrollPaddingLeft = parseFloat(viewStyle.scrollPaddingLeft) || 0;\n const scrollPaddingRight = parseFloat(viewStyle.scrollPaddingRight) || 0;\n\n const borderTopWidth = parseFloat(viewStyle.borderTopWidth) || 0;\n const borderBottomWidth = parseFloat(viewStyle.borderBottomWidth) || 0;\n const borderLeftWidth = parseFloat(viewStyle.borderLeftWidth) || 0;\n const borderRightWidth = parseFloat(viewStyle.borderRightWidth) || 0;\n\n const scrollAreaTop = target.top - scrollMarginTop;\n const scrollAreaBottom = target.bottom + scrollMarginBottom;\n const scrollAreaLeft = target.left - scrollMarginLeft;\n const scrollAreaRight = target.right + scrollMarginRight;\n\n const scrollBarOffsetX = scrollView === root ? 0 : borderLeftWidth + borderRightWidth;\n const scrollBarOffsetY = scrollView === root ? 0 : borderTopWidth + borderBottomWidth;\n const scrollBarWidth =\n scrollView === root ? 0 : scrollView.offsetWidth - scrollView.clientWidth - scrollBarOffsetX;\n const scrollBarHeight =\n scrollView === root ? 0 : scrollView.offsetHeight - scrollView.clientHeight - scrollBarOffsetY;\n\n const scrollPortTop = viewTop + (isRoot ? 0 : borderTopWidth) + scrollPaddingTop;\n const scrollPortBottom =\n viewBottom - (isRoot ? 0 : borderBottomWidth) - scrollPaddingBottom - scrollBarHeight;\n let scrollPortLeft = viewLeft + (isRoot ? 0 : borderLeftWidth) + scrollPaddingLeft;\n let scrollPortRight = viewRight - (isRoot ? 0 : borderRightWidth) - scrollPaddingRight;\n\n // IOS always positions the scrollbar on the right ¯\\_(ツ)_/¯\n if (viewStyle.direction === \"rtl\" && !isIOS()) {\n scrollPortLeft += scrollBarWidth;\n } else {\n scrollPortRight -= scrollBarWidth;\n }\n\n const shouldScrollBlock = scrollAreaTop < scrollPortTop || scrollAreaBottom > scrollPortBottom;\n const shouldScrollInline = scrollAreaLeft < scrollPortLeft || scrollAreaRight > scrollPortRight;\n\n if (shouldScrollBlock && block === \"start\") {\n y += scrollAreaTop - scrollPortTop;\n } else if (shouldScrollBlock && block === \"center\") {\n y += (scrollAreaTop + scrollAreaBottom) / 2 - (scrollPortTop + scrollPortBottom) / 2;\n } else if (shouldScrollBlock && block === \"end\") {\n y += scrollAreaBottom - scrollPortBottom;\n } else if (shouldScrollBlock && block === \"nearest\") {\n const start = scrollAreaTop - scrollPortTop;\n const end = scrollAreaBottom - scrollPortBottom;\n y += Math.abs(start) <= Math.abs(end) ? start : end;\n }\n\n if (shouldScrollInline && inline === \"start\") {\n x += scrollAreaLeft - scrollPortLeft;\n } else if (shouldScrollInline && inline === \"center\") {\n x += (scrollAreaLeft + scrollAreaRight) / 2 - (scrollPortLeft + scrollPortRight) / 2;\n } else if (shouldScrollInline && inline === \"end\") {\n x += scrollAreaRight - scrollPortRight;\n } else if (shouldScrollInline && inline === \"nearest\") {\n const start = scrollAreaLeft - scrollPortLeft;\n const end = scrollAreaRight - scrollPortRight;\n x += Math.abs(start) <= Math.abs(end) ? start : end;\n }\n\n if (isTestEnv()) {\n scrollView.scrollLeft = x;\n scrollView.scrollTop = y;\n return;\n }\n\n scrollView.scrollTo({ left: x, top: y });\n}\n\n/**\n * Scrolls the `targetElement` so it is visible in the viewport. Accepts an optional\n * `opts.containingElement` that will be centered in the viewport prior to scrolling the\n * targetElement into view. If scrolling is prevented on the body (e.g. targetElement is in a\n * popover), this will only scroll the scroll parents of the targetElement up to but not including\n * the body itself.\n */\nexport function scrollIntoViewport(\n targetElement: Element | null,\n opts: ScrollIntoViewportOpts = {},\n): void {\n const { containingElement } = opts;\n if (targetElement && targetElement.isConnected) {\n const root = document.scrollingElement || document.documentElement;\n const isScrollPrevented = window.getComputedStyle(root).overflow === \"hidden\";\n if (!isScrollPrevented) {\n const { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();\n\n // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()\n // won't cause a scroll if the element is already focused and doesn't behave consistently when an element is partially out of view horizontally vs vertically\n targetElement?.scrollIntoView?.({ block: \"nearest\" });\n const { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();\n // Account for sub pixel differences from rounding\n if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {\n containingElement?.scrollIntoView?.({ block: \"center\", inline: \"center\" });\n targetElement.scrollIntoView?.({ block: \"nearest\" });\n }\n } else {\n const { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();\n\n // If scrolling is prevented, we don't want to scroll the body since it might move the overlay partially offscreen and the user can't scroll it back into view.\n let scrollParents = getScrollParents(targetElement, true);\n for (const scrollParent of scrollParents) {\n scrollIntoView(scrollParent as HTMLElement, targetElement as HTMLElement);\n }\n const { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();\n // Account for sub pixel differences from rounding\n if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {\n scrollParents = containingElement ? getScrollParents(containingElement, true) : [];\n // scroll containing element into view first, then rescroll target element into view like the non chrome flow above\n for (const scrollParent of scrollParents) {\n scrollIntoView(scrollParent as HTMLElement, containingElement as HTMLElement, {\n block: \"center\",\n inline: \"center\",\n });\n }\n for (const scrollParent of getScrollParents(targetElement, true)) {\n scrollIntoView(scrollParent as HTMLElement, targetElement as HTMLElement);\n }\n }\n }\n }\n}\n","/**\n * Geometry utilities for pointer/touch hit testing.\n * Based on @react-aria/interactions geometry utilities.\n */\n\nexport interface Rect {\n top: number;\n right: number;\n bottom: number;\n left: number;\n}\n\nexport interface EventPoint {\n clientX: number;\n clientY: number;\n width?: number;\n height?: number;\n radiusX?: number;\n radiusY?: number;\n}\n\n/**\n * Checks if two rectangles overlap.\n */\nexport function areRectanglesOverlapping(a: Rect, b: Rect): boolean {\n if (a.left > b.right || b.left > a.right) {\n return false;\n }\n\n if (a.top > b.bottom || b.top > a.bottom) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Gets the bounding rectangle for an event point (touch/pointer).\n * Takes into account the size of the touch point.\n */\nexport function getPointClientRect(point: EventPoint): Rect {\n let offsetX = 0;\n let offsetY = 0;\n\n if (point.width !== undefined && point.width > 0) {\n offsetX = point.width / 2;\n } else if (point.radiusX !== undefined && point.radiusX > 0) {\n // Fallback to radiusX/radiusY (Touch)\n offsetX = point.radiusX;\n }\n\n if (point.height !== undefined && point.height > 0) {\n offsetY = point.height / 2;\n } else if (point.radiusY !== undefined && point.radiusY > 0) {\n offsetY = point.radiusY;\n }\n\n return {\n top: point.clientY - offsetY,\n right: point.clientX + offsetX,\n bottom: point.clientY + offsetY,\n left: point.clientX - offsetX,\n };\n}\n\n/**\n * Checks if a pointer/touch point is over an element.\n */\nexport function isPointOverTarget(point: EventPoint, target: Element): boolean {\n const rect = target.getBoundingClientRect();\n const pointRect = getPointClientRect(point);\n\n return areRectanglesOverlapping(\n {\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n },\n pointRect,\n );\n}\n\n/**\n * Gets the first touch from a TouchEvent's targetTouches.\n */\nexport function getTouchFromEvent(event: TouchEvent): Touch | null {\n const { targetTouches } = event;\n if (targetTouches.length > 0) {\n return targetTouches[0];\n }\n return null;\n}\n\n/**\n * Finds a touch by its identifier in changedTouches.\n */\nexport function getTouchById(event: TouchEvent, pointerId: number | null): Touch | null {\n if (pointerId == null) {\n return null;\n }\n\n const { changedTouches } = event;\n for (let i = 0; i < changedTouches.length; i++) {\n const touch = changedTouches[i];\n if (touch.identifier === pointerId) {\n return touch;\n }\n }\n\n return null;\n}\n","/**\n * Event utilities for detecting virtual clicks and event handling.\n * Based on @react-aria/utils event utilities.\n */\n\nimport { isAndroid } from \"./platform\";\n\n/**\n * Checks if a click event was generated from a virtual source like a screen reader.\n * Virtual clicks typically have detail of 0 and may have zero coordinates.\n */\nexport function isVirtualClick(event: MouseEvent | PointerEvent): boolean {\n // JAWS/NVDA with Firefox.\n if ((event as PointerEvent).pointerType === \"\" && event.isTrusted) {\n return true;\n }\n\n // Android TalkBack's detail value varies depending on the event listener providing the event.\n // If pointerType is defined, event is from a click listener.\n if (isAndroid() && (event as PointerEvent).pointerType) {\n return event.type === \"click\" && (event as MouseEvent).buttons === 1;\n }\n\n return event.detail === 0 && !(event as PointerEvent).pointerType;\n}\n\n/**\n * Checks if a pointer event was generated by a virtual source.\n * iOS VoiceOver fires pointer events with incorrect coordinates.\n * These events have zero width/height.\n */\nexport function isVirtualPointerEvent(event: PointerEvent): boolean {\n // If the pointer size is zero, then we assume it's from a screen reader.\n // Android TalkBack double tap will sometimes return a event with width and height of 1\n // and pointerType === 'mouse' so we need to check for a specific combination of event attributes.\n // Cannot use \"event.pressure === 0\" as the sole check due to Safari pointer events always returning pressure === 0.\n return (\n (!isAndroid() && event.width === 0 && event.height === 0) ||\n (event.width === 1 &&\n event.height === 1 &&\n event.pressure === 0 &&\n event.detail === 0 &&\n event.pointerType === \"mouse\")\n );\n}\n\n/**\n * Creates a synthetic mouse event for programmatic clicking.\n */\nexport function createMouseEvent(type: string, nativeEvent?: Event): MouseEvent {\n const init: MouseEventInit = {\n bubbles: true,\n cancelable: true,\n view: window,\n };\n\n // Copy properties from the native event if provided\n if (nativeEvent) {\n const e = nativeEvent as MouseEvent;\n init.screenX = e.screenX;\n init.screenY = e.screenY;\n init.clientX = e.clientX;\n init.clientY = e.clientY;\n init.ctrlKey = e.ctrlKey;\n init.shiftKey = e.shiftKey;\n init.altKey = e.altKey;\n init.metaKey = e.metaKey;\n init.button = e.button;\n init.buttons = e.buttons;\n init.relatedTarget = e.relatedTarget;\n }\n\n return new MouseEvent(type, init);\n}\n\n/**\n * Creates a chain of event handlers that calls each in sequence.\n */\nexport function chain<T extends (...args: any[]) => any>(\n ...callbacks: (T | undefined | null)[]\n): T {\n return ((...args: Parameters<T>) => {\n for (const callback of callbacks) {\n if (typeof callback === \"function\") {\n callback(...args);\n }\n }\n }) as T;\n}\n\n/**\n * Sets the target property on an event object.\n * Used for synthetic events where target needs to be modified.\n */\nexport function setEventTarget<T extends Event>(event: T, target: EventTarget): void {\n Object.defineProperty(event, \"target\", {\n value: target,\n writable: false,\n configurable: true,\n });\n Object.defineProperty(event, \"currentTarget\", {\n value: target,\n writable: false,\n configurable: true,\n });\n}\n","/**\n * Text selection management utilities.\n * Based on @react-aria/interactions textSelection utilities.\n *\n * On iOS, long press triggers text selection. The only way to prevent this\n * is to set user-select: none on the entire page. On other platforms,\n * we can just set it on the target element.\n */\n\nimport { isIOS } from \"./platform\";\nimport { getOwnerDocument } from \"./dom\";\n\ntype State = \"default\" | \"disabled\" | \"restoring\";\n\n// Global state to manage text selection across multiple press interactions\nlet state: State = \"default\";\nlet savedUserSelect = \"\";\nlet modifiedElementMap = new WeakMap<HTMLElement, string>();\n\n/**\n * Disables text selection on the page or element during press.\n * On iOS, applies to the entire document. On other platforms, just the target.\n */\nexport function disableTextSelection(target?: HTMLElement): void {\n if (isIOS()) {\n // iOS requires disabling selection on the entire page\n if (state === \"default\") {\n const documentElement = getOwnerDocument(target).documentElement;\n savedUserSelect = documentElement.style.webkitUserSelect;\n documentElement.style.webkitUserSelect = \"none\";\n }\n state = \"disabled\";\n } else if (target) {\n // On other platforms, just disable on the target\n const element = target as HTMLElement;\n if (!modifiedElementMap.has(element)) {\n modifiedElementMap.set(element, element.style.userSelect);\n element.style.userSelect = \"none\";\n }\n }\n}\n\n/**\n * Restores text selection after press ends.\n * On iOS, waits 300ms to avoid selection appearing during tap.\n */\nexport function restoreTextSelection(target?: HTMLElement): void {\n if (isIOS()) {\n // Don't restore if another press is active\n if (state !== \"disabled\") {\n return;\n }\n\n state = \"restoring\";\n\n // Wait for iOS to finish any pending selection actions\n // 300ms is the iOS long-press delay\n setTimeout(() => {\n // Use runAfterTransition to avoid CSS recomputation during animation\n runAfterTransition(() => {\n // Only restore if still in 'restoring' state (no new press started)\n if (state === \"restoring\") {\n const documentElement = getOwnerDocument(target).documentElement;\n if (savedUserSelect) {\n documentElement.style.webkitUserSelect = savedUserSelect;\n } else {\n documentElement.style.removeProperty(\"-webkit-user-select\");\n }\n savedUserSelect = \"\";\n state = \"default\";\n }\n });\n }, 300);\n } else if (target) {\n // On other platforms, restore immediately\n const element = target as HTMLElement;\n const savedValue = modifiedElementMap.get(element);\n if (savedValue !== undefined) {\n if (savedValue) {\n element.style.userSelect = savedValue;\n } else {\n element.style.removeProperty(\"user-select\");\n }\n modifiedElementMap.delete(element);\n }\n }\n}\n\n// Tracks pending transitions for runAfterTransition\nconst pendingTransitions = new Set<() => void>();\nlet transitionTimeout: ReturnType<typeof setTimeout> | null = null;\n\n/**\n * Runs a callback after CSS transitions complete.\n * Batches multiple callbacks to avoid unnecessary layout thrashing.\n */\nfunction runAfterTransition(callback: () => void): void {\n // If we haven't started tracking transitions, run immediately\n pendingTransitions.add(callback);\n\n // Debounce - wait for any transitions to settle\n if (transitionTimeout != null) {\n clearTimeout(transitionTimeout);\n }\n\n transitionTimeout = setTimeout(() => {\n // Run all pending callbacks\n for (const cb of pendingTransitions) {\n cb();\n }\n pendingTransitions.clear();\n transitionTimeout = null;\n }, 0);\n}\n","/**\n * Keyboard / modifier-key helpers.\n * Based on @react-aria/utils' keyboard utilities.\n */\n\nimport { isMac } from \"./platform\";\n\n/** The modifier-key fields consulted by {@link isCtrlKeyPressed}. */\ninterface ModifierKeyEvent {\n ctrlKey?: boolean;\n metaKey?: boolean;\n}\n\n/**\n * Returns whether the platform's non-contiguous selection modifier is pressed:\n * the Command key on macOS, the Control key elsewhere. Mirrors\n * `@react-aria/utils`' `isCtrlKeyPressed`.\n */\nexport function isCtrlKeyPressed(e: ModifierKeyEvent): boolean {\n if (isMac()) {\n return e.metaKey === true;\n }\n\n return e.ctrlKey === true;\n}\n","/**\n * Global listener management utility.\n * Based on @react-aria/utils useGlobalListeners hook, adapted for SolidJS.\n *\n * In SolidJS, we use onCleanup for automatic cleanup instead of useEffect return.\n */\n\nimport { onCleanup } from \"solid-js\";\n\nexport interface GlobalListenerOptions extends AddEventListenerOptions {\n /** Whether to add the listener to the window instead of document */\n isWindow?: boolean;\n}\n\n/**\n * Creates a manager for global event listeners that automatically cleans up.\n * Use this in a component to register document/window level listeners\n * that will be removed when the component unmounts.\n */\nexport function createGlobalListeners() {\n const listeners: Array<{\n target: EventTarget;\n type: string;\n handler: EventListener;\n options?: AddEventListenerOptions;\n }> = [];\n\n /**\n * Adds a global event listener.\n */\n function addGlobalListener<K extends keyof DocumentEventMap>(\n type: K,\n handler: (ev: DocumentEventMap[K]) => void,\n options?: GlobalListenerOptions,\n ): void;\n function addGlobalListener<K extends keyof WindowEventMap>(\n type: K,\n handler: (ev: WindowEventMap[K]) => void,\n options?: GlobalListenerOptions & { isWindow: true },\n ): void;\n function addGlobalListener(\n type: string,\n handler: EventListener,\n options?: GlobalListenerOptions,\n ): void {\n const target = options?.isWindow ? window : document;\n const listenerOptions = options\n ? {\n capture: options.capture,\n passive: options.passive,\n once: options.once,\n }\n : undefined;\n\n target.addEventListener(type, handler, listenerOptions);\n listeners.push({ target, type, handler, options: listenerOptions });\n }\n\n /**\n * Removes a specific global event listener.\n */\n function removeGlobalListener<K extends keyof DocumentEventMap>(\n type: K,\n handler: (ev: DocumentEventMap[K]) => void,\n options?: AddEventListenerOptions,\n ): void;\n function removeGlobalListener<K extends keyof WindowEventMap>(\n type: K,\n handler: (ev: WindowEventMap[K]) => void,\n options?: AddEventListenerOptions & { isWindow: true },\n ): void;\n function removeGlobalListener(\n type: string,\n handler: EventListener,\n options?: AddEventListenerOptions & { isWindow?: boolean },\n ): void {\n const target = options?.isWindow ? window : document;\n const listenerOptions = options\n ? {\n capture: options.capture,\n }\n : undefined;\n\n target.removeEventListener(type, handler, listenerOptions);\n\n // Remove from tracked listeners\n const index = listeners.findIndex(\n (l) =>\n l.target === target &&\n l.type === type &&\n l.handler === handler &&\n l.options?.capture === listenerOptions?.capture,\n );\n if (index !== -1) {\n listeners.splice(index, 1);\n }\n }\n\n /**\n * Removes all registered global listeners.\n */\n function removeAllGlobalListeners(): void {\n for (const { target, type, handler, options } of listeners) {\n target.removeEventListener(type, handler, options);\n }\n listeners.length = 0;\n }\n\n // Automatically clean up when the component/scope is disposed\n onCleanup(removeAllGlobalListeners);\n\n return {\n addGlobalListener,\n removeGlobalListener,\n removeAllGlobalListeners,\n };\n}\n\n/**\n * Simple utility to add a single global listener with automatic cleanup.\n * For one-off listeners where the full manager isn't needed.\n */\nexport function addGlobalListenerOnce<K extends keyof DocumentEventMap>(\n type: K,\n handler: (ev: DocumentEventMap[K]) => void,\n options?: GlobalListenerOptions,\n): () => void {\n const target = options?.isWindow ? window : document;\n const listenerOptions = options\n ? {\n capture: options.capture,\n passive: options.passive,\n once: options.once,\n }\n : undefined;\n\n target.addEventListener(type, handler as EventListener, listenerOptions);\n\n return () => {\n target.removeEventListener(type, handler as EventListener, listenerOptions);\n };\n}\n","/**\n * createDescription - Creates a hidden element for dynamic aria-describedby content.\n *\n * This utility creates a visually hidden element containing description text and\n * returns an aria-describedby prop pointing to it. Multiple components using the\n * same description will share the same element (reference counted).\n *\n * Port of @react-aria/utils/useDescription.\n *\n * @example\n * ```tsx\n * function SortableColumn(props) {\n * const descriptionProps = createDescription(\n * () => props.sortDirection ? `Sorted ${props.sortDirection}` : undefined\n * );\n *\n * return (\n * <th {...descriptionProps}>\n * {props.children}\n * </th>\n * );\n * }\n * ```\n */\n\nimport { createSignal, createEffect, onCleanup, type Accessor } from \"solid-js\";\nimport { isServer } from \"solid-js/web\";\n\nexport interface DescriptionProps {\n \"aria-describedby\"?: string;\n}\n\nlet descriptionId = 0;\nconst descriptionNodes = new Map<string, { refCount: number; element: Element }>();\n\n/**\n * Creates an invisible description element and returns aria-describedby props.\n *\n * The element is created in the DOM and reference counted - multiple uses of\n * the same description text will share the same element. When all references\n * are removed, the element is cleaned up.\n *\n * @param description - Accessor that returns the description text, or undefined\n * @returns Object with aria-describedby prop (or empty object if no description)\n *\n * @example\n * ```tsx\n * const descProps = createDescription(() => 'Press Enter to submit');\n * return <button {...descProps}>Submit</button>;\n * ```\n */\nexport function createDescription(description: Accessor<string | undefined>): DescriptionProps {\n if (isServer) {\n return {};\n }\n\n const [id, setId] = createSignal<string | undefined>();\n\n createEffect(() => {\n const desc = description();\n\n if (!desc) {\n setId(undefined);\n return;\n }\n\n let node = descriptionNodes.get(desc);\n\n if (!node) {\n const newId = `solidaria-description-${descriptionId++}`;\n setId(newId);\n\n const element = document.createElement(\"div\");\n element.id = newId;\n element.style.display = \"none\";\n element.textContent = desc;\n document.body.appendChild(element);\n\n node = { refCount: 0, element };\n descriptionNodes.set(desc, node);\n } else {\n setId(node.element.id);\n }\n\n node.refCount++;\n\n onCleanup(() => {\n if (node && --node.refCount === 0) {\n node.element.remove();\n descriptionNodes.delete(desc);\n }\n });\n });\n\n return {\n get \"aria-describedby\"() {\n const desc = description();\n return desc ? id() : undefined;\n },\n };\n}\n\n/**\n * Utility to get all active description nodes (for testing).\n * @internal\n */\nexport function getDescriptionNodeCount(): number {\n return descriptionNodes.size;\n}\n\n/**\n * Utility to clear all description nodes (for testing cleanup).\n * @internal\n */\nexport function clearDescriptionNodes(): void {\n for (const [, node] of descriptionNodes) {\n node.element.remove();\n }\n descriptionNodes.clear();\n}\n","/**\n * Enter/exit animation primitives for Solidaria.\n *\n * A faithful SolidJS port of `react-aria`'s `useEnterAnimation` /\n * `useExitAnimation` (react-aria/src/utils/animation.ts). These drive the\n * `data-entering` / `data-exiting` render-prop flags that overlay styles key\n * their motion tokens off of (opacity/translate transitions on Modal, Popover,\n * Tooltip, …). Without them a styled overlay ships the tokens but never flips\n * the state that triggers the transition, so it appears/disappears instantly.\n *\n * Two mechanisms are covered, exactly as upstream:\n * 1. CSS `@keyframes` — the `animation` property is present while entering and\n * removed when the animation finishes.\n * 2. CSS transitions — the initial styles apply while entering and are removed\n * immediately, so the transition plays. Premature transitions triggered\n * before the ready state (e.g. a popover positioned after mount) are\n * cancelled so only the intended enter transition runs.\n *\n * SolidJS notes:\n * - Refs are passed as accessors (`() => element`) rather than React ref\n * objects, so a signal-backed ref re-runs the effect when the element mounts.\n * - `isReady` gates the enter animation. In React the caller unmounts the\n * overlay while closed, so the hook re-initializes per open; a Solid component\n * often stays mounted with its overlay behind a `<Show>`, so pass\n * `isReady={isOpen}` to defer the enter until the element actually mounts.\n * - `createEffect` replaces `useLayoutEffect`; effects never run during SSR, so\n * the `CSSTransition` reference is only touched on the client.\n */\n\nimport {\n createComputed,\n createEffect,\n createMemo,\n createSignal,\n onCleanup,\n type Accessor,\n} from \"solid-js\";\n\n/** A reactive accessor for the animated element (null until mounted). */\nexport type ElementAccessor = () => Element | null | undefined;\n\n/**\n * Runs `onEnd` once the element's animations settle while `isActive` is true.\n * Mirrors the private `useAnimation` helper in react-aria's animation utils.\n *\n * `deferNoAnimation` mirrors React's timing for the no-animation case. Upstream\n * runs `onEnd` inside a `useLayoutEffect`, so an animation-less exit unmounts\n * *after* React commits — i.e. after the triggering input event finishes\n * dispatching (empirically, an Escape's teardown lands after `keyup`, not\n * between `keydown` and `keyup`). A Solid `createEffect` runs synchronously\n * inside the handler, so an animation-less exit would tear the overlay out\n * mid-gesture, firing `focusout` before `keyup` and retargeting `keyup` to the\n * body. Deferring `onEnd` to the next frame — the same primitive `FocusScope`\n * uses to defer focus restore — reproduces React's post-commit ordering. Only\n * the real-browser no-animation branch defers; the JSDOM branch stays\n * synchronous so unit tests that assert immediate unmount are unaffected.\n */\nfunction createAnimation(\n ref: ElementAccessor,\n isActive: Accessor<boolean>,\n onEnd: () => void,\n deferNoAnimation = false,\n): void {\n createEffect(() => {\n if (!isActive()) return;\n const element = ref();\n if (!element) return;\n\n if (!(\"getAnimations\" in element)) {\n // JSDOM and other environments without the Web Animations API.\n onEnd();\n return;\n }\n\n // `settle` mirrors React's post-commit `useLayoutEffect` timing (see the\n // `deferNoAnimation` note above): a Solid effect runs synchronously inside\n // the triggering input handler, and even the Web-Animations `finished`\n // promise resolves in a microtask that drains *before* the gesture's later\n // events (e.g. an Escape's `keyup`). Deferring the settle to the next frame\n // pushes the overlay teardown past the rest of the current event dispatch,\n // reproducing React's ordering (teardown after `keyup`, not between\n // `keydown` and `keyup`). A real, non-trivial exit transition already\n // finishes long after the gesture, so the extra frame is imperceptible; it\n // only matters for the instant/near-zero-duration exits that would\n // otherwise tear the focused overlay out mid-gesture. Unit environments\n // (no `requestAnimationFrame`, or the no-defer callers) settle synchronously.\n //\n // A single owner-bound `onCleanup` tracks both the pending frame and a\n // `canceled` flag — the flag guards the promise path, whose `.then` runs\n // outside the reactive owner where `onCleanup` could not register.\n let canceled = false;\n let frame: number | undefined;\n const settle = () => {\n if (canceled) return;\n if (deferNoAnimation && typeof requestAnimationFrame === \"function\") {\n frame = requestAnimationFrame(() => {\n if (!canceled) onEnd();\n });\n } else {\n onEnd();\n }\n };\n\n const animations = element.getAnimations();\n if (animations.length === 0) {\n settle();\n } else {\n Promise.allSettled(animations.map((animation) => animation.finished)).then(() => {\n settle();\n });\n }\n\n onCleanup(() => {\n canceled = true;\n if (frame !== undefined && typeof cancelAnimationFrame === \"function\") {\n cancelAnimationFrame(frame);\n }\n });\n });\n}\n\n/**\n * Tracks whether an element is playing its enter animation.\n *\n * Returns an accessor that is `true` while the element should carry\n * `data-entering` (its initial, pre-transition styles), then flips to `false`\n * once the animation is set up — which removes the initial styles and lets the\n * CSS transition play.\n *\n * @param ref - Accessor for the animated element.\n * @param isReady - Whether the element is ready to animate in. Defaults to\n * `true`. Pass an `isOpen` accessor when the component stays mounted while the\n * overlay is hidden, so the enter state does not resolve before the element\n * mounts.\n */\nexport function createEnterAnimation(\n ref: ElementAccessor,\n isReady: Accessor<boolean> = () => true,\n): Accessor<boolean> {\n const [isEntering, setIsEntering] = createSignal(true);\n const isAnimationReady = () => isEntering() && isReady();\n\n // Cancel any transitions triggered before the ready state (case 2 above), so\n // only the intended enter transition — the one that starts when the initial\n // styles are removed — runs.\n createEffect(() => {\n if (!isAnimationReady()) return;\n const element = ref();\n if (!element || !(\"getAnimations\" in element)) return;\n for (const animation of element.getAnimations()) {\n if (animation instanceof CSSTransition) {\n animation.cancel();\n }\n }\n });\n\n createAnimation(ref, isAnimationReady, () => setIsEntering(false));\n\n return isAnimationReady;\n}\n\n/**\n * Tracks whether an element is playing its exit animation.\n *\n * Keeps the caller informed so the element can stay mounted (`isOpen ||\n * isExiting`) until its exit transition finishes. Implements the same\n * `'closed' | 'open' | 'exiting'` state machine as react-aria's\n * `useExitAnimation`, including interruption: reopening mid-exit returns to the\n * open state.\n *\n * @param ref - Accessor for the animated element.\n * @param isOpen - Whether the element is currently open.\n */\nexport function createExitAnimation(\n ref: ElementAccessor,\n isOpen: Accessor<boolean>,\n): Accessor<boolean> {\n // The state machine's synchronous edges (open→exiting on close, →open on\n // reopen) are computed in a `createMemo`, NOT a `createEffect`. This is the\n // Solid equivalent of react-aria's `setState`-*during-render*: because the\n // memo is a dependency of the caller's mount gate (`isOpen() || isExiting()`),\n // Solid recomputes it *before* the gate in the same synchronous propagation\n // that flips `isOpen`. A `createEffect` runs in the later effects phase, so\n // the gate would first observe `!isOpen && !isExiting` and unmount the\n // overlay, then the effect would flip `exiting` true and remount it from\n // scratch — recreating the whole subtree (Dialog section, focus scope) and\n // firing a spurious focus bounce mid-gesture. The memo closes that window so\n // the overlay stays mounted continuously through the exit, matching React's\n // single-commit `isOpen || isExiting`.\n //\n // Only the *async* edge (exiting→closed, when the animation settles) stays\n // event-driven: `createAnimation` bumps `exitFinished`, and the memo\n // acknowledges the new value via `ackedFinish` carried in its own previous\n // result — a pure epoch/ack so the memo never mutates external state.\n type ExitState = \"closed\" | \"open\" | \"exiting\";\n const [exitFinished, setExitFinished] = createSignal(0);\n\n const exitState = createMemo<{ state: ExitState; ackedFinish: number }>(\n (prev) => {\n const open = isOpen();\n const finish = exitFinished();\n const compute = (): { state: ExitState; ackedFinish: number } => {\n if (open) return { state: \"open\", ackedFinish: finish };\n // Open element requested to close: begin exiting.\n if (prev.state === \"open\") return { state: \"exiting\", ackedFinish: finish };\n // Mid-exit: settle to closed only once the animation reports a new finish.\n if (prev.state === \"exiting\") {\n if (finish !== prev.ackedFinish) return { state: \"closed\", ackedFinish: finish };\n return prev;\n }\n return { state: \"closed\", ackedFinish: finish };\n };\n return compute();\n },\n { state: isOpen() ? \"open\" : \"closed\", ackedFinish: 0 },\n );\n\n const isExiting = () => exitState().state === \"exiting\";\n\n // Keep the state machine eagerly subscribed. The caller's mount gate\n // `isOpen() || isExiting()` short-circuits on `isOpen()` while open and never\n // reads `isExiting`, so this lazy memo would go unobserved for the whole open\n // lifetime — never advancing to \"open\". Then on close it would recompute once,\n // straight from its stale initial \"closed\" back to \"closed\" (the \"open→exiting\"\n // edge never taken), collapsing the exit: `combinedExiting` stays false, the\n // caller's `<Show>` sees the gate go falsy, and the overlay Portal unmounts\n // synchronously mid-gesture (blurring the focused dialog to <body> before the\n // triggering key's `keyup`). An eager reader forces the memo to track `isOpen`\n // continuously so `prev.state === \"open\"` holds when the close edge runs —\n // mirroring React, whose component re-renders and re-derives this every commit.\n createComputed(() => void exitState());\n\n createAnimation(\n ref,\n isExiting,\n () => {\n setExitFinished((n) => n + 1);\n },\n true,\n );\n\n return isExiting;\n}\n"],"mappings":";;;;;AAWA,SAAS,eAAkD;CACzD,IAAI,OAAO,WAAW,eAAe,OAAO,aAAa,MAAM,OAAO;CACtE,OAAO,OAAO;AAChB;AAEA,SAAS,aAAa,IAAqB;CACzC,MAAM,MAAM,aAAa;CACzB,IAAI,CAAC,KAAK,OAAO;CACjB,OAAO,GAAG,KAAK,IAAI,YAAY,IAAI,eAAe,YAAY,EAAE;AAClE;AAEA,SAAS,cAAc,IAAqB;CAC1C,MAAM,MAAM,aAAa;CACzB,OAAO,MAAM,GAAG,KAAK,IAAI,SAAS,IAAI;AACxC;AAEA,SAAgB,QAAiB;CAC/B,OAAO,aAAa,OAAO;AAC7B;AAEA,SAAgB,WAAoB;CAClC,OAAO,aAAa,UAAU;AAChC;AAEA,SAAgB,SAAkB;CAChC,OAAO,aAAa,QAAQ,KAAM,MAAM,KAAK,UAAU,iBAAiB;AAC1E;AAEA,SAAgB,QAAiB;CAC/B,OAAO,SAAS,KAAK,OAAO;AAC9B;AAEA,SAAgB,gBAAyB;CACvC,OAAO,MAAM,KAAK,MAAM;AAC1B;AAEA,SAAgB,WAAoB;CAClC,OAAO,cAAc,cAAc,KAAK,CAAC,SAAS;AACpD;AAEA,SAAgB,WAAoB;CAClC,OAAO,cAAc,SAAS;AAChC;AAEA,SAAgB,YAAqB;CACnC,OAAO,cAAc,UAAU;AACjC;AAEA,SAAgB,YAAqB;CACnC,OAAO,cAAc,UAAU;AACjC;;;;;;;;;;;;ACnCA,SAA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EACpB,MAAM,SAAS,aAAa;EAC5B,MAAM,gBAA2D;GAC/D,IAAI,MAAM,OAAO;IAAE,OAAO;IAAQ,aAAa;GAAO;GAEtD,IAAI,KAAK,UAAU,QAAQ,OAAO;IAAE,OAAO;IAAW,aAAa;GAAO;GAE1E,IAAI,KAAK,UAAU,WAAW;IAC5B,IAAI,WAAW,KAAK,aAAa,OAAO;KAAE,OAAO;KAAU,aAAa;IAAO;IAC/E,OAAO;GACT;GACA,OAAO;IAAE,OAAO;IAAU,aAAa;GAAO;EAChD;EACA,OAAO,QAAQ;CACjB,GACA;EAAE,OAAO,OAAO,IAAI,SAAS;EAAU,aAAa;CAAE,CACxD;CAEA,MAAM,kBAAkB,UAAU,CAAC,CAAC,UAAU;CAa9C,qBAAqB,KAAK,UAAU,CAAC;CAErC,gBACE,KACA,iBACM;EACJ,iBAAiB,MAAM,IAAI,CAAC;CAC9B,GACA,IACF;CAEA,OAAO;AACT"}
1
+ {"version":3,"file":"utils.jsx","names":[],"sources":["../../src/utils/splitProps.ts","../../src/utils/capture.ts","../../src/utils/scrollIntoView.ts","../../src/utils/geometry.ts","../../src/utils/textSelection.ts","../../src/utils/keyboard.ts","../../src/utils/globalListeners.ts","../../src/utils/createDescription.ts","../../src/utils/animation.ts"],"sourcesContent":["/**\n * Solid 1 `splitProps` replacement built on Solid 2 `omit`.\n *\n * `omit` only returns the rest object. Call sites still need a reactive\n * picked view (`local.class`, `local.children`) that re-reads `props` on\n * each access — a plain destructure would freeze values. Each picked group\n * is a getter proxy over the original props object.\n */\n\nimport { omit } from \"solid-js\";\nimport { assignRef } from \"./refs\";\n\nexport function splitProps<T extends object, const K extends readonly (keyof T)[]>(\n props: T,\n keys: K,\n): [picked: Pick<T, K[number]>, rest: Omit<T, K[number]>];\nexport function splitProps<\n T extends object,\n const K1 extends readonly (keyof T)[],\n const K2 extends readonly (keyof T)[],\n>(\n props: T,\n keys1: K1,\n keys2: K2,\n): [Pick<T, K1[number]>, Pick<T, K2[number]>, Omit<T, K1[number] | K2[number]>];\nexport function splitProps<\n T extends object,\n const K1 extends readonly (keyof T)[],\n const K2 extends readonly (keyof T)[],\n const K3 extends readonly (keyof T)[],\n>(\n props: T,\n keys1: K1,\n keys2: K2,\n keys3: K3,\n): [\n Pick<T, K1[number]>,\n Pick<T, K2[number]>,\n Pick<T, K3[number]>,\n Omit<T, K1[number] | K2[number] | K3[number]>,\n];\nexport function splitProps<T extends object>(\n props: T,\n ...keyGroups: readonly (readonly (keyof T)[])[]\n): object[] {\n const used: (keyof T)[] = [];\n const parts: object[] = [];\n for (const keys of keyGroups) {\n const picked: Record<PropertyKey, unknown> = {};\n for (const key of keys) {\n used.push(key);\n const descriptor: PropertyDescriptor = {\n enumerable: true,\n configurable: true,\n get: () => props[key],\n };\n // Solid 2 compiles `ref={local.ref}` as `local.ref = el`. A getter-only\n // pick would throw; forward the write to the live ref instead.\n if (key === \"ref\") {\n descriptor.set = (el: unknown) => {\n assignRef(props[key], el as never);\n };\n }\n Object.defineProperty(picked, key, descriptor);\n }\n parts.push(picked);\n }\n parts.push(omit(props, ...(used as (keyof T)[])));\n return parts;\n}\n","/**\n * Capture-phase DOM listeners for Solid 2.\n *\n * Solid 2 has no `oncapture:` / `onClickCapture` JSX. Bind capture with\n * `addEventListener(type, handler, true)` from a ref or a ref accessor.\n */\n\nimport { createEffect } from \"solid-js\";\nimport type { Accessor } from \"solid-js\";\n\nexport type CaptureListeners = Record<\n string,\n EventListenerOrEventListenerObject | undefined | null\n>;\n\nexport function attachCaptureListeners(el: EventTarget, listeners: CaptureListeners): () => void {\n const attached: [string, EventListenerOrEventListenerObject][] = [];\n for (const [type, handler] of Object.entries(listeners)) {\n if (!handler) continue;\n el.addEventListener(type, handler, true);\n attached.push([type, handler]);\n }\n return () => {\n for (const [type, handler] of attached) {\n el.removeEventListener(type, handler, true);\n }\n };\n}\n\n/** Ref callback that binds capture-phase listeners. */\nexport function captureRef(listeners: CaptureListeners): (el: EventTarget) => void {\n let detach: (() => void) | undefined;\n return (el) => {\n detach?.();\n detach = attachCaptureListeners(el, listeners);\n };\n}\n\n/** Bind capture listeners to a hook-owned element accessor. */\nexport function bindCapture(\n el: Accessor<EventTarget | null | undefined>,\n listeners: CaptureListeners,\n): void {\n createEffect(\n () => el(),\n (node) => {\n if (!node) return;\n return attachCaptureListeners(node, listeners);\n },\n );\n}\n","/*\n * Copyright 2020 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/src/utils/scrollIntoView.ts\n\n/**\n * Scroll-into-view utilities.\n * Based on @react-aria/utils scrollIntoView (react-aria/src/utils/scrollIntoView.ts).\n */\n\nimport { getScrollParents } from \"./dom\";\nimport { isIOS } from \"./platform\";\nimport { isTestEnv } from \"./env\";\n\ninterface ScrollIntoViewOpts {\n /** The position to align items along the block axis in. */\n block?: ScrollLogicalPosition;\n /** The position to align items along the inline axis in. */\n inline?: ScrollLogicalPosition;\n}\n\ninterface ScrollIntoViewportOpts {\n /** The optional containing element of the target to be centered in the viewport. */\n containingElement?: Element | null;\n}\n\n/**\n * Scrolls `scrollView` so that `element` is visible.\n * Similar to `element.scrollIntoView({block: 'nearest'})` (not supported in Edge),\n * but doesn't affect parents above `scrollView`.\n */\nexport function scrollIntoView(\n scrollView: HTMLElement,\n element: HTMLElement,\n opts: ScrollIntoViewOpts = {},\n): void {\n const { block = \"nearest\", inline = \"nearest\" } = opts;\n\n if (scrollView === element) {\n return;\n }\n\n let y = scrollView.scrollTop;\n let x = scrollView.scrollLeft;\n\n const target = element.getBoundingClientRect();\n const view = scrollView.getBoundingClientRect();\n const itemStyle = window.getComputedStyle(element);\n const viewStyle = window.getComputedStyle(scrollView);\n const root = document.scrollingElement || document.documentElement;\n const isRoot = scrollView === root;\n\n const viewTop = scrollView === root ? 0 : view.top;\n const viewBottom = scrollView === root ? scrollView.clientHeight : view.bottom;\n const viewLeft = scrollView === root ? 0 : view.left;\n const viewRight = scrollView === root ? scrollView.clientWidth : view.right;\n\n const scrollMarginTop = parseFloat(itemStyle.scrollMarginTop) || 0;\n const scrollMarginBottom = parseFloat(itemStyle.scrollMarginBottom) || 0;\n const scrollMarginLeft = parseFloat(itemStyle.scrollMarginLeft) || 0;\n const scrollMarginRight = parseFloat(itemStyle.scrollMarginRight) || 0;\n\n const scrollPaddingTop = parseFloat(viewStyle.scrollPaddingTop) || 0;\n const scrollPaddingBottom = parseFloat(viewStyle.scrollPaddingBottom) || 0;\n const scrollPaddingLeft = parseFloat(viewStyle.scrollPaddingLeft) || 0;\n const scrollPaddingRight = parseFloat(viewStyle.scrollPaddingRight) || 0;\n\n const borderTopWidth = parseFloat(viewStyle.borderTopWidth) || 0;\n const borderBottomWidth = parseFloat(viewStyle.borderBottomWidth) || 0;\n const borderLeftWidth = parseFloat(viewStyle.borderLeftWidth) || 0;\n const borderRightWidth = parseFloat(viewStyle.borderRightWidth) || 0;\n\n const scrollAreaTop = target.top - scrollMarginTop;\n const scrollAreaBottom = target.bottom + scrollMarginBottom;\n const scrollAreaLeft = target.left - scrollMarginLeft;\n const scrollAreaRight = target.right + scrollMarginRight;\n\n const scrollBarOffsetX = scrollView === root ? 0 : borderLeftWidth + borderRightWidth;\n const scrollBarOffsetY = scrollView === root ? 0 : borderTopWidth + borderBottomWidth;\n const scrollBarWidth =\n scrollView === root ? 0 : scrollView.offsetWidth - scrollView.clientWidth - scrollBarOffsetX;\n const scrollBarHeight =\n scrollView === root ? 0 : scrollView.offsetHeight - scrollView.clientHeight - scrollBarOffsetY;\n\n const scrollPortTop = viewTop + (isRoot ? 0 : borderTopWidth) + scrollPaddingTop;\n const scrollPortBottom =\n viewBottom - (isRoot ? 0 : borderBottomWidth) - scrollPaddingBottom - scrollBarHeight;\n let scrollPortLeft = viewLeft + (isRoot ? 0 : borderLeftWidth) + scrollPaddingLeft;\n let scrollPortRight = viewRight - (isRoot ? 0 : borderRightWidth) - scrollPaddingRight;\n\n // IOS always positions the scrollbar on the right ¯\\_(ツ)_/¯\n if (viewStyle.direction === \"rtl\" && !isIOS()) {\n scrollPortLeft += scrollBarWidth;\n } else {\n scrollPortRight -= scrollBarWidth;\n }\n\n const shouldScrollBlock = scrollAreaTop < scrollPortTop || scrollAreaBottom > scrollPortBottom;\n const shouldScrollInline = scrollAreaLeft < scrollPortLeft || scrollAreaRight > scrollPortRight;\n\n if (shouldScrollBlock && block === \"start\") {\n y += scrollAreaTop - scrollPortTop;\n } else if (shouldScrollBlock && block === \"center\") {\n y += (scrollAreaTop + scrollAreaBottom) / 2 - (scrollPortTop + scrollPortBottom) / 2;\n } else if (shouldScrollBlock && block === \"end\") {\n y += scrollAreaBottom - scrollPortBottom;\n } else if (shouldScrollBlock && block === \"nearest\") {\n const start = scrollAreaTop - scrollPortTop;\n const end = scrollAreaBottom - scrollPortBottom;\n y += Math.abs(start) <= Math.abs(end) ? start : end;\n }\n\n if (shouldScrollInline && inline === \"start\") {\n x += scrollAreaLeft - scrollPortLeft;\n } else if (shouldScrollInline && inline === \"center\") {\n x += (scrollAreaLeft + scrollAreaRight) / 2 - (scrollPortLeft + scrollPortRight) / 2;\n } else if (shouldScrollInline && inline === \"end\") {\n x += scrollAreaRight - scrollPortRight;\n } else if (shouldScrollInline && inline === \"nearest\") {\n const start = scrollAreaLeft - scrollPortLeft;\n const end = scrollAreaRight - scrollPortRight;\n x += Math.abs(start) <= Math.abs(end) ? start : end;\n }\n\n if (isTestEnv()) {\n scrollView.scrollLeft = x;\n scrollView.scrollTop = y;\n return;\n }\n\n scrollView.scrollTo({ left: x, top: y });\n}\n\n/**\n * Scrolls the `targetElement` so it is visible in the viewport. Accepts an optional\n * `opts.containingElement` that will be centered in the viewport prior to scrolling the\n * targetElement into view. If scrolling is prevented on the body (e.g. targetElement is in a\n * popover), this will only scroll the scroll parents of the targetElement up to but not including\n * the body itself.\n */\nexport function scrollIntoViewport(\n targetElement: Element | null,\n opts: ScrollIntoViewportOpts = {},\n): void {\n const { containingElement } = opts;\n if (targetElement && targetElement.isConnected) {\n const root = document.scrollingElement || document.documentElement;\n const isScrollPrevented = window.getComputedStyle(root).overflow === \"hidden\";\n if (!isScrollPrevented) {\n const { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();\n\n // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()\n // won't cause a scroll if the element is already focused and doesn't behave consistently when an element is partially out of view horizontally vs vertically\n targetElement?.scrollIntoView?.({ block: \"nearest\" });\n const { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();\n // Account for sub pixel differences from rounding\n if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {\n containingElement?.scrollIntoView?.({ block: \"center\", inline: \"center\" });\n targetElement.scrollIntoView?.({ block: \"nearest\" });\n }\n } else {\n const { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();\n\n // If scrolling is prevented, we don't want to scroll the body since it might move the overlay partially offscreen and the user can't scroll it back into view.\n let scrollParents = getScrollParents(targetElement, true);\n for (const scrollParent of scrollParents) {\n scrollIntoView(scrollParent as HTMLElement, targetElement as HTMLElement);\n }\n const { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();\n // Account for sub pixel differences from rounding\n if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {\n scrollParents = containingElement ? getScrollParents(containingElement, true) : [];\n // scroll containing element into view first, then rescroll target element into view like the non chrome flow above\n for (const scrollParent of scrollParents) {\n scrollIntoView(scrollParent as HTMLElement, containingElement as HTMLElement, {\n block: \"center\",\n inline: \"center\",\n });\n }\n for (const scrollParent of getScrollParents(targetElement, true)) {\n scrollIntoView(scrollParent as HTMLElement, targetElement as HTMLElement);\n }\n }\n }\n }\n}\n","/*\n * Copyright 2020 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/src/interactions/usePress.ts\n\n/**\n * Geometry utilities for pointer/touch hit testing.\n * Ported from packages/react-aria/src/interactions/usePress.ts.\n */\n\nexport interface Rect {\n top: number;\n right: number;\n bottom: number;\n left: number;\n}\n\nexport interface EventPoint {\n clientX: number;\n clientY: number;\n width?: number;\n height?: number;\n radiusX?: number;\n radiusY?: number;\n}\n\n/**\n * Checks if two rectangles overlap.\n */\nexport function areRectanglesOverlapping(a: Rect, b: Rect): boolean {\n if (a.left > b.right || b.left > a.right) {\n return false;\n }\n\n if (a.top > b.bottom || b.top > a.bottom) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Gets the bounding rectangle for an event point (touch/pointer).\n * Takes into account the size of the touch point.\n */\nexport function getPointClientRect(point: EventPoint): Rect {\n let offsetX = 0;\n let offsetY = 0;\n\n if (point.width !== undefined && point.width > 0) {\n offsetX = point.width / 2;\n } else if (point.radiusX !== undefined && point.radiusX > 0) {\n // Fallback to radiusX/radiusY (Touch)\n offsetX = point.radiusX;\n }\n\n if (point.height !== undefined && point.height > 0) {\n offsetY = point.height / 2;\n } else if (point.radiusY !== undefined && point.radiusY > 0) {\n offsetY = point.radiusY;\n }\n\n return {\n top: point.clientY - offsetY,\n right: point.clientX + offsetX,\n bottom: point.clientY + offsetY,\n left: point.clientX - offsetX,\n };\n}\n\n/**\n * Checks if a pointer/touch point is over an element.\n */\nexport function isPointOverTarget(point: EventPoint, target: Element): boolean {\n const rect = target.getBoundingClientRect();\n const pointRect = getPointClientRect(point);\n\n return areRectanglesOverlapping(\n {\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n },\n pointRect,\n );\n}\n\n/**\n * Gets the first touch from a TouchEvent's targetTouches.\n */\nexport function getTouchFromEvent(event: TouchEvent): Touch | null {\n const { targetTouches } = event;\n if (targetTouches.length > 0) {\n return targetTouches[0];\n }\n return null;\n}\n\n/**\n * Finds a touch by its identifier in changedTouches.\n */\nexport function getTouchById(event: TouchEvent, pointerId: number | null): Touch | null {\n if (pointerId == null) {\n return null;\n }\n\n const { changedTouches } = event;\n for (let i = 0; i < changedTouches.length; i++) {\n const touch = changedTouches[i];\n if (touch.identifier === pointerId) {\n return touch;\n }\n }\n\n return null;\n}\n","/*\n * Copyright 2020 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/src/interactions/textSelection.ts\n\n/**\n * Text selection management utilities.\n * Ported from packages/react-aria/src/interactions/textSelection.ts.\n *\n * On iOS, long press triggers text selection. The only way to prevent this\n * is to set user-select: none on the entire page. On other platforms,\n * we can just set it on the target element.\n */\n\nimport { isIOS } from \"./platform\";\nimport { getOwnerDocument } from \"./dom\";\n\ntype State = \"default\" | \"disabled\" | \"restoring\";\n\n// Global state to manage text selection across multiple press interactions\nlet state: State = \"default\";\nlet savedUserSelect = \"\";\nlet modifiedElementMap = new WeakMap<HTMLElement, string>();\n\n/**\n * Disables text selection on the page or element during press.\n * On iOS, applies to the entire document. On other platforms, just the target.\n */\nexport function disableTextSelection(target?: HTMLElement): void {\n if (isIOS()) {\n // iOS requires disabling selection on the entire page\n if (state === \"default\") {\n const documentElement = getOwnerDocument(target).documentElement;\n savedUserSelect = documentElement.style.webkitUserSelect;\n documentElement.style.webkitUserSelect = \"none\";\n }\n state = \"disabled\";\n } else if (target) {\n // On other platforms, just disable on the target\n const element = target as HTMLElement;\n if (!modifiedElementMap.has(element)) {\n modifiedElementMap.set(element, element.style.userSelect);\n element.style.userSelect = \"none\";\n }\n }\n}\n\n/**\n * Restores text selection after press ends.\n * On iOS, waits 300ms to avoid selection appearing during tap.\n */\nexport function restoreTextSelection(target?: HTMLElement): void {\n if (isIOS()) {\n // Don't restore if another press is active\n if (state !== \"disabled\") {\n return;\n }\n\n state = \"restoring\";\n\n // Wait for iOS to finish any pending selection actions\n // 300ms is the iOS long-press delay\n setTimeout(() => {\n // Use runAfterTransition to avoid CSS recomputation during animation\n runAfterTransition(() => {\n // Only restore if still in 'restoring' state (no new press started)\n if (state === \"restoring\") {\n const documentElement = getOwnerDocument(target).documentElement;\n if (savedUserSelect) {\n documentElement.style.webkitUserSelect = savedUserSelect;\n } else {\n documentElement.style.removeProperty(\"-webkit-user-select\");\n }\n savedUserSelect = \"\";\n state = \"default\";\n }\n });\n }, 300);\n } else if (target) {\n // On other platforms, restore immediately\n const element = target as HTMLElement;\n const savedValue = modifiedElementMap.get(element);\n if (savedValue !== undefined) {\n if (savedValue) {\n element.style.userSelect = savedValue;\n } else {\n element.style.removeProperty(\"user-select\");\n }\n modifiedElementMap.delete(element);\n }\n }\n}\n\n// Tracks pending transitions for runAfterTransition\nconst pendingTransitions = new Set<() => void>();\nlet transitionTimeout: ReturnType<typeof setTimeout> | null = null;\n\n/**\n * Runs a callback after CSS transitions complete.\n * Batches multiple callbacks to avoid unnecessary layout thrashing.\n */\nfunction runAfterTransition(callback: () => void): void {\n // If we haven't started tracking transitions, run immediately\n pendingTransitions.add(callback);\n\n // Debounce - wait for any transitions to settle\n if (transitionTimeout != null) {\n clearTimeout(transitionTimeout);\n }\n\n transitionTimeout = setTimeout(() => {\n // Run all pending callbacks\n for (const cb of pendingTransitions) {\n cb();\n }\n pendingTransitions.clear();\n transitionTimeout = null;\n }, 0);\n}\n","/*\n * Copyright 2024 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/src/utils/keyboard.tsx\n\n/**\n * Keyboard / modifier-key helpers.\n * Ported from packages/react-aria/src/utils/keyboard.tsx.\n */\n\nimport { isMac } from \"./platform\";\n\n/** The modifier-key fields consulted by {@link isCtrlKeyPressed}. */\ninterface ModifierKeyEvent {\n ctrlKey?: boolean;\n metaKey?: boolean;\n}\n\n/**\n * Returns whether the platform's non-contiguous selection modifier is pressed:\n * the Command key on macOS, the Control key elsewhere. Mirrors\n * `@react-aria/utils`' `isCtrlKeyPressed`.\n */\nexport function isCtrlKeyPressed(e: ModifierKeyEvent): boolean {\n if (isMac()) {\n return e.metaKey === true;\n }\n\n return e.ctrlKey === true;\n}\n","/*\n * Copyright 2020 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/src/utils/useGlobalListeners.ts\n\n/**\n * Global listener management utility.\n * Based on @react-aria/utils useGlobalListeners hook, adapted for SolidJS.\n *\n * In SolidJS, we use onCleanup for automatic cleanup instead of useEffect return.\n */\n\nimport { onOwnedCleanup } from \"./owner\";\nexport interface GlobalListenerOptions extends AddEventListenerOptions {\n /** Whether to add the listener to the window instead of document */\n isWindow?: boolean;\n}\n\n/**\n * Creates a manager for global event listeners that automatically cleans up.\n * Use this in a component to register document/window level listeners\n * that will be removed when the component unmounts.\n */\nexport function createGlobalListeners() {\n const listeners: Array<{\n target: EventTarget;\n type: string;\n handler: EventListener;\n options?: AddEventListenerOptions;\n }> = [];\n\n /**\n * Adds a global event listener.\n */\n function addGlobalListener<K extends keyof DocumentEventMap>(\n type: K,\n handler: (ev: DocumentEventMap[K]) => void,\n options?: GlobalListenerOptions,\n ): void;\n function addGlobalListener<K extends keyof WindowEventMap>(\n type: K,\n handler: (ev: WindowEventMap[K]) => void,\n options?: GlobalListenerOptions & { isWindow: true },\n ): void;\n function addGlobalListener(\n type: string,\n handler: EventListener,\n options?: GlobalListenerOptions,\n ): void {\n const target = options?.isWindow ? window : document;\n const listenerOptions = options\n ? {\n capture: options.capture,\n passive: options.passive,\n once: options.once,\n }\n : undefined;\n\n target.addEventListener(type, handler, listenerOptions);\n listeners.push({ target, type, handler, options: listenerOptions });\n }\n\n /**\n * Removes a specific global event listener.\n */\n function removeGlobalListener<K extends keyof DocumentEventMap>(\n type: K,\n handler: (ev: DocumentEventMap[K]) => void,\n options?: AddEventListenerOptions,\n ): void;\n function removeGlobalListener<K extends keyof WindowEventMap>(\n type: K,\n handler: (ev: WindowEventMap[K]) => void,\n options?: AddEventListenerOptions & { isWindow: true },\n ): void;\n function removeGlobalListener(\n type: string,\n handler: EventListener,\n options?: AddEventListenerOptions & { isWindow?: boolean },\n ): void {\n const target = options?.isWindow ? window : document;\n const listenerOptions = options\n ? {\n capture: options.capture,\n }\n : undefined;\n\n target.removeEventListener(type, handler, listenerOptions);\n\n // Remove from tracked listeners\n const index = listeners.findIndex(\n (l) =>\n l.target === target &&\n l.type === type &&\n l.handler === handler &&\n l.options?.capture === listenerOptions?.capture,\n );\n if (index !== -1) {\n listeners.splice(index, 1);\n }\n }\n\n /**\n * Removes all registered global listeners.\n */\n function removeAllGlobalListeners(): void {\n for (const { target, type, handler, options } of listeners) {\n target.removeEventListener(type, handler, options);\n }\n listeners.length = 0;\n }\n\n // Automatically clean up when the component/scope is disposed\n onOwnedCleanup(removeAllGlobalListeners);\n\n return {\n addGlobalListener,\n removeGlobalListener,\n removeAllGlobalListeners,\n };\n}\n\n/**\n * Simple utility to add a single global listener with automatic cleanup.\n * For one-off listeners where the full manager isn't needed.\n */\nexport function addGlobalListenerOnce<K extends keyof DocumentEventMap>(\n type: K,\n handler: (ev: DocumentEventMap[K]) => void,\n options?: GlobalListenerOptions,\n): () => void {\n const target = options?.isWindow ? window : document;\n const listenerOptions = options\n ? {\n capture: options.capture,\n passive: options.passive,\n once: options.once,\n }\n : undefined;\n\n target.addEventListener(type, handler as EventListener, listenerOptions);\n\n return () => {\n target.removeEventListener(type, handler as EventListener, listenerOptions);\n };\n}\n","/*\n * Copyright 2020 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/src/utils/useDescription.ts\n\n/**\n * createDescription - Creates a hidden element for dynamic aria-describedby content.\n *\n * This utility creates a visually hidden element containing description text and\n * returns an aria-describedby prop pointing to it. Multiple components using the\n * same description will share the same element (reference counted).\n *\n * Port of @react-aria/utils/useDescription.\n *\n * @example\n * ```tsx\n * function SortableColumn(props) {\n * const descriptionProps = createDescription(\n * () => props.sortDirection ? `Sorted ${props.sortDirection}` : undefined\n * );\n *\n * return (\n * <th {...descriptionProps}>\n * {props.children}\n * </th>\n * );\n * }\n * ```\n */\n\nimport { createSignal, createTrackedEffect } from \"solid-js\";\nimport type { Accessor } from \"solid-js\";\nimport { isServer } from \"@solidjs/web\";\n\nexport interface DescriptionProps {\n \"aria-describedby\"?: string;\n}\n\nlet descriptionId = 0;\nconst descriptionNodes = new Map<string, { refCount: number; element: Element }>();\n\n/**\n * Creates an invisible description element and returns aria-describedby props.\n *\n * The element is created in the DOM and reference counted - multiple uses of\n * the same description text will share the same element. When all references\n * are removed, the element is cleaned up.\n *\n * @param description - Accessor that returns the description text, or undefined\n * @returns Object with aria-describedby prop (or empty object if no description)\n *\n * @example\n * ```tsx\n * const descProps = createDescription(() => 'Press Enter to submit');\n * return <button {...descProps}>Submit</button>;\n * ```\n */\nexport function createDescription(description: Accessor<string | undefined>): DescriptionProps {\n const [id, setId] = createSignal<string | undefined>();\n\n // Solid 2 counts effects toward hydration IDs, even when SSR skips the callback.\n createTrackedEffect(() => {\n if (isServer) return;\n const _s2Cleanups: Array<() => void> = [];\n\n const desc = description();\n\n if (!desc) {\n setId(undefined);\n return;\n }\n\n let node = descriptionNodes.get(desc);\n\n if (!node) {\n const newId = `solidaria-description-${descriptionId++}`;\n setId(newId);\n\n const element = document.createElement(\"div\");\n element.id = newId;\n element.style.display = \"none\";\n element.textContent = desc;\n document.body.appendChild(element);\n\n node = { refCount: 0, element };\n descriptionNodes.set(desc, node);\n } else {\n setId(node.element.id);\n }\n\n node.refCount++;\n\n _s2Cleanups.push(() => {\n if (node && --node.refCount === 0) {\n node.element.remove();\n descriptionNodes.delete(desc);\n }\n });\n\n return () => {\n for (const c of _s2Cleanups) c();\n };\n });\n\n if (isServer) {\n return {};\n }\n\n return {\n get \"aria-describedby\"() {\n const desc = description();\n return desc ? id() : undefined;\n },\n };\n}\n\n/**\n * Utility to get all active description nodes (for testing).\n * @internal\n */\nexport function getDescriptionNodeCount(): number {\n return descriptionNodes.size;\n}\n\n/**\n * Utility to clear all description nodes (for testing cleanup).\n * @internal\n */\nexport function clearDescriptionNodes(): void {\n for (const [, node] of descriptionNodes) {\n node.element.remove();\n }\n descriptionNodes.clear();\n}\n","/*\n * Copyright 2020 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/src/utils/animation.ts\n\n/**\n * Enter/exit animation primitives for Solidaria.\n *\n * A faithful SolidJS port of `react-aria`'s `useEnterAnimation` /\n * `useExitAnimation` (react-aria/src/utils/animation.ts). These drive the\n * `data-entering` / `data-exiting` render-prop flags that overlay styles key\n * their motion tokens off of (opacity/translate transitions on Modal, Popover,\n * Tooltip, …). Without them a styled overlay ships the tokens but never flips\n * the state that triggers the transition, so it appears/disappears instantly.\n *\n * Two mechanisms are covered, exactly as upstream:\n * 1. CSS `@keyframes` — the `animation` property is present while entering and\n * removed when the animation finishes.\n * 2. CSS transitions — the initial styles apply while entering and are removed\n * immediately, so the transition plays. Premature transitions triggered\n * before the ready state (e.g. a popover positioned after mount) are\n * cancelled so only the intended enter transition runs.\n *\n * SolidJS notes:\n * - Refs are passed as accessors (`() => element`) rather than React ref\n * objects, so a signal-backed ref re-runs the effect when the element mounts.\n * - `isReady` gates the enter animation. In React the caller unmounts the\n * overlay while closed, so the hook re-initializes per open; a Solid component\n * often stays mounted with its overlay behind a `<Show>`, so pass\n * `isReady={isOpen}` to defer the enter until the element actually mounts.\n * - `createEffect` replaces `useLayoutEffect`; effects never run during SSR, so\n * the `CSSTransition` reference is only touched on the client.\n */\n\nimport { createEffect, createMemo, createSignal } from \"solid-js\";\nimport type { Accessor } from \"solid-js\";\n\n/** A reactive accessor for the animated element (null until mounted). */\nexport type ElementAccessor = () => Element | null | undefined;\n\n/**\n * Runs `onEnd` once the element's animations settle while `isActive` is true.\n * Mirrors the private `useAnimation` helper in react-aria's animation utils.\n *\n * `deferNoAnimation` mirrors React's timing for the no-animation case. Upstream\n * runs `onEnd` inside a `useLayoutEffect`, so an animation-less exit unmounts\n * *after* React commits — i.e. after the triggering input event finishes\n * dispatching (empirically, an Escape's teardown lands after `keyup`, not\n * between `keydown` and `keyup`). A Solid `createEffect` runs synchronously\n * inside the handler, so an animation-less exit would tear the overlay out\n * mid-gesture, firing `focusout` before `keyup` and retargeting `keyup` to the\n * body. Deferring `onEnd` to the next frame — the same primitive `FocusScope`\n * uses to defer focus restore — reproduces React's post-commit ordering. Only\n * the real-browser no-animation branch defers; the JSDOM branch stays\n * synchronous so unit tests that assert immediate unmount are unaffected.\n */\nfunction createAnimation(\n ref: ElementAccessor,\n isActive: Accessor<boolean>,\n onEnd: () => void,\n deferNoAnimation = false,\n): void {\n // Split createEffect so `onEnd` (signal writes) runs in apply. A tracked\n // effect is an owned scope and rejects those writes even with ownedWrite.\n // Compute returns the element identity so apply does not re-run (and cancel\n // an in-flight `finished` waiter) unless the node or active gate changes.\n createEffect(\n () => {\n if (!isActive()) return null;\n return ref() ?? null;\n },\n (element) => {\n if (!element) return;\n\n if (!(\"getAnimations\" in element)) {\n // JSDOM and other environments without the Web Animations API.\n onEnd();\n return;\n }\n\n // `settle` mirrors React's post-commit `useLayoutEffect` timing (see the\n // `deferNoAnimation` note above): a Solid effect runs synchronously inside\n // the triggering input handler, and even the Web-Animations `finished`\n // promise resolves in a microtask that drains *before* the gesture's later\n // events (e.g. an Escape's `keyup`). Deferring the settle to the next frame\n // pushes the overlay teardown past the rest of the current event dispatch,\n // reproducing React's ordering (teardown after `keyup`, not between\n // `keydown` and `keyup`). A real, non-trivial exit transition already\n // finishes long after the gesture, so the extra frame is imperceptible; it\n // only matters for the instant/near-zero-duration exits that would\n // otherwise tear the focused overlay out mid-gesture. Unit environments\n // (no `requestAnimationFrame`, or the no-defer callers) settle synchronously.\n //\n // `canceled` guards the promise path, whose `.then` runs outside the\n // reactive owner. Apply's returned cleanup both sets the flag and\n // cancels a pending frame.\n let canceled = false;\n let frame: number | undefined;\n const settle = () => {\n if (canceled) return;\n if (deferNoAnimation && typeof requestAnimationFrame === \"function\") {\n frame = requestAnimationFrame(() => {\n if (!canceled) onEnd();\n });\n } else {\n onEnd();\n }\n };\n\n const animations = element.getAnimations();\n if (animations.length === 0) {\n settle();\n } else {\n Promise.allSettled(animations.map((animation) => animation.finished)).then(() => {\n settle();\n });\n }\n\n return () => {\n canceled = true;\n if (frame !== undefined && typeof cancelAnimationFrame === \"function\") {\n cancelAnimationFrame(frame);\n }\n };\n },\n );\n}\n\n/**\n * Tracks whether an element is playing its enter animation.\n *\n * Returns an accessor that is `true` while the element should carry\n * `data-entering` (its initial, pre-transition styles), then flips to `false`\n * once the animation is set up — which removes the initial styles and lets the\n * CSS transition play.\n *\n * @param ref - Accessor for the animated element.\n * @param isReady - Whether the element is ready to animate in. Defaults to\n * `true`. Pass an `isOpen` accessor when the component stays mounted while the\n * overlay is hidden, so the enter state does not resolve before the element\n * mounts.\n */\nexport function createEnterAnimation(\n ref: ElementAccessor,\n isReady: Accessor<boolean> = () => true,\n): Accessor<boolean> {\n const [isEntering, setIsEntering] = createSignal(true, { ownedWrite: true });\n const isAnimationReady = () => isEntering() && isReady();\n\n // Cancel any transitions triggered before the ready state (case 2 above), so\n // only the intended enter transition — the one that starts when the initial\n // styles are removed — runs.\n createEffect(\n () => {\n if (!isAnimationReady()) return null;\n return ref() ?? null;\n },\n (element) => {\n if (!element || !(\"getAnimations\" in element)) return;\n for (const animation of element.getAnimations()) {\n if (animation instanceof CSSTransition) {\n animation.cancel();\n }\n }\n },\n );\n\n createAnimation(ref, isAnimationReady, () => setIsEntering(false));\n\n return isAnimationReady;\n}\n\n/**\n * Tracks whether an element is playing its exit animation.\n *\n * Keeps the caller informed so the element can stay mounted (`isOpen ||\n * isExiting`) until its exit transition finishes. Implements the same\n * `'closed' | 'open' | 'exiting'` state machine as react-aria's\n * `useExitAnimation`, including interruption: reopening mid-exit returns to the\n * open state.\n *\n * @param ref - Accessor for the animated element.\n * @param isOpen - Whether the element is currently open.\n */\nexport function createExitAnimation(\n ref: ElementAccessor,\n isOpen: Accessor<boolean>,\n): Accessor<boolean> {\n // The state machine's synchronous edges (open→exiting on close, →open on\n // reopen) are computed in a `createMemo`, NOT a `createEffect`. This is the\n // Solid equivalent of react-aria's `setState`-*during-render*: because the\n // memo is a dependency of the caller's mount gate (`isOpen() || isExiting()`),\n // Solid recomputes it *before* the gate in the same synchronous propagation\n // that flips `isOpen`. A `createEffect` runs in the later effects phase, so\n // the gate would first observe `!isOpen && !isExiting` and unmount the\n // overlay, then the effect would flip `exiting` true and remount it from\n // scratch — recreating the whole subtree (Dialog section, focus scope) and\n // firing a spurious focus bounce mid-gesture. The memo closes that window so\n // the overlay stays mounted continuously through the exit, matching React's\n // single-commit `isOpen || isExiting`.\n //\n // Only the *async* edge (exiting→closed, when the animation settles) stays\n // event-driven: `createAnimation` bumps `exitFinished`, and the memo\n // acknowledges the new value via `ackedFinish` carried in its own previous\n // result — a pure epoch/ack so the memo never mutates external state.\n type ExitState = \"closed\" | \"open\" | \"exiting\";\n const [exitFinished, setExitFinished] = createSignal(0, { ownedWrite: true });\n\n // Solid 2 createMemo no longer takes an initial value as the second argument\n // (that slot is options). First compute receives `prev === undefined`.\n const exitState = createMemo<{ state: ExitState; ackedFinish: number }>(\n (prev = { state: \"closed\", ackedFinish: 0 }) => {\n const open = isOpen();\n const finish = exitFinished();\n if (open) return { state: \"open\", ackedFinish: finish };\n // Open element requested to close: begin exiting.\n if (prev.state === \"open\") return { state: \"exiting\", ackedFinish: finish };\n // Mid-exit: settle to closed only once the animation reports a new finish.\n if (prev.state === \"exiting\") {\n if (finish !== prev.ackedFinish) return { state: \"closed\", ackedFinish: finish };\n return prev;\n }\n return { state: \"closed\", ackedFinish: finish };\n },\n );\n\n const isExiting = () => exitState().state === \"exiting\";\n\n // Keep the state machine eagerly subscribed. The caller's mount gate\n // `isOpen() || isExiting()` short-circuits on `isOpen()` while open and never\n // reads `isExiting`, so this lazy memo would go unobserved for the whole open\n // lifetime — never advancing to \"open\". Then on close it would recompute once,\n // straight from its stale initial \"closed\" back to \"closed\" (the \"open→exiting\"\n // edge never taken), collapsing the exit: `combinedExiting` stays false, the\n // caller's `<Show>` sees the gate go falsy, and the overlay Portal unmounts\n // synchronously mid-gesture (blurring the focused dialog to <body> before the\n // triggering key's `keyup`). An eager reader forces the memo to track `isOpen`\n // continuously so `prev.state === \"open\"` holds when the close edge runs —\n // mirroring React, whose component re-renders and re-derives this every commit.\n createEffect(\n () => exitState(),\n () => {},\n );\n\n createAnimation(\n ref,\n isExiting,\n () => {\n setExitFinished((n) => n + 1);\n },\n true,\n );\n\n return isExiting;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,SAAgB,WACd,OACA,GAAG,WACO;CACV,MAAM,OAAoB,CAAC;CAC3B,MAAM,QAAkB,CAAC;CACzB,KAAK,MAAM,QAAQ,WAAW;EAC5B,MAAM,SAAuC,CAAC;EAC9C,KAAK,MAAM,OAAO,MAAM;GACtB,KAAK,KAAK,GAAG;GACb,MAAM,aAAiC;IACrC,YAAY;IACZ,cAAc;IACd,WAAW,MAAM;GACnB;GAGA,IAAI,QAAQ,OACV,WAAW,OAAO,OAAgB;IAChC,UAAU,MAAM,MAAM,EAAW;GACnC;GAEF,OAAO,eAAe,QAAQ,KAAK,UAAU;EAC/C;EACA,MAAM,KAAK,MAAM;CACnB;CACA,MAAM,KAAK,K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,MAAM,kBAAkB,UAAU,CAAC,CAAC,UAAU;CAa9C,mBACQ,UAAU,SACV,CAAC,CACT;CAEA,gBACE,KACA,iBACM;EACJ,iBAAiB,MAAM,IAAI,CAAC;CAC9B,GACA,IACF;CAEA,OAAO;AACT"}
@@ -0,0 +1,54 @@
1
+ import { a as getOwnerDocument, n as getActiveElement } from "./dom.js";
2
+ //#region src/focus/virtualFocus.ts
3
+ /**
4
+ * Virtual-focus event dispatch primitives.
5
+ *
6
+ * A faithful port of packages/react-aria/src/focus/virtualFocus.ts. Under virtual
7
+ * focus (e.g. Autocomplete), real DOM focus stays on an input while the
8
+ * "focused" collection option is indicated by `aria-activedescendant`. Moving
9
+ * that virtual cursor dispatches synthetic `focus`/`blur` events (with matching
10
+ * bubbling `focusin`/`focusout`) on the option elements so listeners — notably
11
+ * the autocomplete input's `focusin` handler that mirrors the active descendant
12
+ * — react as if the element were really focused.
13
+ */
14
+ /**
15
+ * Moves virtual focus to `to`, dispatching a virtual blur on the previously
16
+ * virtually-focused element (if any) and a virtual focus on `to` (if non-null).
17
+ */
18
+ function moveVirtualFocus(to) {
19
+ const from = getVirtuallyFocusedElement(getOwnerDocument(to));
20
+ if (from !== to) {
21
+ if (from) dispatchVirtualBlur(from, to);
22
+ if (to) dispatchVirtualFocus(to, from);
23
+ }
24
+ }
25
+ /** Dispatches synthetic `blur` + bubbling `focusout` events on `from`. */
26
+ function dispatchVirtualBlur(from, to) {
27
+ from.dispatchEvent(new FocusEvent("blur", { relatedTarget: to }));
28
+ from.dispatchEvent(new FocusEvent("focusout", {
29
+ bubbles: true,
30
+ relatedTarget: to
31
+ }));
32
+ }
33
+ /** Dispatches synthetic `focus` + bubbling `focusin` events on `to`. */
34
+ function dispatchVirtualFocus(to, from) {
35
+ to.dispatchEvent(new FocusEvent("focus", { relatedTarget: from }));
36
+ to.dispatchEvent(new FocusEvent("focusin", {
37
+ bubbles: true,
38
+ relatedTarget: from
39
+ }));
40
+ }
41
+ /**
42
+ * Returns the currently virtually-focused element: the element referenced by the
43
+ * active element's `aria-activedescendant`, or the active element itself.
44
+ */
45
+ function getVirtuallyFocusedElement(document) {
46
+ const activeElement = getActiveElement(document);
47
+ const activeDescendant = activeElement?.getAttribute("aria-activedescendant");
48
+ if (activeDescendant) return document.getElementById(activeDescendant) || activeElement;
49
+ return activeElement;
50
+ }
51
+ //#endregion
52
+ export { moveVirtualFocus as i, dispatchVirtualFocus as n, getVirtuallyFocusedElement as r, dispatchVirtualBlur as t };
53
+
54
+ //# sourceMappingURL=virtualFocus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtualFocus.js","names":[],"sources":["../../src/focus/virtualFocus.ts"],"sourcesContent":["/**\n * Virtual-focus event dispatch primitives.\n *\n * A faithful port of packages/react-aria/src/focus/virtualFocus.ts. Under virtual\n * focus (e.g. Autocomplete), real DOM focus stays on an input while the\n * \"focused\" collection option is indicated by `aria-activedescendant`. Moving\n * that virtual cursor dispatches synthetic `focus`/`blur` events (with matching\n * bubbling `focusin`/`focusout`) on the option elements so listeners — notably\n * the autocomplete input's `focusin` handler that mirrors the active descendant\n * — react as if the element were really focused.\n */\n\nimport { getActiveElement, getOwnerDocument } from \"../utils/dom\";\n\n/**\n * Moves virtual focus to `to`, dispatching a virtual blur on the previously\n * virtually-focused element (if any) and a virtual focus on `to` (if non-null).\n */\nexport function moveVirtualFocus(to: Element | null): void {\n const from = getVirtuallyFocusedElement(getOwnerDocument(to));\n if (from !== to) {\n if (from) {\n dispatchVirtualBlur(from, to);\n }\n if (to) {\n dispatchVirtualFocus(to, from);\n }\n }\n}\n\n/** Dispatches synthetic `blur` + bubbling `focusout` events on `from`. */\nexport function dispatchVirtualBlur(from: Element, to: Element | null): void {\n from.dispatchEvent(new FocusEvent(\"blur\", { relatedTarget: to }));\n from.dispatchEvent(new FocusEvent(\"focusout\", { bubbles: true, relatedTarget: to }));\n}\n\n/** Dispatches synthetic `focus` + bubbling `focusin` events on `to`. */\nexport function dispatchVirtualFocus(to: Element, from: Element | null): void {\n to.dispatchEvent(new FocusEvent(\"focus\", { relatedTarget: from }));\n to.dispatchEvent(new FocusEvent(\"focusin\", { bubbles: true, relatedTarget: from }));\n}\n\n/**\n * Returns the currently virtually-focused element: the element referenced by the\n * active element's `aria-activedescendant`, or the active element itself.\n */\nexport function getVirtuallyFocusedElement(document: Document): Element | null {\n const activeElement = getActiveElement(document);\n const activeDescendant = activeElement?.getAttribute(\"aria-activedescendant\");\n if (activeDescendant) {\n return document.getElementById(activeDescendant) || activeElement;\n }\n\n return activeElement;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,SAAgB,iBAAiB,IAA0B;CACzD,MAAM,OAAO,2BAA2B,iBAAiB,EAAE,CAAC;CAC5D,IAAI,SAAS,IAAI;EACf,IAAI,MACF,oBAAoB,MAAM,EAAE;EAE9B,IAAI,IACF,qBAAqB,IAAI,IAAI;CAEjC;AACF;;AAGA,SAAgB,oBAAoB,MAAe,IAA0B;CAC3E,KAAK,cAAc,IAAI,WAAW,QAAQ,EAAE,eAAe,GAAG,CAAC,CAAC;CAChE,KAAK,cAAc,IAAI,WAAW,YAAY;EAAE,SAAS;EAAM,eAAe;CAAG,CAAC,CAAC;AACrF;;AAGA,SAAgB,qBAAqB,IAAa,MAA4B;CAC5E,GAAG,cAAc,IAAI,WAAW,SAAS,EAAE,eAAe,KAAK,CAAC,CAAC;CACjE,GAAG,cAAc,IAAI,WAAW,WAAW;EAAE,SAAS;EAAM,eAAe;CAAK,CAAC,CAAC;AACpF;;;;;AAMA,SAAgB,2BAA2B,UAAoC;CAC7E,MAAM,gBAAgB,iBAAiB,QAAQ;CAC/C,MAAM,mBAAmB,eAAe,aAAa,uBAAuB;CAC5E,IAAI,kBACF,OAAO,SAAS,eAAe,gBAAgB,KAAK;CAGtD,OAAO;AACT"}
@@ -0,0 +1,54 @@
1
+ import { a as getOwnerDocument, n as getActiveElement } from "./dom.jsx";
2
+ //#region src/focus/virtualFocus.ts
3
+ /**
4
+ * Virtual-focus event dispatch primitives.
5
+ *
6
+ * A faithful port of packages/react-aria/src/focus/virtualFocus.ts. Under virtual
7
+ * focus (e.g. Autocomplete), real DOM focus stays on an input while the
8
+ * "focused" collection option is indicated by `aria-activedescendant`. Moving
9
+ * that virtual cursor dispatches synthetic `focus`/`blur` events (with matching
10
+ * bubbling `focusin`/`focusout`) on the option elements so listeners — notably
11
+ * the autocomplete input's `focusin` handler that mirrors the active descendant
12
+ * — react as if the element were really focused.
13
+ */
14
+ /**
15
+ * Moves virtual focus to `to`, dispatching a virtual blur on the previously
16
+ * virtually-focused element (if any) and a virtual focus on `to` (if non-null).
17
+ */
18
+ function moveVirtualFocus(to) {
19
+ const from = getVirtuallyFocusedElement(getOwnerDocument(to));
20
+ if (from !== to) {
21
+ if (from) dispatchVirtualBlur(from, to);
22
+ if (to) dispatchVirtualFocus(to, from);
23
+ }
24
+ }
25
+ /** Dispatches synthetic `blur` + bubbling `focusout` events on `from`. */
26
+ function dispatchVirtualBlur(from, to) {
27
+ from.dispatchEvent(new FocusEvent("blur", { relatedTarget: to }));
28
+ from.dispatchEvent(new FocusEvent("focusout", {
29
+ bubbles: true,
30
+ relatedTarget: to
31
+ }));
32
+ }
33
+ /** Dispatches synthetic `focus` + bubbling `focusin` events on `to`. */
34
+ function dispatchVirtualFocus(to, from) {
35
+ to.dispatchEvent(new FocusEvent("focus", { relatedTarget: from }));
36
+ to.dispatchEvent(new FocusEvent("focusin", {
37
+ bubbles: true,
38
+ relatedTarget: from
39
+ }));
40
+ }
41
+ /**
42
+ * Returns the currently virtually-focused element: the element referenced by the
43
+ * active element's `aria-activedescendant`, or the active element itself.
44
+ */
45
+ function getVirtuallyFocusedElement(document) {
46
+ const activeElement = getActiveElement(document);
47
+ const activeDescendant = activeElement?.getAttribute("aria-activedescendant");
48
+ if (activeDescendant) return document.getElementById(activeDescendant) || activeElement;
49
+ return activeElement;
50
+ }
51
+ //#endregion
52
+ export { moveVirtualFocus as i, dispatchVirtualFocus as n, getVirtuallyFocusedElement as r, dispatchVirtualBlur as t };
53
+
54
+ //# sourceMappingURL=virtualFocus.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtualFocus.jsx","names":[],"sources":["../../src/focus/virtualFocus.ts"],"sourcesContent":["/**\n * Virtual-focus event dispatch primitives.\n *\n * A faithful port of packages/react-aria/src/focus/virtualFocus.ts. Under virtual\n * focus (e.g. Autocomplete), real DOM focus stays on an input while the\n * \"focused\" collection option is indicated by `aria-activedescendant`. Moving\n * that virtual cursor dispatches synthetic `focus`/`blur` events (with matching\n * bubbling `focusin`/`focusout`) on the option elements so listeners — notably\n * the autocomplete input's `focusin` handler that mirrors the active descendant\n * — react as if the element were really focused.\n */\n\nimport { getActiveElement, getOwnerDocument } from \"../utils/dom\";\n\n/**\n * Moves virtual focus to `to`, dispatching a virtual blur on the previously\n * virtually-focused element (if any) and a virtual focus on `to` (if non-null).\n */\nexport function moveVirtualFocus(to: Element | null): void {\n const from = getVirtuallyFocusedElement(getOwnerDocument(to));\n if (from !== to) {\n if (from) {\n dispatchVirtualBlur(from, to);\n }\n if (to) {\n dispatchVirtualFocus(to, from);\n }\n }\n}\n\n/** Dispatches synthetic `blur` + bubbling `focusout` events on `from`. */\nexport function dispatchVirtualBlur(from: Element, to: Element | null): void {\n from.dispatchEvent(new FocusEvent(\"blur\", { relatedTarget: to }));\n from.dispatchEvent(new FocusEvent(\"focusout\", { bubbles: true, relatedTarget: to }));\n}\n\n/** Dispatches synthetic `focus` + bubbling `focusin` events on `to`. */\nexport function dispatchVirtualFocus(to: Element, from: Element | null): void {\n to.dispatchEvent(new FocusEvent(\"focus\", { relatedTarget: from }));\n to.dispatchEvent(new FocusEvent(\"focusin\", { bubbles: true, relatedTarget: from }));\n}\n\n/**\n * Returns the currently virtually-focused element: the element referenced by the\n * active element's `aria-activedescendant`, or the active element itself.\n */\nexport function getVirtuallyFocusedElement(document: Document): Element | null {\n const activeElement = getActiveElement(document);\n const activeDescendant = activeElement?.getAttribute(\"aria-activedescendant\");\n if (activeDescendant) {\n return document.getElementById(activeDescendant) || activeElement;\n }\n\n return activeElement;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,SAAgB,iBAAiB,IAA0B;CACzD,MAAM,OAAO,2BAA2B,iBAAiB,EAAE,CAAC;CAC5D,IAAI,SAAS,IAAI;EACf,IAAI,MACF,oBAAoB,MAAM,EAAE;EAE9B,IAAI,IACF,qBAAqB,IAAI,IAAI;CAEjC;AACF;;AAGA,SAAgB,oBAAoB,MAAe,IAA0B;CAC3E,KAAK,cAAc,IAAI,WAAW,QAAQ,EAAE,eAAe,GAAG,CAAC,CAAC;CAChE,KAAK,cAAc,IAAI,WAAW,YAAY;EAAE,SAAS;EAAM,eAAe;CAAG,CAAC,CAAC;AACrF;;AAGA,SAAgB,qBAAqB,IAAa,MAA4B;CAC5E,GAAG,cAAc,IAAI,WAAW,SAAS,EAAE,eAAe,KAAK,CAAC,CAAC;CACjE,GAAG,cAAc,IAAI,WAAW,WAAW;EAAE,SAAS;EAAM,eAAe;CAAK,CAAC,CAAC;AACpF;;;;;AAMA,SAAgB,2BAA2B,UAAoC;CAC7E,MAAM,gBAAgB,iBAAiB,QAAQ;CAC/C,MAAM,mBAAmB,eAAe,aAAa,uBAAuB;CAC5E,IAAI,kBACF,OAAO,SAAS,eAAe,gBAAgB,KAAK;CAGtD,OAAO;AACT"}
@@ -0,0 +1,202 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/virtualizer/ScrollView.tsx
13
+ /*
14
+ * Copyright 2020 Adobe. All rights reserved.
15
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
16
+ * you may not use this file except in compliance with the License. You may obtain a copy
17
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
18
+ *
19
+ * Unless required by applicable law or agreed to in writing, software distributed under
20
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
21
+ * OF ANY KIND, either express or implied. See the License for the specific language
22
+ * governing permissions and limitations under the License.
23
+ */
24
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/virtualizer/utils.ts
25
+ import { a as getOwnerDocument, r as getEventTarget, s as getPropagationTargets, t as addEvent, v as nodeContains } from "./dom.js";
26
+ import { i as useLocale } from "./locale.js";
27
+ import { createEffect, createRenderEffect, createSignal, flush } from "solid-js";
28
+ //#region src/virtualizer/utils.ts
29
+ let cachedRTLResult = null;
30
+ function getRTLOffsetType(recalculate = false) {
31
+ if (cachedRTLResult === null || recalculate) {
32
+ const outerDiv = document.createElement("div");
33
+ const outerStyle = outerDiv.style;
34
+ outerStyle.width = "50px";
35
+ outerStyle.height = "50px";
36
+ outerStyle.overflow = "scroll";
37
+ outerStyle.direction = "rtl";
38
+ const innerDiv = document.createElement("div");
39
+ const innerStyle = innerDiv.style;
40
+ innerStyle.width = "100px";
41
+ innerStyle.height = "100px";
42
+ outerDiv.appendChild(innerDiv);
43
+ document.body.appendChild(outerDiv);
44
+ if (outerDiv.scrollLeft > 0) cachedRTLResult = "positive-descending";
45
+ else {
46
+ outerDiv.scrollLeft = 1;
47
+ if (outerDiv.scrollLeft === 0) cachedRTLResult = "negative";
48
+ else cachedRTLResult = "positive-ascending";
49
+ }
50
+ document.body.removeChild(outerDiv);
51
+ return cachedRTLResult;
52
+ }
53
+ return cachedRTLResult;
54
+ }
55
+ function getScrollLeft(node, direction) {
56
+ let { scrollLeft } = node;
57
+ if (direction === "rtl") {
58
+ const { scrollWidth, clientWidth } = node;
59
+ switch (getRTLOffsetType()) {
60
+ case "negative":
61
+ scrollLeft = -scrollLeft;
62
+ break;
63
+ case "positive-descending": scrollLeft = scrollWidth - clientWidth - scrollLeft;
64
+ }
65
+ }
66
+ return scrollLeft;
67
+ }
68
+ function setScrollLeft(node, direction, scrollLeft) {
69
+ if (direction === "rtl") switch (getRTLOffsetType()) {
70
+ case "negative":
71
+ scrollLeft = -scrollLeft;
72
+ break;
73
+ case "positive-ascending": break;
74
+ default: {
75
+ const { clientWidth, scrollWidth } = node;
76
+ scrollLeft = scrollWidth - clientWidth - scrollLeft;
77
+ break;
78
+ }
79
+ }
80
+ node.scrollLeft = scrollLeft;
81
+ }
82
+ //#endregion
83
+ //#region src/virtualizer/ScrollView.ts
84
+ /**
85
+ * Scroll-view observer for a virtualized collection. Attaches to the collection
86
+ * element (`scrollRef`) rather than rendering a wrapper. Based on:
87
+ * - packages/react-aria/src/virtualizer/ScrollView.tsx (`useScrollView`)
88
+ */
89
+ /**
90
+ * Observes scroll and size on a collection element and returns content-wrapper
91
+ * props. RAC `useScrollView` (`ScrollView.tsx:70-404`): CollectionRoot applies
92
+ * only `contentProps` (`Virtualizer.tsx:133-146`); overflow lives on the
93
+ * collection via the consumer (S2 `overflow: auto`).
94
+ */
95
+ function createScrollView(options) {
96
+ const [isScrolling, setIsScrolling] = createSignal(false, { ownedWrite: true });
97
+ const locale = useLocale();
98
+ const allowsWindowScrolling = () => options.allowsWindowScrolling?.() ?? true;
99
+ let scrollFrame;
100
+ let scrollEndTimeout;
101
+ const updateSize = (element) => {
102
+ const nextHeight = element.clientHeight;
103
+ const nextWidth = element.clientWidth;
104
+ options.onSizeChange?.({
105
+ width: nextWidth,
106
+ height: nextHeight
107
+ });
108
+ };
109
+ const updateWindowViewport = () => {
110
+ if (typeof window === "undefined") return;
111
+ options.onWindowViewportChange?.(window.innerHeight);
112
+ };
113
+ const updateViewportOffset = (element) => {
114
+ if (!allowsWindowScrolling()) return;
115
+ const rect = element.getBoundingClientRect();
116
+ const next = rect.y < 0 ? -rect.y : 0;
117
+ options.onViewportOffsetChange?.(next);
118
+ };
119
+ createRenderEffect(() => options.getScrollElement(), (element) => {
120
+ if (!element) return;
121
+ updateSize(element);
122
+ updateWindowViewport();
123
+ updateViewportOffset(element);
124
+ }, { ssrSource: "client" });
125
+ createEffect(() => options.getScrollElement() ?? null, (element) => {
126
+ if (!element) return;
127
+ updateSize(element);
128
+ updateWindowViewport();
129
+ updateViewportOffset(element);
130
+ const handleResize = () => {
131
+ const current = options.getScrollElement();
132
+ if (!current) return;
133
+ updateSize(current);
134
+ updateWindowViewport();
135
+ updateViewportOffset(current);
136
+ };
137
+ window.addEventListener("resize", handleResize);
138
+ const resizeObserver = typeof ResizeObserver !== "undefined" ? new ResizeObserver(() => handleResize()) : null;
139
+ resizeObserver?.observe(element);
140
+ const handleDocumentScroll = (e) => {
141
+ const current = options.getScrollElement();
142
+ if (!current) return;
143
+ const target = getEventTarget(e);
144
+ if (target != null && !nodeContains(target, current) && target !== current) return;
145
+ const isContainer = target === current;
146
+ if (!isContainer && !allowsWindowScrolling()) return;
147
+ if (!isScrolling()) {
148
+ setIsScrolling(true);
149
+ options.onScrollStart?.();
150
+ }
151
+ if (scrollEndTimeout != null) clearTimeout(scrollEndTimeout);
152
+ scrollEndTimeout = setTimeout(() => {
153
+ scrollEndTimeout = void 0;
154
+ setIsScrolling(false);
155
+ options.onScrollEnd?.();
156
+ try {
157
+ flush();
158
+ } catch {}
159
+ }, 300);
160
+ if (scrollFrame != null) cancelAnimationFrame(scrollFrame);
161
+ scrollFrame = requestAnimationFrame(() => {
162
+ scrollFrame = void 0;
163
+ const live = options.getScrollElement();
164
+ if (!live) return;
165
+ if (isContainer) {
166
+ const direction = locale().direction;
167
+ const nextY = Math.max(0, live.scrollTop);
168
+ const nextX = Math.max(0, getScrollLeft(live, direction));
169
+ options.onScrollPositionChange?.({
170
+ x: nextX,
171
+ y: nextY
172
+ });
173
+ } else updateViewportOffset(live);
174
+ updateSize(live);
175
+ });
176
+ };
177
+ const ownerDocument = getOwnerDocument(element);
178
+ const cleanupScroll = addEvent(getPropagationTargets(element, ownerDocument), "scroll", handleDocumentScroll, true);
179
+ return () => {
180
+ window.removeEventListener("resize", handleResize);
181
+ resizeObserver?.disconnect();
182
+ cleanupScroll();
183
+ if (scrollFrame != null) cancelAnimationFrame(scrollFrame);
184
+ if (scrollEndTimeout != null) clearTimeout(scrollEndTimeout);
185
+ };
186
+ }, { ssrSource: "client" });
187
+ const contentProps = () => ({
188
+ role: "presentation",
189
+ style: {
190
+ position: "relative",
191
+ "pointer-events": isScrolling() ? "none" : void 0
192
+ }
193
+ });
194
+ return {
195
+ isScrolling,
196
+ contentProps
197
+ };
198
+ }
199
+ //#endregion
200
+ export { setScrollLeft as i, getRTLOffsetType as n, getScrollLeft as r, createScrollView as t };
201
+
202
+ //# sourceMappingURL=virtualizer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtualizer.js","names":[],"sources":["../../src/virtualizer/utils.ts","../../src/virtualizer/ScrollView.ts"],"sourcesContent":["/*\n * Copyright 2020 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/src/virtualizer/utils.ts\n\n/**\n * RTL scroll-offset helpers for the scroll view. Based on:\n * - packages/react-aria/src/virtualizer/utils.ts\n */\n\nimport type { Direction } from \"../i18n/locale\";\n\nexport type RTLOffsetType = \"negative\" | \"positive-descending\" | \"positive-ascending\";\n\nlet cachedRTLResult: RTLOffsetType | null = null;\n\n// Original licensing for the following methods can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/bvaughn/react-window/blob/master/src/createGridComponent.js\n\nexport function getRTLOffsetType(recalculate = false): RTLOffsetType {\n if (cachedRTLResult === null || recalculate) {\n const outerDiv = document.createElement(\"div\");\n const outerStyle = outerDiv.style;\n outerStyle.width = \"50px\";\n outerStyle.height = \"50px\";\n outerStyle.overflow = \"scroll\";\n outerStyle.direction = \"rtl\";\n\n const innerDiv = document.createElement(\"div\");\n const innerStyle = innerDiv.style;\n innerStyle.width = \"100px\";\n innerStyle.height = \"100px\";\n\n outerDiv.appendChild(innerDiv);\n document.body.appendChild(outerDiv);\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = \"positive-descending\";\n } else {\n outerDiv.scrollLeft = 1;\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = \"negative\";\n } else {\n cachedRTLResult = \"positive-ascending\";\n }\n }\n\n document.body.removeChild(outerDiv);\n return cachedRTLResult;\n }\n\n return cachedRTLResult;\n}\n\nexport function getScrollLeft(node: Element, direction: Direction): number {\n let { scrollLeft } = node;\n\n if (direction === \"rtl\") {\n const { scrollWidth, clientWidth } = node;\n switch (getRTLOffsetType()) {\n case \"negative\":\n scrollLeft = -scrollLeft;\n break;\n case \"positive-descending\":\n scrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n }\n\n return scrollLeft;\n}\n\nexport function setScrollLeft(node: Element, direction: Direction, scrollLeft: number): void {\n if (direction === \"rtl\") {\n switch (getRTLOffsetType()) {\n case \"negative\":\n scrollLeft = -scrollLeft;\n break;\n case \"positive-ascending\":\n break;\n default: {\n const { clientWidth, scrollWidth } = node;\n scrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n }\n }\n\n (node as HTMLElement).scrollLeft = scrollLeft;\n}\n","/*\n * Copyright 2020 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/src/virtualizer/ScrollView.tsx\n\n/**\n * Scroll-view observer for a virtualized collection. Attaches to the collection\n * element (`scrollRef`) rather than rendering a wrapper. Based on:\n * - packages/react-aria/src/virtualizer/ScrollView.tsx (`useScrollView`)\n */\n\nimport { createEffect, createRenderEffect, createSignal, flush } from \"solid-js\";\nimport type { Accessor } from \"solid-js\";\nimport type { JSX } from \"@solidjs/web\";\nimport {\n addEvent,\n getEventTarget,\n getOwnerDocument,\n getPropagationTargets,\n nodeContains,\n} from \"../utils/dom\";\nimport { useLocale } from \"../i18n/locale\";\nimport { getScrollLeft } from \"./utils\";\n\nexport interface ScrollViewSize {\n width: number;\n height: number;\n}\n\nexport interface CreateScrollViewOptions {\n /** The collection element that scrolls. RAC `useScrollView` `ref`. */\n getScrollElement: Accessor<HTMLElement | null | undefined>;\n /**\n * Whether the collection may scroll with the page. RAC CollectionRoot\n * hardcodes this `true` (`Virtualizer.tsx:109,140`).\n */\n allowsWindowScrolling?: Accessor<boolean>;\n /** Content size used to clamp rubber-band scroll. RAC `contentSize`. */\n contentSize?: Accessor<ScrollViewSize>;\n onScrollPositionChange?: (position: { x: number; y: number }) => void;\n onViewportOffsetChange?: (offset: number) => void;\n onSizeChange?: (size: ScrollViewSize) => void;\n onWindowViewportChange?: (height: number) => void;\n onScrollStart?: () => void;\n onScrollEnd?: () => void;\n}\n\nexport interface ScrollViewAria {\n isScrolling: Accessor<boolean>;\n contentProps: Accessor<JSX.HTMLAttributes<HTMLDivElement>>;\n}\n\n/**\n * Observes scroll and size on a collection element and returns content-wrapper\n * props. RAC `useScrollView` (`ScrollView.tsx:70-404`): CollectionRoot applies\n * only `contentProps` (`Virtualizer.tsx:133-146`); overflow lives on the\n * collection via the consumer (S2 `overflow: auto`).\n */\nexport function createScrollView(options: CreateScrollViewOptions): ScrollViewAria {\n const [isScrolling, setIsScrolling] = createSignal(false, { ownedWrite: true });\n const locale = useLocale();\n const allowsWindowScrolling = () => options.allowsWindowScrolling?.() ?? true;\n\n let scrollFrame: number | undefined;\n let scrollEndTimeout: ReturnType<typeof setTimeout> | undefined;\n\n const updateSize = (element: HTMLElement) => {\n const nextHeight = element.clientHeight;\n const nextWidth = element.clientWidth;\n options.onSizeChange?.({ width: nextWidth, height: nextHeight });\n };\n\n const updateWindowViewport = () => {\n if (typeof window === \"undefined\") return;\n options.onWindowViewportChange?.(window.innerHeight);\n };\n\n const updateViewportOffset = (element: HTMLElement) => {\n if (!allowsWindowScrolling()) return;\n const rect = element.getBoundingClientRect();\n const next = rect.y < 0 ? -rect.y : 0;\n options.onViewportOffsetChange?.(next);\n };\n\n createRenderEffect(\n () => options.getScrollElement(),\n (element) => {\n if (!element) return;\n // RAC initializes viewport size in a layout effect. A client-source\n // effect waits for Solid 2's hydration snapshot to release, so nonzero\n // geometry cannot grow the server's row window during DOM adoption.\n updateSize(element);\n updateWindowViewport();\n updateViewportOffset(element);\n },\n { ssrSource: \"client\" },\n );\n\n createEffect(\n () => options.getScrollElement() ?? null,\n (element) => {\n if (!element) return;\n\n updateSize(element);\n updateWindowViewport();\n updateViewportOffset(element);\n\n const handleResize = () => {\n const current = options.getScrollElement();\n if (!current) return;\n updateSize(current);\n updateWindowViewport();\n updateViewportOffset(current);\n };\n window.addEventListener(\"resize\", handleResize);\n\n const resizeObserver =\n typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(() => handleResize()) : null;\n resizeObserver?.observe(element);\n\n // RAC `useScrollView` `ScrollView.tsx:221-229`: capturing scroll on\n // getPropagationTargets so ancestor/page scroll updates viewportOffset.\n const handleDocumentScroll = (e: Event) => {\n const current = options.getScrollElement();\n if (!current) return;\n const target = getEventTarget(e) as Node | null;\n if (target != null && !nodeContains(target, current) && target !== current) {\n return;\n }\n const isContainer = target === current;\n if (!isContainer && !allowsWindowScrolling()) return;\n\n if (!isScrolling()) {\n setIsScrolling(true);\n options.onScrollStart?.();\n }\n if (scrollEndTimeout != null) clearTimeout(scrollEndTimeout);\n // RAC `ScrollView.tsx:188-205`: 300ms after the last scroll.\n scrollEndTimeout = setTimeout(() => {\n scrollEndTimeout = undefined;\n setIsScrolling(false);\n options.onScrollEnd?.();\n // Timer callbacks can flush. Content `pointer-events` is a render of\n // `isScrolling()`; without this, fake-timer tests still see \"none\".\n try {\n flush();\n } catch {\n // Ignore: flush is forbidden inside createEffect apply.\n }\n }, 300);\n\n if (scrollFrame != null) cancelAnimationFrame(scrollFrame);\n scrollFrame = requestAnimationFrame(() => {\n scrollFrame = undefined;\n const live = options.getScrollElement();\n if (!live) return;\n if (isContainer) {\n const direction = locale().direction;\n const nextY = Math.max(0, live.scrollTop);\n const nextX = Math.max(0, getScrollLeft(live, direction));\n options.onScrollPositionChange?.({ x: nextX, y: nextY });\n } else {\n updateViewportOffset(live);\n }\n updateSize(live);\n });\n };\n\n const ownerDocument = getOwnerDocument(element);\n const cleanupScroll = addEvent(\n getPropagationTargets(element, ownerDocument),\n \"scroll\",\n handleDocumentScroll,\n true,\n );\n\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n resizeObserver?.disconnect();\n cleanupScroll();\n if (scrollFrame != null) cancelAnimationFrame(scrollFrame);\n if (scrollEndTimeout != null) clearTimeout(scrollEndTimeout);\n };\n },\n { ssrSource: \"client\" },\n );\n\n const contentProps = (): JSX.HTMLAttributes<HTMLDivElement> => ({\n // RAC `useScrollView` `contentProps` `ScrollView.tsx:400-403`.\n role: \"presentation\",\n style: {\n position: \"relative\",\n \"pointer-events\": isScrolling() ? \"none\" : undefined,\n },\n });\n\n return {\n isScrolling,\n contentProps,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAI,kBAAwC;AAM5C,SAAgB,iB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