@proyecto-viviana/solidaria 0.4.3 → 0.6.0-rc.1

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 (1482) hide show
  1. package/LICENSE-APACHE-2.0 +201 -0
  2. package/NOTICE +91 -0
  3. package/README.md +54 -27
  4. package/dist/_chunk/DragManager.js +79 -31
  5. package/dist/_chunk/DragManager.js.map +1 -1
  6. package/dist/_chunk/DragManager.jsx +79 -31
  7. package/dist/_chunk/DragManager.jsx.map +1 -1
  8. package/dist/_chunk/FocusScope.js +380 -73
  9. package/dist/_chunk/FocusScope.js.map +1 -1
  10. package/dist/_chunk/FocusScope.jsx +373 -62
  11. package/dist/_chunk/FocusScope.jsx.map +1 -1
  12. package/dist/_chunk/ListKeyboardDelegate.js +270 -0
  13. package/dist/_chunk/ListKeyboardDelegate.js.map +1 -0
  14. package/dist/_chunk/ListKeyboardDelegate.jsx +270 -0
  15. package/dist/_chunk/ListKeyboardDelegate.jsx.map +1 -0
  16. package/dist/_chunk/actiongroup.js +46 -22
  17. package/dist/_chunk/actiongroup.js.map +1 -1
  18. package/dist/_chunk/actiongroup.jsx +46 -22
  19. package/dist/_chunk/actiongroup.jsx.map +1 -1
  20. package/dist/_chunk/announce.js +24 -9
  21. package/dist/_chunk/announce.js.map +1 -1
  22. package/dist/_chunk/announce.jsx +24 -9
  23. package/dist/_chunk/announce.jsx.map +1 -1
  24. package/dist/_chunk/ariaHideOutside.js +212 -10
  25. package/dist/_chunk/ariaHideOutside.js.map +1 -1
  26. package/dist/_chunk/ariaHideOutside.jsx +212 -10
  27. package/dist/_chunk/ariaHideOutside.jsx.map +1 -1
  28. package/dist/_chunk/autocomplete.js +92 -12
  29. package/dist/_chunk/autocomplete.js.map +1 -1
  30. package/dist/_chunk/autocomplete.jsx +92 -12
  31. package/dist/_chunk/autocomplete.jsx.map +1 -1
  32. package/dist/_chunk/breadcrumbs.js +70 -8
  33. package/dist/_chunk/breadcrumbs.js.map +1 -1
  34. package/dist/_chunk/breadcrumbs.jsx +70 -8
  35. package/dist/_chunk/breadcrumbs.jsx.map +1 -1
  36. package/dist/_chunk/button.js +61 -24
  37. package/dist/_chunk/button.js.map +1 -1
  38. package/dist/_chunk/button.jsx +61 -24
  39. package/dist/_chunk/button.jsx.map +1 -1
  40. package/dist/_chunk/calendar.js +661 -112
  41. package/dist/_chunk/calendar.js.map +1 -1
  42. package/dist/_chunk/calendar.jsx +661 -112
  43. package/dist/_chunk/calendar.jsx.map +1 -1
  44. package/dist/_chunk/callEventHandler.js +21 -0
  45. package/dist/_chunk/callEventHandler.js.map +1 -0
  46. package/dist/_chunk/callEventHandler.jsx +21 -0
  47. package/dist/_chunk/callEventHandler.jsx.map +1 -0
  48. package/dist/_chunk/checkbox.js +142 -48
  49. package/dist/_chunk/checkbox.js.map +1 -1
  50. package/dist/_chunk/checkbox.jsx +142 -48
  51. package/dist/_chunk/checkbox.jsx.map +1 -1
  52. package/dist/_chunk/color.js +495 -73
  53. package/dist/_chunk/color.js.map +1 -1
  54. package/dist/_chunk/color.jsx +495 -73
  55. package/dist/_chunk/color.jsx.map +1 -1
  56. package/dist/_chunk/combobox.js +213 -128
  57. package/dist/_chunk/combobox.js.map +1 -1
  58. package/dist/_chunk/combobox.jsx +213 -128
  59. package/dist/_chunk/combobox.jsx.map +1 -1
  60. package/dist/_chunk/constants.js +12 -0
  61. package/dist/_chunk/constants.js.map +1 -1
  62. package/dist/_chunk/constants.jsx +12 -0
  63. package/dist/_chunk/constants.jsx.map +1 -1
  64. package/dist/_chunk/createCollator.js +12 -0
  65. package/dist/_chunk/createCollator.js.map +1 -1
  66. package/dist/_chunk/createCollator.jsx +12 -0
  67. package/dist/_chunk/createCollator.jsx.map +1 -1
  68. package/dist/_chunk/createCollectionRowInteraction.js +51 -15
  69. package/dist/_chunk/createCollectionRowInteraction.js.map +1 -1
  70. package/dist/_chunk/createCollectionRowInteraction.jsx +51 -15
  71. package/dist/_chunk/createCollectionRowInteraction.jsx.map +1 -1
  72. package/dist/_chunk/createDescription.js +117 -0
  73. package/dist/_chunk/createDescription.js.map +1 -0
  74. package/dist/_chunk/createDescription.jsx +117 -0
  75. package/dist/_chunk/createDescription.jsx.map +1 -0
  76. package/dist/_chunk/createField.js +35 -25
  77. package/dist/_chunk/createField.js.map +1 -1
  78. package/dist/_chunk/createField.jsx +35 -25
  79. package/dist/_chunk/createField.jsx.map +1 -1
  80. package/dist/_chunk/createFocus.js +18 -5
  81. package/dist/_chunk/createFocus.js.map +1 -1
  82. package/dist/_chunk/createFocus.jsx +18 -5
  83. package/dist/_chunk/createFocus.jsx.map +1 -1
  84. package/dist/_chunk/createFocusRing.js +16 -7
  85. package/dist/_chunk/createFocusRing.js.map +1 -1
  86. package/dist/_chunk/createFocusRing.jsx +16 -7
  87. package/dist/_chunk/createFocusRing.jsx.map +1 -1
  88. package/dist/_chunk/createFocusWithin.js +36 -9
  89. package/dist/_chunk/createFocusWithin.js.map +1 -1
  90. package/dist/_chunk/createFocusWithin.jsx +36 -9
  91. package/dist/_chunk/createFocusWithin.jsx.map +1 -1
  92. package/dist/_chunk/createFocusable.js +51 -53
  93. package/dist/_chunk/createFocusable.js.map +1 -1
  94. package/dist/_chunk/createFocusable.jsx +51 -53
  95. package/dist/_chunk/createFocusable.jsx.map +1 -1
  96. package/dist/_chunk/createFormReset.js +194 -13
  97. package/dist/_chunk/createFormReset.js.map +1 -1
  98. package/dist/_chunk/createFormReset.jsx +194 -13
  99. package/dist/_chunk/createFormReset.jsx.map +1 -1
  100. package/dist/_chunk/createGrid.js +869 -0
  101. package/dist/_chunk/createGrid.js.map +1 -0
  102. package/dist/_chunk/createGrid.jsx +869 -0
  103. package/dist/_chunk/createGrid.jsx.map +1 -0
  104. package/dist/_chunk/createGridListItem.js +480 -0
  105. package/dist/_chunk/createGridListItem.js.map +1 -0
  106. package/dist/_chunk/createGridListItem.jsx +480 -0
  107. package/dist/_chunk/createGridListItem.jsx.map +1 -0
  108. package/dist/_chunk/createHasTabbableChild.js +63 -0
  109. package/dist/_chunk/createHasTabbableChild.js.map +1 -0
  110. package/dist/_chunk/createHasTabbableChild.jsx +63 -0
  111. package/dist/_chunk/createHasTabbableChild.jsx.map +1 -0
  112. package/dist/_chunk/createHover.js +58 -45
  113. package/dist/_chunk/createHover.js.map +1 -1
  114. package/dist/_chunk/createHover.jsx +58 -45
  115. package/dist/_chunk/createHover.jsx.map +1 -1
  116. package/dist/_chunk/createInteractionModality.js +179 -34
  117. package/dist/_chunk/createInteractionModality.js.map +1 -1
  118. package/dist/_chunk/createInteractionModality.jsx +179 -34
  119. package/dist/_chunk/createInteractionModality.jsx.map +1 -1
  120. package/dist/_chunk/createKeyboard.js +206 -0
  121. package/dist/_chunk/createKeyboard.js.map +1 -0
  122. package/dist/_chunk/createKeyboard.jsx +206 -0
  123. package/dist/_chunk/createKeyboard.jsx.map +1 -0
  124. package/dist/_chunk/createLabel.js +17 -4
  125. package/dist/_chunk/createLabel.js.map +1 -1
  126. package/dist/_chunk/createLabel.jsx +17 -4
  127. package/dist/_chunk/createLabel.jsx.map +1 -1
  128. package/dist/_chunk/createLabels.js +13 -1
  129. package/dist/_chunk/createLabels.js.map +1 -1
  130. package/dist/_chunk/createLabels.jsx +13 -1
  131. package/dist/_chunk/createLabels.jsx.map +1 -1
  132. package/dist/_chunk/createLandmark.js +342 -117
  133. package/dist/_chunk/createLandmark.js.map +1 -1
  134. package/dist/_chunk/createLandmark.jsx +342 -117
  135. package/dist/_chunk/createLandmark.jsx.map +1 -1
  136. package/dist/_chunk/createLongPress.js +127 -0
  137. package/dist/_chunk/createLongPress.js.map +1 -0
  138. package/dist/_chunk/createLongPress.jsx +127 -0
  139. package/dist/_chunk/createLongPress.jsx.map +1 -0
  140. package/dist/_chunk/createOverlay.js +198 -124
  141. package/dist/_chunk/createOverlay.js.map +1 -1
  142. package/dist/_chunk/createOverlay.jsx +198 -124
  143. package/dist/_chunk/createOverlay.jsx.map +1 -1
  144. package/dist/_chunk/createOverlayTrigger.js +58 -0
  145. package/dist/_chunk/createOverlayTrigger.js.map +1 -0
  146. package/dist/_chunk/createOverlayTrigger.jsx +58 -0
  147. package/dist/_chunk/createOverlayTrigger.jsx.map +1 -0
  148. package/dist/_chunk/createPress.js +57 -46
  149. package/dist/_chunk/createPress.js.map +1 -1
  150. package/dist/_chunk/createPress.jsx +57 -46
  151. package/dist/_chunk/createPress.jsx.map +1 -1
  152. package/dist/_chunk/createProgressBar.js +21 -5
  153. package/dist/_chunk/createProgressBar.js.map +1 -1
  154. package/dist/_chunk/createProgressBar.jsx +21 -5
  155. package/dist/_chunk/createProgressBar.jsx.map +1 -1
  156. package/dist/_chunk/createSelectableCollection.js +468 -0
  157. package/dist/_chunk/createSelectableCollection.js.map +1 -0
  158. package/dist/_chunk/createSelectableCollection.jsx +468 -0
  159. package/dist/_chunk/createSelectableCollection.jsx.map +1 -0
  160. package/dist/_chunk/createSelectableItem.js +121 -89
  161. package/dist/_chunk/createSelectableItem.js.map +1 -1
  162. package/dist/_chunk/createSelectableItem.jsx +121 -89
  163. package/dist/_chunk/createSelectableItem.jsx.map +1 -1
  164. package/dist/_chunk/createSelectableList.js +70 -0
  165. package/dist/_chunk/createSelectableList.js.map +1 -0
  166. package/dist/_chunk/createSelectableList.jsx +70 -0
  167. package/dist/_chunk/createSelectableList.jsx.map +1 -0
  168. package/dist/_chunk/createStringFormatter.js +350 -5
  169. package/dist/_chunk/createStringFormatter.js.map +1 -1
  170. package/dist/_chunk/createStringFormatter.jsx +350 -5
  171. package/dist/_chunk/createStringFormatter.jsx.map +1 -1
  172. package/dist/_chunk/createToggle.js +108 -23
  173. package/dist/_chunk/createToggle.js.map +1 -1
  174. package/dist/_chunk/createToggle.jsx +108 -23
  175. package/dist/_chunk/createToggle.jsx.map +1 -1
  176. package/dist/_chunk/createTypeSelect.js +18 -3
  177. package/dist/_chunk/createTypeSelect.js.map +1 -1
  178. package/dist/_chunk/createTypeSelect.jsx +18 -3
  179. package/dist/_chunk/createTypeSelect.jsx.map +1 -1
  180. package/dist/_chunk/{visually-hidden.js → createVisuallyHidden.js} +16 -4
  181. package/dist/_chunk/createVisuallyHidden.js.map +1 -0
  182. package/dist/_chunk/{visually-hidden.jsx → createVisuallyHidden.jsx} +16 -4
  183. package/dist/_chunk/createVisuallyHidden.jsx.map +1 -0
  184. package/dist/_chunk/datepicker.js +223 -80
  185. package/dist/_chunk/datepicker.js.map +1 -1
  186. package/dist/_chunk/datepicker.jsx +223 -80
  187. package/dist/_chunk/datepicker.jsx.map +1 -1
  188. package/dist/_chunk/dialog.js +49 -19
  189. package/dist/_chunk/dialog.js.map +1 -1
  190. package/dist/_chunk/dialog.jsx +49 -19
  191. package/dist/_chunk/dialog.jsx.map +1 -1
  192. package/dist/_chunk/disclosure.js +52 -31
  193. package/dist/_chunk/disclosure.js.map +1 -1
  194. package/dist/_chunk/disclosure.jsx +52 -31
  195. package/dist/_chunk/disclosure.jsx.map +1 -1
  196. package/dist/_chunk/dnd.js +1482 -1209
  197. package/dist/_chunk/dnd.js.map +1 -1
  198. package/dist/_chunk/dnd.jsx +1482 -1209
  199. package/dist/_chunk/dnd.jsx.map +1 -1
  200. package/dist/_chunk/dom.js +624 -0
  201. package/dist/_chunk/dom.js.map +1 -0
  202. package/dist/_chunk/dom.jsx +624 -0
  203. package/dist/_chunk/dom.jsx.map +1 -0
  204. package/dist/_chunk/env.js +11 -56
  205. package/dist/_chunk/env.js.map +1 -1
  206. package/dist/_chunk/env.jsx +11 -56
  207. package/dist/_chunk/env.jsx.map +1 -1
  208. package/dist/_chunk/filterDOMProps.js +32 -7
  209. package/dist/_chunk/filterDOMProps.js.map +1 -1
  210. package/dist/_chunk/filterDOMProps.jsx +32 -7
  211. package/dist/_chunk/filterDOMProps.jsx.map +1 -1
  212. package/dist/_chunk/focus.js +588 -336
  213. package/dist/_chunk/focus.js.map +1 -1
  214. package/dist/_chunk/focus.jsx +588 -336
  215. package/dist/_chunk/focus.jsx.map +1 -1
  216. package/dist/_chunk/grid.js +40 -428
  217. package/dist/_chunk/grid.js.map +1 -1
  218. package/dist/_chunk/grid.jsx +40 -428
  219. package/dist/_chunk/grid.jsx.map +1 -1
  220. package/dist/_chunk/gridlist.js +36 -282
  221. package/dist/_chunk/gridlist.js.map +1 -1
  222. package/dist/_chunk/gridlist.jsx +36 -282
  223. package/dist/_chunk/gridlist.jsx.map +1 -1
  224. package/dist/_chunk/i18n.js +70 -2
  225. package/dist/_chunk/i18n.js.map +1 -1
  226. package/dist/_chunk/i18n.jsx +70 -2
  227. package/dist/_chunk/i18n.jsx.map +1 -1
  228. package/dist/_chunk/interactions.js +38 -102
  229. package/dist/_chunk/interactions.js.map +1 -1
  230. package/dist/_chunk/interactions.jsx +38 -100
  231. package/dist/_chunk/interactions.jsx.map +1 -1
  232. package/dist/_chunk/link.js +44 -18
  233. package/dist/_chunk/link.js.map +1 -1
  234. package/dist/_chunk/link.jsx +44 -18
  235. package/dist/_chunk/link.jsx.map +1 -1
  236. package/dist/_chunk/listbox.js +108 -175
  237. package/dist/_chunk/listbox.js.map +1 -1
  238. package/dist/_chunk/listbox.jsx +108 -175
  239. package/dist/_chunk/listbox.jsx.map +1 -1
  240. package/dist/_chunk/locale.js +67 -13
  241. package/dist/_chunk/locale.js.map +1 -1
  242. package/dist/_chunk/locale.jsx +66 -12
  243. package/dist/_chunk/locale.jsx.map +1 -1
  244. package/dist/_chunk/menu.js +343 -239
  245. package/dist/_chunk/menu.js.map +1 -1
  246. package/dist/_chunk/menu.jsx +343 -239
  247. package/dist/_chunk/menu.jsx.map +1 -1
  248. package/dist/_chunk/mergeProps.js +216 -0
  249. package/dist/_chunk/mergeProps.js.map +1 -0
  250. package/dist/_chunk/mergeProps.jsx +216 -0
  251. package/dist/_chunk/mergeProps.jsx.map +1 -0
  252. package/dist/_chunk/meter.js +16 -4
  253. package/dist/_chunk/meter.js.map +1 -1
  254. package/dist/_chunk/meter.jsx +16 -4
  255. package/dist/_chunk/meter.jsx.map +1 -1
  256. package/dist/_chunk/numberfield.js +496 -41
  257. package/dist/_chunk/numberfield.js.map +1 -1
  258. package/dist/_chunk/numberfield.jsx +496 -41
  259. package/dist/_chunk/numberfield.jsx.map +1 -1
  260. package/dist/_chunk/overlays.js +91 -78
  261. package/dist/_chunk/overlays.js.map +1 -1
  262. package/dist/_chunk/overlays.jsx +71 -57
  263. package/dist/_chunk/overlays.jsx.map +1 -1
  264. package/dist/_chunk/owner.js +23 -0
  265. package/dist/_chunk/owner.js.map +1 -0
  266. package/dist/_chunk/owner.jsx +23 -0
  267. package/dist/_chunk/owner.jsx.map +1 -0
  268. package/dist/_chunk/popover.js +201 -55
  269. package/dist/_chunk/popover.js.map +1 -1
  270. package/dist/_chunk/popover.jsx +201 -55
  271. package/dist/_chunk/popover.jsx.map +1 -1
  272. package/dist/_chunk/radio.js +140 -71
  273. package/dist/_chunk/radio.js.map +1 -1
  274. package/dist/_chunk/radio.jsx +140 -71
  275. package/dist/_chunk/radio.jsx.map +1 -1
  276. package/dist/_chunk/reactivity.js.map +1 -1
  277. package/dist/_chunk/reactivity.jsx.map +1 -1
  278. package/dist/_chunk/refs.js +41 -0
  279. package/dist/_chunk/refs.js.map +1 -0
  280. package/dist/_chunk/refs.jsx +41 -0
  281. package/dist/_chunk/refs.jsx.map +1 -0
  282. package/dist/_chunk/searchfield.js +72 -3
  283. package/dist/_chunk/searchfield.js.map +1 -1
  284. package/dist/_chunk/searchfield.jsx +72 -3
  285. package/dist/_chunk/searchfield.jsx.map +1 -1
  286. package/dist/_chunk/select.js +238 -117
  287. package/dist/_chunk/select.js.map +1 -1
  288. package/dist/_chunk/select.jsx +174 -107
  289. package/dist/_chunk/select.jsx.map +1 -1
  290. package/dist/_chunk/selection.js +19 -637
  291. package/dist/_chunk/selection.js.map +1 -1
  292. package/dist/_chunk/selection.jsx +19 -637
  293. package/dist/_chunk/selection.jsx.map +1 -1
  294. package/dist/_chunk/separator.js +12 -0
  295. package/dist/_chunk/separator.js.map +1 -1
  296. package/dist/_chunk/separator.jsx +12 -0
  297. package/dist/_chunk/separator.jsx.map +1 -1
  298. package/dist/_chunk/slider.js +403 -203
  299. package/dist/_chunk/slider.js.map +1 -1
  300. package/dist/_chunk/slider.jsx +403 -203
  301. package/dist/_chunk/slider.jsx.map +1 -1
  302. package/dist/_chunk/spinbutton.js +18 -8
  303. package/dist/_chunk/spinbutton.js.map +1 -1
  304. package/dist/_chunk/spinbutton.jsx +18 -8
  305. package/dist/_chunk/spinbutton.jsx.map +1 -1
  306. package/dist/_chunk/steplist.js +110 -34
  307. package/dist/_chunk/steplist.js.map +1 -1
  308. package/dist/_chunk/steplist.jsx +110 -34
  309. package/dist/_chunk/steplist.jsx.map +1 -1
  310. package/dist/_chunk/switch.js +21 -3
  311. package/dist/_chunk/switch.js.map +1 -1
  312. package/dist/_chunk/switch.jsx +21 -3
  313. package/dist/_chunk/switch.jsx.map +1 -1
  314. package/dist/_chunk/table.js +1004 -208
  315. package/dist/_chunk/table.js.map +1 -1
  316. package/dist/_chunk/table.jsx +1004 -208
  317. package/dist/_chunk/table.jsx.map +1 -1
  318. package/dist/_chunk/tabs.js +86 -32
  319. package/dist/_chunk/tabs.js.map +1 -1
  320. package/dist/_chunk/tabs.jsx +86 -32
  321. package/dist/_chunk/tabs.jsx.map +1 -1
  322. package/dist/_chunk/tag.js +355 -164
  323. package/dist/_chunk/tag.js.map +1 -1
  324. package/dist/_chunk/tag.jsx +355 -164
  325. package/dist/_chunk/tag.jsx.map +1 -1
  326. package/dist/_chunk/textfield.js +87 -12
  327. package/dist/_chunk/textfield.js.map +1 -1
  328. package/dist/_chunk/textfield.jsx +87 -12
  329. package/dist/_chunk/textfield.jsx.map +1 -1
  330. package/dist/_chunk/toast.js +247 -47
  331. package/dist/_chunk/toast.js.map +1 -1
  332. package/dist/_chunk/toast.jsx +247 -47
  333. package/dist/_chunk/toast.jsx.map +1 -1
  334. package/dist/_chunk/tokenfield.js +629 -0
  335. package/dist/_chunk/tokenfield.js.map +1 -0
  336. package/dist/_chunk/tokenfield.jsx +629 -0
  337. package/dist/_chunk/tokenfield.jsx.map +1 -0
  338. package/dist/_chunk/toolbar.js +26 -8
  339. package/dist/_chunk/toolbar.js.map +1 -1
  340. package/dist/_chunk/toolbar.jsx +26 -8
  341. package/dist/_chunk/toolbar.jsx.map +1 -1
  342. package/dist/_chunk/tooltip.js +381 -11
  343. package/dist/_chunk/tooltip.js.map +1 -1
  344. package/dist/_chunk/tooltip.jsx +381 -11
  345. package/dist/_chunk/tooltip.jsx.map +1 -1
  346. package/dist/_chunk/tree.js +297 -82
  347. package/dist/_chunk/tree.js.map +1 -1
  348. package/dist/_chunk/tree.jsx +297 -82
  349. package/dist/_chunk/tree.jsx.map +1 -1
  350. package/dist/_chunk/utils.js +602 -297
  351. package/dist/_chunk/utils.js.map +1 -1
  352. package/dist/_chunk/utils.jsx +602 -297
  353. package/dist/_chunk/utils.jsx.map +1 -1
  354. package/dist/_chunk/utils2.js +77 -0
  355. package/dist/_chunk/utils2.js.map +1 -0
  356. package/dist/_chunk/utils2.jsx +77 -0
  357. package/dist/_chunk/utils2.jsx.map +1 -0
  358. package/dist/_chunk/virtualFocus.js +54 -0
  359. package/dist/_chunk/virtualFocus.js.map +1 -0
  360. package/dist/_chunk/virtualFocus.jsx +54 -0
  361. package/dist/_chunk/virtualFocus.jsx.map +1 -0
  362. package/dist/_chunk/virtualizer.js +202 -0
  363. package/dist/_chunk/virtualizer.js.map +1 -0
  364. package/dist/_chunk/virtualizer.jsx +202 -0
  365. package/dist/_chunk/virtualizer.jsx.map +1 -0
  366. package/dist/actiongroup/createActionGroup.d.ts +2 -1
  367. package/dist/actiongroup/createActionGroup.d.ts.map +1 -1
  368. package/dist/autocomplete/createAutocomplete.d.ts +1 -9
  369. package/dist/autocomplete/createAutocomplete.d.ts.map +1 -1
  370. package/dist/autocomplete/intl/index.d.ts +13 -0
  371. package/dist/autocomplete/intl/index.d.ts.map +1 -0
  372. package/dist/breadcrumbs/createBreadcrumbs.d.ts +0 -6
  373. package/dist/breadcrumbs/createBreadcrumbs.d.ts.map +1 -1
  374. package/dist/breadcrumbs/intl/index.d.ts +13 -0
  375. package/dist/breadcrumbs/intl/index.d.ts.map +1 -0
  376. package/dist/button/createButton.d.ts +2 -1
  377. package/dist/button/createButton.d.ts.map +1 -1
  378. package/dist/button/createToggleButton.d.ts.map +1 -1
  379. package/dist/button/createToggleButtonGroup.d.ts +1 -1
  380. package/dist/button/createToggleButtonGroup.d.ts.map +1 -1
  381. package/dist/button/types.d.ts +14 -0
  382. package/dist/button/types.d.ts.map +1 -1
  383. package/dist/calendar/createCalendar.d.ts +13 -11
  384. package/dist/calendar/createCalendar.d.ts.map +1 -1
  385. package/dist/calendar/createCalendarCell.d.ts +5 -6
  386. package/dist/calendar/createCalendarCell.d.ts.map +1 -1
  387. package/dist/calendar/createCalendarGrid.d.ts +2 -8
  388. package/dist/calendar/createCalendarGrid.d.ts.map +1 -1
  389. package/dist/calendar/createCalendarMonthPicker.d.ts +0 -8
  390. package/dist/calendar/createCalendarMonthPicker.d.ts.map +1 -1
  391. package/dist/calendar/createCalendarYearPicker.d.ts +0 -8
  392. package/dist/calendar/createCalendarYearPicker.d.ts.map +1 -1
  393. package/dist/calendar/createRangeCalendar.d.ts +25 -9
  394. package/dist/calendar/createRangeCalendar.d.ts.map +1 -1
  395. package/dist/calendar/createRangeCalendarCell.d.ts +7 -6
  396. package/dist/calendar/createRangeCalendarCell.d.ts.map +1 -1
  397. package/dist/calendar/intl/index.d.ts.map +1 -1
  398. package/dist/calendar/utils.d.ts +24 -4
  399. package/dist/calendar/utils.d.ts.map +1 -1
  400. package/dist/checkbox/createCheckbox.d.ts +2 -1
  401. package/dist/checkbox/createCheckbox.d.ts.map +1 -1
  402. package/dist/checkbox/createCheckboxGroup.d.ts +7 -2
  403. package/dist/checkbox/createCheckboxGroup.d.ts.map +1 -1
  404. package/dist/checkbox/createCheckboxGroupItem.d.ts +0 -8
  405. package/dist/checkbox/createCheckboxGroupItem.d.ts.map +1 -1
  406. package/dist/collections/index.d.ts +1 -1
  407. package/dist/collections/index.d.ts.map +1 -1
  408. package/dist/collections/index.js +34 -17
  409. package/dist/collections/index.js.map +1 -1
  410. package/dist/collections/index.jsx +34 -17
  411. package/dist/collections/index.jsx.map +1 -1
  412. package/dist/color/createColorArea.d.ts +2 -7
  413. package/dist/color/createColorArea.d.ts.map +1 -1
  414. package/dist/color/createColorField.d.ts +2 -7
  415. package/dist/color/createColorField.d.ts.map +1 -1
  416. package/dist/color/createColorSlider.d.ts +1 -6
  417. package/dist/color/createColorSlider.d.ts.map +1 -1
  418. package/dist/color/createColorSwatch.d.ts +1 -6
  419. package/dist/color/createColorSwatch.d.ts.map +1 -1
  420. package/dist/color/createColorWheel.d.ts +1 -6
  421. package/dist/color/createColorWheel.d.ts.map +1 -1
  422. package/dist/color/intl/index.d.ts.map +1 -1
  423. package/dist/color/types.d.ts +49 -1
  424. package/dist/color/types.d.ts.map +1 -1
  425. package/dist/combobox/createComboBox.d.ts +18 -9
  426. package/dist/combobox/createComboBox.d.ts.map +1 -1
  427. package/dist/combobox/intl/generated-locales.d.ts +3 -0
  428. package/dist/combobox/intl/generated-locales.d.ts.map +1 -1
  429. package/dist/combobox/intl/index.d.ts +3 -2
  430. package/dist/combobox/intl/index.d.ts.map +1 -1
  431. package/dist/datepicker/createDateField.d.ts +2 -12
  432. package/dist/datepicker/createDateField.d.ts.map +1 -1
  433. package/dist/datepicker/createDatePicker.d.ts +2 -18
  434. package/dist/datepicker/createDatePicker.d.ts.map +1 -1
  435. package/dist/datepicker/createDatePickerGroup.d.ts +2 -2
  436. package/dist/datepicker/createDatePickerGroup.d.ts.map +1 -1
  437. package/dist/datepicker/createDateRangePicker.d.ts +8 -22
  438. package/dist/datepicker/createDateRangePicker.d.ts.map +1 -1
  439. package/dist/datepicker/createDateSegment.d.ts +0 -9
  440. package/dist/datepicker/createDateSegment.d.ts.map +1 -1
  441. package/dist/datepicker/createDisplayNames.d.ts +1 -9
  442. package/dist/datepicker/createDisplayNames.d.ts.map +1 -1
  443. package/dist/datepicker/createTimeField.d.ts.map +1 -1
  444. package/dist/datepicker/intl.d.ts.map +1 -1
  445. package/dist/dialog/createDialog.d.ts +2 -4
  446. package/dist/dialog/createDialog.d.ts.map +1 -1
  447. package/dist/dialog/types.d.ts +14 -0
  448. package/dist/dialog/types.d.ts.map +1 -1
  449. package/dist/disclosure/createDisclosure.d.ts +1 -8
  450. package/dist/disclosure/createDisclosure.d.ts.map +1 -1
  451. package/dist/disclosure/createDisclosureGroup.d.ts +3 -4
  452. package/dist/disclosure/createDisclosureGroup.d.ts.map +1 -1
  453. package/dist/dnd/DragManager.d.ts +1 -16
  454. package/dist/dnd/DragManager.d.ts.map +1 -1
  455. package/dist/dnd/DropTargetKeyboardNavigation.d.ts +2 -2
  456. package/dist/dnd/createDrag.d.ts +1 -7
  457. package/dist/dnd/createDrag.d.ts.map +1 -1
  458. package/dist/dnd/createDraggableCollection.d.ts +1 -7
  459. package/dist/dnd/createDraggableCollection.d.ts.map +1 -1
  460. package/dist/dnd/createDraggableItem.d.ts +2 -7
  461. package/dist/dnd/createDraggableItem.d.ts.map +1 -1
  462. package/dist/dnd/createDrop.d.ts +1 -7
  463. package/dist/dnd/createDrop.d.ts.map +1 -1
  464. package/dist/dnd/createDropIndicator.d.ts +27 -0
  465. package/dist/dnd/createDropIndicator.d.ts.map +1 -0
  466. package/dist/dnd/createDroppableCollection.d.ts +6 -8
  467. package/dist/dnd/createDroppableCollection.d.ts.map +1 -1
  468. package/dist/dnd/createDroppableItem.d.ts +12 -10
  469. package/dist/dnd/createDroppableItem.d.ts.map +1 -1
  470. package/dist/dnd/index.d.ts +3 -1
  471. package/dist/dnd/index.d.ts.map +1 -1
  472. package/dist/dnd/index.js +2 -2
  473. package/dist/dnd/index.jsx +2 -2
  474. package/dist/dnd/intl/index.d.ts +6 -4
  475. package/dist/dnd/intl/index.d.ts.map +1 -1
  476. package/dist/dnd/types.d.ts +20 -1
  477. package/dist/dnd/types.d.ts.map +1 -1
  478. package/dist/dnd/utils.d.ts +4 -0
  479. package/dist/dnd/utils.d.ts.map +1 -1
  480. package/dist/focus/FocusScope.d.ts +9 -5
  481. package/dist/focus/FocusScope.d.ts.map +1 -1
  482. package/dist/focus/createAutoFocus.d.ts +3 -0
  483. package/dist/focus/createAutoFocus.d.ts.map +1 -1
  484. package/dist/focus/createFocusRestore.d.ts +3 -0
  485. package/dist/focus/createFocusRestore.d.ts.map +1 -1
  486. package/dist/focus/createHasTabbableChild.d.ts +13 -0
  487. package/dist/focus/createHasTabbableChild.d.ts.map +1 -0
  488. package/dist/focus/createVirtualFocus.d.ts +4 -1
  489. package/dist/focus/createVirtualFocus.d.ts.map +1 -1
  490. package/dist/focus/index.js +3 -2
  491. package/dist/focus/index.jsx +3 -2
  492. package/dist/focus/virtualFocus.d.ts +1 -1
  493. package/dist/form/createFormReset.d.ts +1 -7
  494. package/dist/form/createFormReset.d.ts.map +1 -1
  495. package/dist/form/createFormValidation.d.ts +13 -9
  496. package/dist/form/createFormValidation.d.ts.map +1 -1
  497. package/dist/form/index.js +1 -2
  498. package/dist/form/index.jsx +1 -2
  499. package/dist/grid/GridKeyboardDelegate.d.ts.map +1 -1
  500. package/dist/grid/createGrid.d.ts +40 -5
  501. package/dist/grid/createGrid.d.ts.map +1 -1
  502. package/dist/grid/createGridCell.d.ts +1 -5
  503. package/dist/grid/createGridCell.d.ts.map +1 -1
  504. package/dist/grid/createGridRow.d.ts +1 -5
  505. package/dist/grid/createGridRow.d.ts.map +1 -1
  506. package/dist/grid/index.d.ts +2 -2
  507. package/dist/grid/index.js +2 -1
  508. package/dist/grid/index.jsx +2 -1
  509. package/dist/grid/intl/index.d.ts +18 -0
  510. package/dist/grid/intl/index.d.ts.map +1 -0
  511. package/dist/grid/types.d.ts +25 -2
  512. package/dist/grid/types.d.ts.map +1 -1
  513. package/dist/gridlist/createGridList.d.ts +5 -7
  514. package/dist/gridlist/createGridList.d.ts.map +1 -1
  515. package/dist/gridlist/createGridListItem.d.ts +2 -6
  516. package/dist/gridlist/createGridListItem.d.ts.map +1 -1
  517. package/dist/gridlist/createGridListSection.d.ts +0 -4
  518. package/dist/gridlist/createGridListSection.d.ts.map +1 -1
  519. package/dist/gridlist/createGridListSelectionCheckbox.d.ts +1 -5
  520. package/dist/gridlist/createGridListSelectionCheckbox.d.ts.map +1 -1
  521. package/dist/gridlist/index.js +2 -1
  522. package/dist/gridlist/index.jsx +2 -1
  523. package/dist/gridlist/intl/index.d.ts +14 -0
  524. package/dist/gridlist/intl/index.d.ts.map +1 -0
  525. package/dist/gridlist/types.d.ts +87 -2
  526. package/dist/gridlist/types.d.ts.map +1 -1
  527. package/dist/i18n/compileIcu.d.ts +24 -0
  528. package/dist/i18n/compileIcu.d.ts.map +1 -0
  529. package/dist/i18n/createCollator.d.ts +0 -7
  530. package/dist/i18n/createCollator.d.ts.map +1 -1
  531. package/dist/i18n/createDateFormatter.d.ts +2 -8
  532. package/dist/i18n/createDateFormatter.d.ts.map +1 -1
  533. package/dist/i18n/createFilter.d.ts +0 -7
  534. package/dist/i18n/createFilter.d.ts.map +1 -1
  535. package/dist/i18n/createListFormatter.d.ts +9 -0
  536. package/dist/i18n/createListFormatter.d.ts.map +1 -0
  537. package/dist/i18n/createNumberFormatter.d.ts +0 -7
  538. package/dist/i18n/createNumberFormatter.d.ts.map +1 -1
  539. package/dist/i18n/createStringFormatter.d.ts +14 -4
  540. package/dist/i18n/createStringFormatter.d.ts.map +1 -1
  541. package/dist/i18n/index.d.ts +1 -0
  542. package/dist/i18n/index.d.ts.map +1 -1
  543. package/dist/i18n/index.js +2 -2
  544. package/dist/i18n/index.jsx +2 -2
  545. package/dist/i18n/locale.d.ts +2 -8
  546. package/dist/i18n/locale.d.ts.map +1 -1
  547. package/dist/i18n/utils.d.ts +0 -7
  548. package/dist/i18n/utils.d.ts.map +1 -1
  549. package/dist/index.d.ts +12 -9
  550. package/dist/index.d.ts.map +1 -1
  551. package/dist/index.js +39 -27
  552. package/dist/index.jsx +39 -27
  553. package/dist/interactions/FocusableProvider.d.ts +3 -2
  554. package/dist/interactions/FocusableProvider.d.ts.map +1 -1
  555. package/dist/interactions/PressEvent.d.ts +2 -1
  556. package/dist/interactions/PressEvent.d.ts.map +1 -1
  557. package/dist/interactions/createContextMenu.d.ts +24 -0
  558. package/dist/interactions/createContextMenu.d.ts.map +1 -0
  559. package/dist/interactions/createFocus.d.ts +12 -4
  560. package/dist/interactions/createFocus.d.ts.map +1 -1
  561. package/dist/interactions/createFocusRing.d.ts +12 -3
  562. package/dist/interactions/createFocusRing.d.ts.map +1 -1
  563. package/dist/interactions/createFocusWithin.d.ts +12 -8
  564. package/dist/interactions/createFocusWithin.d.ts.map +1 -1
  565. package/dist/interactions/createFocusable.d.ts +2 -6
  566. package/dist/interactions/createFocusable.d.ts.map +1 -1
  567. package/dist/interactions/createHover.d.ts +3 -10
  568. package/dist/interactions/createHover.d.ts.map +1 -1
  569. package/dist/interactions/createInteractionModality.d.ts +12 -10
  570. package/dist/interactions/createInteractionModality.d.ts.map +1 -1
  571. package/dist/interactions/createKeyboard.d.ts +12 -3
  572. package/dist/interactions/createKeyboard.d.ts.map +1 -1
  573. package/dist/interactions/createKeyboardShortcutHandler.d.ts +24 -0
  574. package/dist/interactions/createKeyboardShortcutHandler.d.ts.map +1 -0
  575. package/dist/interactions/createLongPress.d.ts +4 -7
  576. package/dist/interactions/createLongPress.d.ts.map +1 -1
  577. package/dist/interactions/createMove.d.ts +1 -6
  578. package/dist/interactions/createMove.d.ts.map +1 -1
  579. package/dist/interactions/createPress.d.ts +3 -7
  580. package/dist/interactions/createPress.d.ts.map +1 -1
  581. package/dist/interactions/index.d.ts +1 -1
  582. package/dist/interactions/index.d.ts.map +1 -1
  583. package/dist/interactions/index.js +5 -3
  584. package/dist/interactions/index.jsx +5 -3
  585. package/dist/label/createField.d.ts +7 -1
  586. package/dist/label/createField.d.ts.map +1 -1
  587. package/dist/label/createLabel.d.ts +1 -1
  588. package/dist/label/createLabel.d.ts.map +1 -1
  589. package/dist/label/createLabels.d.ts +0 -7
  590. package/dist/label/createLabels.d.ts.map +1 -1
  591. package/dist/landmark/createLandmark.d.ts +63 -6
  592. package/dist/landmark/createLandmark.d.ts.map +1 -1
  593. package/dist/link/createLink.d.ts +1 -1
  594. package/dist/link/createLink.d.ts.map +1 -1
  595. package/dist/listbox/createListBox.d.ts +27 -7
  596. package/dist/listbox/createListBox.d.ts.map +1 -1
  597. package/dist/listbox/createOption.d.ts +7 -1
  598. package/dist/listbox/createOption.d.ts.map +1 -1
  599. package/dist/live-announcer/announce.d.ts +7 -16
  600. package/dist/live-announcer/announce.d.ts.map +1 -1
  601. package/dist/menu/createMenu.d.ts +3 -7
  602. package/dist/menu/createMenu.d.ts.map +1 -1
  603. package/dist/menu/createMenuItem.d.ts +7 -2
  604. package/dist/menu/createMenuItem.d.ts.map +1 -1
  605. package/dist/menu/createMenuTrigger.d.ts +24 -20
  606. package/dist/menu/createMenuTrigger.d.ts.map +1 -1
  607. package/dist/menu/index.d.ts +1 -1
  608. package/dist/menu/index.d.ts.map +1 -1
  609. package/dist/menu/intl/index.d.ts +4 -0
  610. package/dist/menu/intl/index.d.ts.map +1 -0
  611. package/dist/meter/createMeter.d.ts +2 -1
  612. package/dist/meter/createMeter.d.ts.map +1 -1
  613. package/dist/numberfield/createNumberField.d.ts +44 -6
  614. package/dist/numberfield/createNumberField.d.ts.map +1 -1
  615. package/dist/numberfield/index.d.ts +1 -0
  616. package/dist/numberfield/index.d.ts.map +1 -1
  617. package/dist/numberfield/index.js +2 -2
  618. package/dist/numberfield/index.jsx +2 -2
  619. package/dist/numberfield/intl.d.ts +10 -0
  620. package/dist/numberfield/intl.d.ts.map +1 -0
  621. package/dist/overlays/ariaHideOutside.d.ts +0 -4
  622. package/dist/overlays/ariaHideOutside.d.ts.map +1 -1
  623. package/dist/overlays/createCloseOnScroll.d.ts +11 -0
  624. package/dist/overlays/createCloseOnScroll.d.ts.map +1 -0
  625. package/dist/overlays/createInteractOutside.d.ts +2 -5
  626. package/dist/overlays/createInteractOutside.d.ts.map +1 -1
  627. package/dist/overlays/createModal.d.ts +3 -6
  628. package/dist/overlays/createModal.d.ts.map +1 -1
  629. package/dist/overlays/createOverlay.d.ts +1 -5
  630. package/dist/overlays/createOverlay.d.ts.map +1 -1
  631. package/dist/overlays/createOverlayTrigger.d.ts +2 -6
  632. package/dist/overlays/createOverlayTrigger.d.ts.map +1 -1
  633. package/dist/overlays/createPreventScroll.d.ts +0 -4
  634. package/dist/overlays/createPreventScroll.d.ts.map +1 -1
  635. package/dist/overlays/index.d.ts +2 -0
  636. package/dist/overlays/index.d.ts.map +1 -1
  637. package/dist/overlays/index.js +4 -3
  638. package/dist/overlays/index.jsx +4 -3
  639. package/dist/overlays/intl/index.d.ts +13 -0
  640. package/dist/overlays/intl/index.d.ts.map +1 -0
  641. package/dist/popover/calculatePosition.d.ts +1 -1
  642. package/dist/popover/calculatePosition.d.ts.map +1 -1
  643. package/dist/popover/createOverlayPosition.d.ts +1 -7
  644. package/dist/popover/createOverlayPosition.d.ts.map +1 -1
  645. package/dist/popover/createPopover.d.ts +8 -8
  646. package/dist/popover/createPopover.d.ts.map +1 -1
  647. package/dist/progress/createProgressBar.d.ts +2 -10
  648. package/dist/progress/createProgressBar.d.ts.map +1 -1
  649. package/dist/radio/createRadio.d.ts +8 -1
  650. package/dist/radio/createRadio.d.ts.map +1 -1
  651. package/dist/radio/createRadioGroup.d.ts +1 -11
  652. package/dist/radio/createRadioGroup.d.ts.map +1 -1
  653. package/dist/searchfield/createSearchField.d.ts +1 -1
  654. package/dist/searchfield/createSearchField.d.ts.map +1 -1
  655. package/dist/searchfield/intl/index.d.ts +13 -0
  656. package/dist/searchfield/intl/index.d.ts.map +1 -0
  657. package/dist/select/createHiddenSelect.d.ts +7 -14
  658. package/dist/select/createHiddenSelect.d.ts.map +1 -1
  659. package/dist/select/createSelect.d.ts +13 -9
  660. package/dist/select/createSelect.d.ts.map +1 -1
  661. package/dist/selection/DOMLayoutDelegate.d.ts.map +1 -1
  662. package/dist/selection/ListKeyboardDelegate.d.ts +4 -2
  663. package/dist/selection/ListKeyboardDelegate.d.ts.map +1 -1
  664. package/dist/selection/constants.d.ts.map +1 -1
  665. package/dist/selection/createCollectionRowInteraction.d.ts +12 -1
  666. package/dist/selection/createCollectionRowInteraction.d.ts.map +1 -1
  667. package/dist/selection/createScrollIntoViewOnFocus.d.ts +0 -11
  668. package/dist/selection/createScrollIntoViewOnFocus.d.ts.map +1 -1
  669. package/dist/selection/createSelectableCollection.d.ts +1 -23
  670. package/dist/selection/createSelectableCollection.d.ts.map +1 -1
  671. package/dist/selection/createSelectableItem.d.ts +3 -29
  672. package/dist/selection/createSelectableItem.d.ts.map +1 -1
  673. package/dist/selection/createSelectableList.d.ts +7 -18
  674. package/dist/selection/createSelectableList.d.ts.map +1 -1
  675. package/dist/selection/createTypeSelect.d.ts +7 -8
  676. package/dist/selection/createTypeSelect.d.ts.map +1 -1
  677. package/dist/selection/index.js +6 -2
  678. package/dist/selection/index.jsx +6 -2
  679. package/dist/selection/selectItem.d.ts.map +1 -1
  680. package/dist/selection/utils.d.ts +1 -1
  681. package/dist/selection/utils.d.ts.map +1 -1
  682. package/dist/separator/createSeparator.d.ts +3 -1
  683. package/dist/separator/createSeparator.d.ts.map +1 -1
  684. package/dist/slider/createSlider.d.ts +25 -14
  685. package/dist/slider/createSlider.d.ts.map +1 -1
  686. package/dist/slider/createSliderThumb.d.ts +12 -0
  687. package/dist/slider/createSliderThumb.d.ts.map +1 -0
  688. package/dist/slider/index.d.ts +1 -0
  689. package/dist/slider/index.d.ts.map +1 -1
  690. package/dist/slider/index.js +2 -2
  691. package/dist/slider/index.jsx +2 -2
  692. package/dist/spinbutton/createSpinButton.d.ts +0 -9
  693. package/dist/spinbutton/createSpinButton.d.ts.map +1 -1
  694. package/dist/spinbutton/intl.d.ts.map +1 -1
  695. package/dist/ssr/index.d.ts +3 -28
  696. package/dist/ssr/index.d.ts.map +1 -1
  697. package/dist/ssr/index.js +52 -26
  698. package/dist/ssr/index.js.map +1 -1
  699. package/dist/ssr/index.jsx +52 -26
  700. package/dist/ssr/index.jsx.map +1 -1
  701. package/dist/steplist/createStepList.d.ts +19 -7
  702. package/dist/steplist/createStepList.d.ts.map +1 -1
  703. package/dist/steplist/index.d.ts +1 -1
  704. package/dist/steplist/index.d.ts.map +1 -1
  705. package/dist/steplist/index.js +2 -2
  706. package/dist/steplist/index.jsx +2 -2
  707. package/dist/steplist/intl/index.d.ts +12 -0
  708. package/dist/steplist/intl/index.d.ts.map +1 -0
  709. package/dist/switch/createSwitch.d.ts +2 -1
  710. package/dist/switch/createSwitch.d.ts.map +1 -1
  711. package/dist/table/createTable.d.ts +1 -5
  712. package/dist/table/createTable.d.ts.map +1 -1
  713. package/dist/table/createTableCell.d.ts +1 -5
  714. package/dist/table/createTableCell.d.ts.map +1 -1
  715. package/dist/table/createTableColumnHeader.d.ts +1 -5
  716. package/dist/table/createTableColumnHeader.d.ts.map +1 -1
  717. package/dist/table/createTableColumnResize.d.ts +16 -10
  718. package/dist/table/createTableColumnResize.d.ts.map +1 -1
  719. package/dist/table/createTableHeaderRow.d.ts +2 -6
  720. package/dist/table/createTableHeaderRow.d.ts.map +1 -1
  721. package/dist/table/createTableRow.d.ts +1 -5
  722. package/dist/table/createTableRow.d.ts.map +1 -1
  723. package/dist/table/createTableRowGroup.d.ts +1 -5
  724. package/dist/table/createTableRowGroup.d.ts.map +1 -1
  725. package/dist/table/createTableSelectAllCheckbox.d.ts +1 -5
  726. package/dist/table/createTableSelectAllCheckbox.d.ts.map +1 -1
  727. package/dist/table/createTableSelectionCheckbox.d.ts +1 -5
  728. package/dist/table/createTableSelectionCheckbox.d.ts.map +1 -1
  729. package/dist/table/index.d.ts +2 -2
  730. package/dist/table/intl/index.d.ts +23 -0
  731. package/dist/table/intl/index.d.ts.map +1 -0
  732. package/dist/table/types.d.ts +44 -2
  733. package/dist/table/types.d.ts.map +1 -1
  734. package/dist/table/utils.d.ts +6 -0
  735. package/dist/table/utils.d.ts.map +1 -1
  736. package/dist/tabs/createTabs.d.ts +14 -9
  737. package/dist/tabs/createTabs.d.ts.map +1 -1
  738. package/dist/tag/createTag.d.ts +4 -8
  739. package/dist/tag/createTag.d.ts.map +1 -1
  740. package/dist/tag/createTagGroup.d.ts +12 -13
  741. package/dist/tag/createTagGroup.d.ts.map +1 -1
  742. package/dist/tag/intl/index.d.ts +14 -0
  743. package/dist/tag/intl/index.d.ts.map +1 -0
  744. package/dist/textfield/createTextField.d.ts +16 -8
  745. package/dist/textfield/createTextField.d.ts.map +1 -1
  746. package/dist/toast/createToast.d.ts +3 -9
  747. package/dist/toast/createToast.d.ts.map +1 -1
  748. package/dist/toast/createToastRegion.d.ts +9 -19
  749. package/dist/toast/createToastRegion.d.ts.map +1 -1
  750. package/dist/toast/intl/index.d.ts +14 -0
  751. package/dist/toast/intl/index.d.ts.map +1 -0
  752. package/dist/toggle/createToggle.d.ts +13 -2
  753. package/dist/toggle/createToggle.d.ts.map +1 -1
  754. package/dist/tokenfield/createToken.d.ts +15 -0
  755. package/dist/tokenfield/createToken.d.ts.map +1 -0
  756. package/dist/tokenfield/createTokenField.d.ts +52 -0
  757. package/dist/tokenfield/createTokenField.d.ts.map +1 -0
  758. package/dist/tokenfield/index.d.ts +3 -0
  759. package/dist/tokenfield/index.d.ts.map +1 -0
  760. package/dist/tokenfield/index.js +2 -0
  761. package/dist/tokenfield/index.jsx +2 -0
  762. package/dist/toolbar/createToolbar.d.ts +1 -1
  763. package/dist/toolbar/createToolbar.d.ts.map +1 -1
  764. package/dist/tooltip/createPreviewTrigger.d.ts +23 -0
  765. package/dist/tooltip/createPreviewTrigger.d.ts.map +1 -0
  766. package/dist/tooltip/createSafeArea.d.ts +20 -0
  767. package/dist/tooltip/createSafeArea.d.ts.map +1 -0
  768. package/dist/tooltip/createTooltip.d.ts +1 -1
  769. package/dist/tooltip/createTooltip.d.ts.map +1 -1
  770. package/dist/tooltip/createTooltipTrigger.d.ts +1 -9
  771. package/dist/tooltip/createTooltipTrigger.d.ts.map +1 -1
  772. package/dist/tooltip/index.d.ts +2 -0
  773. package/dist/tooltip/index.d.ts.map +1 -1
  774. package/dist/tooltip/index.js +2 -2
  775. package/dist/tooltip/index.jsx +2 -2
  776. package/dist/tooltip/intl/index.d.ts +4 -0
  777. package/dist/tooltip/intl/index.d.ts.map +1 -0
  778. package/dist/tree/createTree.d.ts +1 -5
  779. package/dist/tree/createTree.d.ts.map +1 -1
  780. package/dist/tree/createTreeItem.d.ts +1 -5
  781. package/dist/tree/createTreeItem.d.ts.map +1 -1
  782. package/dist/tree/createTreeSelectionCheckbox.d.ts +1 -5
  783. package/dist/tree/createTreeSelectionCheckbox.d.ts.map +1 -1
  784. package/dist/tree/intl/index.d.ts +14 -0
  785. package/dist/tree/intl/index.d.ts.map +1 -0
  786. package/dist/tree/types.d.ts +37 -3
  787. package/dist/tree/types.d.ts.map +1 -1
  788. package/dist/utils/ShadowTreeWalker.d.ts +30 -0
  789. package/dist/utils/ShadowTreeWalker.d.ts.map +1 -0
  790. package/dist/utils/animation.d.ts +1 -29
  791. package/dist/utils/animation.d.ts.map +1 -1
  792. package/dist/utils/callEventHandler.d.ts +7 -0
  793. package/dist/utils/callEventHandler.d.ts.map +1 -0
  794. package/dist/utils/capture.d.ts +14 -0
  795. package/dist/utils/capture.d.ts.map +1 -0
  796. package/dist/utils/createDescription.d.ts +1 -25
  797. package/dist/utils/createDescription.d.ts.map +1 -1
  798. package/dist/utils/dom.d.ts +58 -11
  799. package/dist/utils/dom.d.ts.map +1 -1
  800. package/dist/utils/domAttrs.d.ts +16 -0
  801. package/dist/utils/domAttrs.d.ts.map +1 -0
  802. package/dist/utils/env.d.ts +30 -2
  803. package/dist/utils/env.d.ts.map +1 -1
  804. package/dist/utils/events.d.ts +0 -4
  805. package/dist/utils/events.d.ts.map +1 -1
  806. package/dist/utils/filterDOMProps.d.ts +0 -6
  807. package/dist/utils/filterDOMProps.d.ts.map +1 -1
  808. package/dist/utils/focus.d.ts +14 -10
  809. package/dist/utils/focus.d.ts.map +1 -1
  810. package/dist/utils/focusWithoutScrolling.d.ts +10 -0
  811. package/dist/utils/focusWithoutScrolling.d.ts.map +1 -0
  812. package/dist/utils/geometry.d.ts +1 -1
  813. package/dist/utils/geometry.d.ts.map +1 -1
  814. package/dist/utils/getMetaValue.d.ts +13 -0
  815. package/dist/utils/getMetaValue.d.ts.map +1 -0
  816. package/dist/utils/getNonce.d.ts +9 -0
  817. package/dist/utils/getNonce.d.ts.map +1 -0
  818. package/dist/utils/globalListeners.d.ts +0 -6
  819. package/dist/utils/globalListeners.d.ts.map +1 -1
  820. package/dist/utils/index.d.ts +10 -3
  821. package/dist/utils/index.d.ts.map +1 -1
  822. package/dist/utils/index.js +9 -4
  823. package/dist/utils/index.jsx +9 -4
  824. package/dist/utils/keyboard.d.ts +0 -4
  825. package/dist/utils/keyboard.d.ts.map +1 -1
  826. package/dist/utils/mergeProps.d.ts +5 -2
  827. package/dist/utils/mergeProps.d.ts.map +1 -1
  828. package/dist/utils/openLink.d.ts +52 -0
  829. package/dist/utils/openLink.d.ts.map +1 -0
  830. package/dist/utils/owner.d.ts +14 -0
  831. package/dist/utils/owner.d.ts.map +1 -0
  832. package/dist/utils/platform.d.ts +10 -13
  833. package/dist/utils/platform.d.ts.map +1 -1
  834. package/dist/utils/reactivity.d.ts +2 -0
  835. package/dist/utils/reactivity.d.ts.map +1 -1
  836. package/dist/utils/refs.d.ts +20 -0
  837. package/dist/utils/refs.d.ts.map +1 -0
  838. package/dist/utils/runAfterTransition.d.ts +2 -0
  839. package/dist/utils/runAfterTransition.d.ts.map +1 -0
  840. package/dist/utils/scrollIntoView.d.ts +0 -4
  841. package/dist/utils/scrollIntoView.d.ts.map +1 -1
  842. package/dist/utils/splitProps.d.ts +17 -0
  843. package/dist/utils/splitProps.d.ts.map +1 -0
  844. package/dist/utils/textSelection.d.ts +5 -12
  845. package/dist/utils/textSelection.d.ts.map +1 -1
  846. package/dist/virtualizer/ScrollView.d.ts +38 -0
  847. package/dist/virtualizer/ScrollView.d.ts.map +1 -0
  848. package/dist/virtualizer/index.d.ts +3 -0
  849. package/dist/virtualizer/index.d.ts.map +1 -0
  850. package/dist/virtualizer/index.js +2 -0
  851. package/dist/virtualizer/index.jsx +2 -0
  852. package/dist/virtualizer/utils.d.ts +10 -0
  853. package/dist/virtualizer/utils.d.ts.map +1 -0
  854. package/dist/visually-hidden/createVisuallyHidden.d.ts +2 -9
  855. package/dist/visually-hidden/createVisuallyHidden.d.ts.map +1 -1
  856. package/dist/visually-hidden/index.js +1 -1
  857. package/dist/visually-hidden/index.jsx +1 -1
  858. package/package.json +28 -11
  859. package/src/actiongroup/createActionGroup.ts +56 -31
  860. package/src/autocomplete/createAutocomplete.ts +91 -20
  861. package/src/autocomplete/intl/ar-AE.json +3 -0
  862. package/src/autocomplete/intl/bg-BG.json +3 -0
  863. package/src/autocomplete/intl/cs-CZ.json +3 -0
  864. package/src/autocomplete/intl/da-DK.json +3 -0
  865. package/src/autocomplete/intl/de-DE.json +3 -0
  866. package/src/autocomplete/intl/el-GR.json +3 -0
  867. package/src/autocomplete/intl/en-US.json +3 -0
  868. package/src/autocomplete/intl/es-ES.json +3 -0
  869. package/src/autocomplete/intl/et-EE.json +3 -0
  870. package/src/autocomplete/intl/fi-FI.json +3 -0
  871. package/src/autocomplete/intl/fr-FR.json +3 -0
  872. package/src/autocomplete/intl/he-IL.json +3 -0
  873. package/src/autocomplete/intl/hr-HR.json +3 -0
  874. package/src/autocomplete/intl/hu-HU.json +3 -0
  875. package/src/autocomplete/intl/index.ts +122 -0
  876. package/src/autocomplete/intl/it-IT.json +3 -0
  877. package/src/autocomplete/intl/ja-JP.json +3 -0
  878. package/src/autocomplete/intl/ko-KR.json +3 -0
  879. package/src/autocomplete/intl/lt-LT.json +3 -0
  880. package/src/autocomplete/intl/lv-LV.json +3 -0
  881. package/src/autocomplete/intl/nb-NO.json +3 -0
  882. package/src/autocomplete/intl/nl-NL.json +3 -0
  883. package/src/autocomplete/intl/pl-PL.json +3 -0
  884. package/src/autocomplete/intl/pt-BR.json +3 -0
  885. package/src/autocomplete/intl/pt-PT.json +3 -0
  886. package/src/autocomplete/intl/ro-RO.json +3 -0
  887. package/src/autocomplete/intl/ru-RU.json +3 -0
  888. package/src/autocomplete/intl/sk-SK.json +3 -0
  889. package/src/autocomplete/intl/sl-SI.json +3 -0
  890. package/src/autocomplete/intl/sr-SP.json +3 -0
  891. package/src/autocomplete/intl/sv-SE.json +3 -0
  892. package/src/autocomplete/intl/tr-TR.json +3 -0
  893. package/src/autocomplete/intl/uk-UA.json +3 -0
  894. package/src/autocomplete/intl/zh-CN.json +3 -0
  895. package/src/autocomplete/intl/zh-TW.json +3 -0
  896. package/src/breadcrumbs/createBreadcrumbs.ts +47 -12
  897. package/src/breadcrumbs/intl/ar-AE.json +3 -0
  898. package/src/breadcrumbs/intl/bg-BG.json +3 -0
  899. package/src/breadcrumbs/intl/cs-CZ.json +3 -0
  900. package/src/breadcrumbs/intl/da-DK.json +3 -0
  901. package/src/breadcrumbs/intl/de-DE.json +3 -0
  902. package/src/breadcrumbs/intl/el-GR.json +3 -0
  903. package/src/breadcrumbs/intl/en-US.json +3 -0
  904. package/src/breadcrumbs/intl/es-ES.json +3 -0
  905. package/src/breadcrumbs/intl/et-EE.json +3 -0
  906. package/src/breadcrumbs/intl/fi-FI.json +3 -0
  907. package/src/breadcrumbs/intl/fr-FR.json +3 -0
  908. package/src/breadcrumbs/intl/he-IL.json +3 -0
  909. package/src/breadcrumbs/intl/hr-HR.json +3 -0
  910. package/src/breadcrumbs/intl/hu-HU.json +3 -0
  911. package/src/breadcrumbs/intl/index.ts +122 -0
  912. package/src/breadcrumbs/intl/it-IT.json +3 -0
  913. package/src/breadcrumbs/intl/ja-JP.json +3 -0
  914. package/src/breadcrumbs/intl/ko-KR.json +3 -0
  915. package/src/breadcrumbs/intl/lt-LT.json +3 -0
  916. package/src/breadcrumbs/intl/lv-LV.json +3 -0
  917. package/src/breadcrumbs/intl/nb-NO.json +3 -0
  918. package/src/breadcrumbs/intl/nl-NL.json +3 -0
  919. package/src/breadcrumbs/intl/pl-PL.json +3 -0
  920. package/src/breadcrumbs/intl/pt-BR.json +3 -0
  921. package/src/breadcrumbs/intl/pt-PT.json +3 -0
  922. package/src/breadcrumbs/intl/ro-RO.json +3 -0
  923. package/src/breadcrumbs/intl/ru-RU.json +3 -0
  924. package/src/breadcrumbs/intl/sk-SK.json +3 -0
  925. package/src/breadcrumbs/intl/sl-SI.json +3 -0
  926. package/src/breadcrumbs/intl/sr-SP.json +3 -0
  927. package/src/breadcrumbs/intl/sv-SE.json +3 -0
  928. package/src/breadcrumbs/intl/tr-TR.json +3 -0
  929. package/src/breadcrumbs/intl/uk-UA.json +3 -0
  930. package/src/breadcrumbs/intl/zh-CN.json +3 -0
  931. package/src/breadcrumbs/intl/zh-TW.json +3 -0
  932. package/src/button/createButton.ts +22 -3
  933. package/src/button/createToggleButton.ts +27 -15
  934. package/src/button/createToggleButtonGroup.ts +23 -8
  935. package/src/button/types.ts +16 -0
  936. package/src/calendar/createCalendar.ts +121 -28
  937. package/src/calendar/createCalendarCell.ts +111 -31
  938. package/src/calendar/createCalendarGrid.ts +70 -18
  939. package/src/calendar/createCalendarMonthPicker.ts +14 -0
  940. package/src/calendar/createCalendarYearPicker.ts +18 -2
  941. package/src/calendar/createRangeCalendar.ts +209 -19
  942. package/src/calendar/createRangeCalendarCell.ts +343 -51
  943. package/src/calendar/intl/index.ts +37 -0
  944. package/src/calendar/utils.ts +175 -62
  945. package/src/checkbox/createCheckbox.ts +46 -35
  946. package/src/checkbox/createCheckboxGroup.ts +76 -20
  947. package/src/checkbox/createCheckboxGroupItem.ts +82 -6
  948. package/src/collections/index.ts +37 -18
  949. package/src/color/createColorArea.ts +271 -40
  950. package/src/color/createColorField.ts +264 -34
  951. package/src/color/createColorSlider.ts +38 -4
  952. package/src/color/createColorSwatch.ts +18 -1
  953. package/src/color/createColorWheel.ts +103 -13
  954. package/src/color/intl/index.ts +35 -0
  955. package/src/color/types.ts +49 -1
  956. package/src/combobox/createComboBox.ts +343 -196
  957. package/src/combobox/intl/generated-locales.ts +38 -1
  958. package/src/combobox/intl/index.ts +38 -2
  959. package/src/datepicker/createDateField.ts +51 -38
  960. package/src/datepicker/createDatePicker.ts +46 -4
  961. package/src/datepicker/createDatePickerGroup.ts +24 -13
  962. package/src/datepicker/createDateRangePicker.ts +57 -5
  963. package/src/datepicker/createDateSegment.ts +93 -24
  964. package/src/datepicker/createDisplayNames.ts +16 -1
  965. package/src/datepicker/createTimeField.ts +14 -0
  966. package/src/datepicker/intl.ts +36 -0
  967. package/src/dialog/createDialog.ts +57 -30
  968. package/src/dialog/types.ts +14 -0
  969. package/src/disclosure/createDisclosure.ts +36 -10
  970. package/src/disclosure/createDisclosureGroup.ts +3 -4
  971. package/src/dnd/DragManager.ts +72 -11
  972. package/src/dnd/DropTargetKeyboardNavigation.ts +2 -2
  973. package/src/dnd/createDrag.ts +18 -1
  974. package/src/dnd/createDraggableCollection.ts +96 -32
  975. package/src/dnd/createDraggableItem.ts +150 -72
  976. package/src/dnd/createDrop.ts +71 -4
  977. package/src/dnd/createDropIndicator.ts +182 -0
  978. package/src/dnd/createDroppableCollection.ts +106 -40
  979. package/src/dnd/createDroppableItem.ts +193 -13
  980. package/src/dnd/index.ts +3 -0
  981. package/src/dnd/intl/index.ts +77 -66
  982. package/src/dnd/types.ts +20 -1
  983. package/src/dnd/utils.ts +19 -0
  984. package/src/focus/FocusScope.tsx +704 -156
  985. package/src/focus/createAutoFocus.ts +120 -69
  986. package/src/focus/createFocusRestore.ts +16 -12
  987. package/src/focus/createHasTabbableChild.ts +78 -0
  988. package/src/focus/createVirtualFocus.ts +21 -5
  989. package/src/focus/virtualFocus.ts +1 -1
  990. package/src/form/createFormReset.ts +40 -17
  991. package/src/form/createFormValidation.ts +158 -88
  992. package/src/grid/GridKeyboardDelegate.ts +14 -0
  993. package/src/grid/createGrid.ts +264 -5
  994. package/src/grid/createGridCell.ts +26 -5
  995. package/src/grid/createGridRow.ts +17 -2
  996. package/src/grid/index.ts +2 -2
  997. package/src/grid/intl/ar-AE.json +8 -0
  998. package/src/grid/intl/bg-BG.json +8 -0
  999. package/src/grid/intl/cs-CZ.json +8 -0
  1000. package/src/grid/intl/da-DK.json +8 -0
  1001. package/src/grid/intl/de-DE.json +8 -0
  1002. package/src/grid/intl/el-GR.json +8 -0
  1003. package/src/grid/intl/en-US.json +8 -0
  1004. package/src/grid/intl/es-ES.json +8 -0
  1005. package/src/grid/intl/et-EE.json +8 -0
  1006. package/src/grid/intl/fi-FI.json +8 -0
  1007. package/src/grid/intl/fr-FR.json +8 -0
  1008. package/src/grid/intl/he-IL.json +8 -0
  1009. package/src/grid/intl/hr-HR.json +8 -0
  1010. package/src/grid/intl/hu-HU.json +8 -0
  1011. package/src/grid/intl/index.ts +127 -0
  1012. package/src/grid/intl/it-IT.json +8 -0
  1013. package/src/grid/intl/ja-JP.json +8 -0
  1014. package/src/grid/intl/ko-KR.json +8 -0
  1015. package/src/grid/intl/lt-LT.json +8 -0
  1016. package/src/grid/intl/lv-LV.json +8 -0
  1017. package/src/grid/intl/nb-NO.json +8 -0
  1018. package/src/grid/intl/nl-NL.json +8 -0
  1019. package/src/grid/intl/pl-PL.json +8 -0
  1020. package/src/grid/intl/pt-BR.json +8 -0
  1021. package/src/grid/intl/pt-PT.json +8 -0
  1022. package/src/grid/intl/ro-RO.json +8 -0
  1023. package/src/grid/intl/ru-RU.json +8 -0
  1024. package/src/grid/intl/sk-SK.json +8 -0
  1025. package/src/grid/intl/sl-SI.json +8 -0
  1026. package/src/grid/intl/sr-SP.json +8 -0
  1027. package/src/grid/intl/sv-SE.json +8 -0
  1028. package/src/grid/intl/tr-TR.json +8 -0
  1029. package/src/grid/intl/uk-UA.json +8 -0
  1030. package/src/grid/intl/zh-CN.json +8 -0
  1031. package/src/grid/intl/zh-TW.json +8 -0
  1032. package/src/grid/types.ts +25 -2
  1033. package/src/gridlist/createGridList.ts +252 -47
  1034. package/src/gridlist/createGridListItem.ts +90 -20
  1035. package/src/gridlist/createGridListSection.ts +14 -0
  1036. package/src/gridlist/createGridListSelectionCheckbox.ts +31 -4
  1037. package/src/gridlist/intl/ar-AE.json +4 -0
  1038. package/src/gridlist/intl/bg-BG.json +4 -0
  1039. package/src/gridlist/intl/cs-CZ.json +4 -0
  1040. package/src/gridlist/intl/da-DK.json +4 -0
  1041. package/src/gridlist/intl/de-DE.json +4 -0
  1042. package/src/gridlist/intl/el-GR.json +4 -0
  1043. package/src/gridlist/intl/en-US.json +4 -0
  1044. package/src/gridlist/intl/es-ES.json +4 -0
  1045. package/src/gridlist/intl/et-EE.json +4 -0
  1046. package/src/gridlist/intl/fi-FI.json +4 -0
  1047. package/src/gridlist/intl/fr-FR.json +4 -0
  1048. package/src/gridlist/intl/he-IL.json +4 -0
  1049. package/src/gridlist/intl/hr-HR.json +4 -0
  1050. package/src/gridlist/intl/hu-HU.json +4 -0
  1051. package/src/gridlist/intl/index.ts +123 -0
  1052. package/src/gridlist/intl/it-IT.json +4 -0
  1053. package/src/gridlist/intl/ja-JP.json +4 -0
  1054. package/src/gridlist/intl/ko-KR.json +4 -0
  1055. package/src/gridlist/intl/lt-LT.json +4 -0
  1056. package/src/gridlist/intl/lv-LV.json +4 -0
  1057. package/src/gridlist/intl/nb-NO.json +4 -0
  1058. package/src/gridlist/intl/nl-NL.json +4 -0
  1059. package/src/gridlist/intl/pl-PL.json +4 -0
  1060. package/src/gridlist/intl/pt-BR.json +4 -0
  1061. package/src/gridlist/intl/pt-PT.json +4 -0
  1062. package/src/gridlist/intl/ro-RO.json +4 -0
  1063. package/src/gridlist/intl/ru-RU.json +4 -0
  1064. package/src/gridlist/intl/sk-SK.json +4 -0
  1065. package/src/gridlist/intl/sl-SI.json +4 -0
  1066. package/src/gridlist/intl/sr-SP.json +4 -0
  1067. package/src/gridlist/intl/sv-SE.json +4 -0
  1068. package/src/gridlist/intl/tr-TR.json +4 -0
  1069. package/src/gridlist/intl/uk-UA.json +4 -0
  1070. package/src/gridlist/intl/zh-CN.json +4 -0
  1071. package/src/gridlist/intl/zh-TW.json +4 -0
  1072. package/src/gridlist/types.ts +86 -2
  1073. package/src/i18n/compileIcu.ts +440 -0
  1074. package/src/i18n/createCollator.ts +14 -0
  1075. package/src/i18n/createDateFormatter.ts +17 -2
  1076. package/src/i18n/createFilter.ts +14 -0
  1077. package/src/i18n/createListFormatter.ts +38 -0
  1078. package/src/i18n/createNumberFormatter.ts +14 -0
  1079. package/src/i18n/createStringFormatter.ts +64 -8
  1080. package/src/i18n/index.ts +3 -0
  1081. package/src/i18n/locale.tsx +77 -20
  1082. package/src/i18n/utils.ts +14 -0
  1083. package/src/index.ts +81 -3
  1084. package/src/interactions/FocusableProvider.tsx +28 -11
  1085. package/src/interactions/PressEvent.ts +16 -1
  1086. package/src/interactions/createContextMenu.ts +108 -0
  1087. package/src/interactions/createFocus.ts +35 -8
  1088. package/src/interactions/createFocusRing.ts +39 -18
  1089. package/src/interactions/createFocusWithin.ts +61 -10
  1090. package/src/interactions/createFocusable.ts +67 -31
  1091. package/src/interactions/createHover.ts +98 -94
  1092. package/src/interactions/createInteractionModality.ts +135 -45
  1093. package/src/interactions/createKeyboard.ts +85 -9
  1094. package/src/interactions/createKeyboardShortcutHandler.ts +157 -0
  1095. package/src/interactions/createLongPress.ts +74 -22
  1096. package/src/interactions/createMove.ts +24 -3
  1097. package/src/interactions/createPress.ts +109 -74
  1098. package/src/interactions/index.ts +1 -0
  1099. package/src/label/createField.ts +58 -63
  1100. package/src/label/createLabel.ts +21 -4
  1101. package/src/label/createLabels.ts +17 -0
  1102. package/src/landmark/createLandmark.ts +491 -167
  1103. package/src/link/createLink.ts +48 -41
  1104. package/src/listbox/createListBox.ts +114 -310
  1105. package/src/listbox/createOption.ts +50 -14
  1106. package/src/live-announcer/announce.ts +27 -10
  1107. package/src/menu/createMenu.ts +123 -315
  1108. package/src/menu/createMenuItem.ts +84 -60
  1109. package/src/menu/createMenuTrigger.ts +179 -51
  1110. package/src/menu/index.ts +2 -0
  1111. package/src/menu/intl/index.ts +130 -0
  1112. package/src/meter/createMeter.ts +20 -5
  1113. package/src/numberfield/createNumberField.ts +459 -41
  1114. package/src/numberfield/index.ts +7 -0
  1115. package/src/numberfield/intl.ts +240 -0
  1116. package/src/overlays/ariaHideOutside.ts +76 -11
  1117. package/src/overlays/createCloseOnScroll.ts +90 -0
  1118. package/src/overlays/createInteractOutside.ts +73 -68
  1119. package/src/overlays/createModal.tsx +42 -27
  1120. package/src/overlays/createOverlay.ts +72 -67
  1121. package/src/overlays/createOverlayTrigger.ts +21 -6
  1122. package/src/overlays/createPreventScroll.ts +92 -62
  1123. package/src/overlays/index.ts +5 -0
  1124. package/src/overlays/intl/ar-AE.json +3 -0
  1125. package/src/overlays/intl/bg-BG.json +3 -0
  1126. package/src/overlays/intl/cs-CZ.json +3 -0
  1127. package/src/overlays/intl/da-DK.json +3 -0
  1128. package/src/overlays/intl/de-DE.json +3 -0
  1129. package/src/overlays/intl/el-GR.json +3 -0
  1130. package/src/overlays/intl/en-US.json +3 -0
  1131. package/src/overlays/intl/es-ES.json +3 -0
  1132. package/src/overlays/intl/et-EE.json +3 -0
  1133. package/src/overlays/intl/fi-FI.json +3 -0
  1134. package/src/overlays/intl/fr-FR.json +3 -0
  1135. package/src/overlays/intl/he-IL.json +3 -0
  1136. package/src/overlays/intl/hr-HR.json +3 -0
  1137. package/src/overlays/intl/hu-HU.json +3 -0
  1138. package/src/overlays/intl/index.ts +122 -0
  1139. package/src/overlays/intl/it-IT.json +3 -0
  1140. package/src/overlays/intl/ja-JP.json +3 -0
  1141. package/src/overlays/intl/ko-KR.json +3 -0
  1142. package/src/overlays/intl/lt-LT.json +3 -0
  1143. package/src/overlays/intl/lv-LV.json +3 -0
  1144. package/src/overlays/intl/nb-NO.json +3 -0
  1145. package/src/overlays/intl/nl-NL.json +3 -0
  1146. package/src/overlays/intl/pl-PL.json +3 -0
  1147. package/src/overlays/intl/pt-BR.json +3 -0
  1148. package/src/overlays/intl/pt-PT.json +3 -0
  1149. package/src/overlays/intl/ro-RO.json +3 -0
  1150. package/src/overlays/intl/ru-RU.json +3 -0
  1151. package/src/overlays/intl/sk-SK.json +3 -0
  1152. package/src/overlays/intl/sl-SI.json +3 -0
  1153. package/src/overlays/intl/sr-SP.json +3 -0
  1154. package/src/overlays/intl/sv-SE.json +3 -0
  1155. package/src/overlays/intl/tr-TR.json +3 -0
  1156. package/src/overlays/intl/uk-UA.json +3 -0
  1157. package/src/overlays/intl/zh-CN.json +3 -0
  1158. package/src/overlays/intl/zh-TW.json +3 -0
  1159. package/src/popover/calculatePosition.ts +21 -3
  1160. package/src/popover/createOverlayPosition.ts +154 -63
  1161. package/src/popover/createPopover.ts +121 -27
  1162. package/src/progress/createProgressBar.ts +23 -5
  1163. package/src/radio/createRadio.ts +65 -26
  1164. package/src/radio/createRadioGroup.ts +131 -86
  1165. package/src/searchfield/createSearchField.ts +34 -2
  1166. package/src/searchfield/intl/ar-AE.json +3 -0
  1167. package/src/searchfield/intl/bg-BG.json +3 -0
  1168. package/src/searchfield/intl/cs-CZ.json +3 -0
  1169. package/src/searchfield/intl/da-DK.json +3 -0
  1170. package/src/searchfield/intl/de-DE.json +3 -0
  1171. package/src/searchfield/intl/el-GR.json +3 -0
  1172. package/src/searchfield/intl/en-US.json +3 -0
  1173. package/src/searchfield/intl/es-ES.json +3 -0
  1174. package/src/searchfield/intl/et-EE.json +3 -0
  1175. package/src/searchfield/intl/fi-FI.json +3 -0
  1176. package/src/searchfield/intl/fr-FR.json +3 -0
  1177. package/src/searchfield/intl/he-IL.json +3 -0
  1178. package/src/searchfield/intl/hr-HR.json +3 -0
  1179. package/src/searchfield/intl/hu-HU.json +3 -0
  1180. package/src/searchfield/intl/index.ts +122 -0
  1181. package/src/searchfield/intl/it-IT.json +3 -0
  1182. package/src/searchfield/intl/ja-JP.json +3 -0
  1183. package/src/searchfield/intl/ko-KR.json +3 -0
  1184. package/src/searchfield/intl/lt-LT.json +3 -0
  1185. package/src/searchfield/intl/lv-LV.json +3 -0
  1186. package/src/searchfield/intl/nb-NO.json +3 -0
  1187. package/src/searchfield/intl/nl-NL.json +3 -0
  1188. package/src/searchfield/intl/pl-PL.json +3 -0
  1189. package/src/searchfield/intl/pt-BR.json +3 -0
  1190. package/src/searchfield/intl/pt-PT.json +3 -0
  1191. package/src/searchfield/intl/ro-RO.json +3 -0
  1192. package/src/searchfield/intl/ru-RU.json +3 -0
  1193. package/src/searchfield/intl/sk-SK.json +3 -0
  1194. package/src/searchfield/intl/sl-SI.json +3 -0
  1195. package/src/searchfield/intl/sr-SP.json +3 -0
  1196. package/src/searchfield/intl/sv-SE.json +3 -0
  1197. package/src/searchfield/intl/tr-TR.json +3 -0
  1198. package/src/searchfield/intl/uk-UA.json +3 -0
  1199. package/src/searchfield/intl/zh-CN.json +3 -0
  1200. package/src/searchfield/intl/zh-TW.json +3 -0
  1201. package/src/select/createHiddenSelect.tsx +157 -110
  1202. package/src/select/createSelect.ts +139 -61
  1203. package/src/selection/DOMLayoutDelegate.ts +14 -0
  1204. package/src/selection/ListKeyboardDelegate.ts +26 -4
  1205. package/src/selection/constants.ts +14 -0
  1206. package/src/selection/createCollectionRowInteraction.ts +77 -8
  1207. package/src/selection/createScrollIntoViewOnFocus.ts +23 -8
  1208. package/src/selection/createSelectableCollection.ts +394 -245
  1209. package/src/selection/createSelectableItem.ts +220 -45
  1210. package/src/selection/createSelectableList.ts +26 -3
  1211. package/src/selection/createTypeSelect.ts +34 -11
  1212. package/src/selection/selectItem.ts +14 -0
  1213. package/src/selection/utils.ts +15 -1
  1214. package/src/separator/createSeparator.ts +17 -1
  1215. package/src/slider/createSlider.ts +561 -302
  1216. package/src/slider/createSliderThumb.ts +46 -0
  1217. package/src/slider/index.ts +1 -0
  1218. package/src/spinbutton/createSpinButton.ts +16 -2
  1219. package/src/spinbutton/intl.ts +36 -0
  1220. package/src/ssr/index.tsx +93 -48
  1221. package/src/steplist/createStepList.ts +112 -48
  1222. package/src/steplist/index.ts +3 -0
  1223. package/src/steplist/intl/ar-AE.json +3 -0
  1224. package/src/steplist/intl/bg-BG.json +3 -0
  1225. package/src/steplist/intl/cs-CZ.json +3 -0
  1226. package/src/steplist/intl/da-DK.json +3 -0
  1227. package/src/steplist/intl/de-DE.json +3 -0
  1228. package/src/steplist/intl/el-GR.json +3 -0
  1229. package/src/steplist/intl/en-US.json +3 -0
  1230. package/src/steplist/intl/es-ES.json +3 -0
  1231. package/src/steplist/intl/et-EE.json +3 -0
  1232. package/src/steplist/intl/fi-FI.json +3 -0
  1233. package/src/steplist/intl/fr-FR.json +3 -0
  1234. package/src/steplist/intl/he-IL.json +3 -0
  1235. package/src/steplist/intl/hr-HR.json +3 -0
  1236. package/src/steplist/intl/hu-HU.json +3 -0
  1237. package/src/steplist/intl/index.ts +88 -0
  1238. package/src/steplist/intl/it-IT.json +3 -0
  1239. package/src/steplist/intl/ja-JP.json +3 -0
  1240. package/src/steplist/intl/ko-KR.json +3 -0
  1241. package/src/steplist/intl/lt-LT.json +3 -0
  1242. package/src/steplist/intl/lv-LV.json +3 -0
  1243. package/src/steplist/intl/nb-NO.json +3 -0
  1244. package/src/steplist/intl/nl-NL.json +3 -0
  1245. package/src/steplist/intl/pl-PL.json +3 -0
  1246. package/src/steplist/intl/pt-BR.json +3 -0
  1247. package/src/steplist/intl/pt-PT.json +3 -0
  1248. package/src/steplist/intl/ro-RO.json +3 -0
  1249. package/src/steplist/intl/ru-RU.json +3 -0
  1250. package/src/steplist/intl/sk-SK.json +3 -0
  1251. package/src/steplist/intl/sl-SI.json +3 -0
  1252. package/src/steplist/intl/sr-SP.json +3 -0
  1253. package/src/steplist/intl/sv-SE.json +3 -0
  1254. package/src/steplist/intl/tr-TR.json +3 -0
  1255. package/src/steplist/intl/uk-UA.json +3 -0
  1256. package/src/steplist/intl/zh-CN.json +3 -0
  1257. package/src/steplist/intl/zh-TW.json +3 -0
  1258. package/src/switch/createSwitch.ts +25 -4
  1259. package/src/table/createTable.ts +247 -82
  1260. package/src/table/createTableCell.ts +26 -6
  1261. package/src/table/createTableColumnHeader.ts +61 -13
  1262. package/src/table/createTableColumnResize.ts +303 -102
  1263. package/src/table/createTableHeaderRow.ts +20 -5
  1264. package/src/table/createTableRow.ts +48 -25
  1265. package/src/table/createTableRowGroup.ts +18 -3
  1266. package/src/table/createTableSelectAllCheckbox.ts +30 -14
  1267. package/src/table/createTableSelectionCheckbox.ts +21 -3
  1268. package/src/table/index.ts +2 -2
  1269. package/src/table/intl/ar-AE.json +13 -0
  1270. package/src/table/intl/bg-BG.json +13 -0
  1271. package/src/table/intl/cs-CZ.json +13 -0
  1272. package/src/table/intl/da-DK.json +13 -0
  1273. package/src/table/intl/de-DE.json +13 -0
  1274. package/src/table/intl/el-GR.json +13 -0
  1275. package/src/table/intl/en-US.json +13 -0
  1276. package/src/table/intl/es-ES.json +13 -0
  1277. package/src/table/intl/et-EE.json +13 -0
  1278. package/src/table/intl/fi-FI.json +13 -0
  1279. package/src/table/intl/fr-FR.json +13 -0
  1280. package/src/table/intl/he-IL.json +13 -0
  1281. package/src/table/intl/hr-HR.json +13 -0
  1282. package/src/table/intl/hu-HU.json +13 -0
  1283. package/src/table/intl/index.ts +132 -0
  1284. package/src/table/intl/it-IT.json +13 -0
  1285. package/src/table/intl/ja-JP.json +13 -0
  1286. package/src/table/intl/ko-KR.json +13 -0
  1287. package/src/table/intl/lt-LT.json +13 -0
  1288. package/src/table/intl/lv-LV.json +13 -0
  1289. package/src/table/intl/nb-NO.json +13 -0
  1290. package/src/table/intl/nl-NL.json +13 -0
  1291. package/src/table/intl/pl-PL.json +13 -0
  1292. package/src/table/intl/pt-BR.json +13 -0
  1293. package/src/table/intl/pt-PT.json +13 -0
  1294. package/src/table/intl/ro-RO.json +13 -0
  1295. package/src/table/intl/ru-RU.json +13 -0
  1296. package/src/table/intl/sk-SK.json +13 -0
  1297. package/src/table/intl/sl-SI.json +13 -0
  1298. package/src/table/intl/sr-SP.json +13 -0
  1299. package/src/table/intl/sv-SE.json +13 -0
  1300. package/src/table/intl/tr-TR.json +13 -0
  1301. package/src/table/intl/uk-UA.json +13 -0
  1302. package/src/table/intl/zh-CN.json +13 -0
  1303. package/src/table/intl/zh-TW.json +13 -0
  1304. package/src/table/types.ts +44 -2
  1305. package/src/table/utils.ts +27 -1
  1306. package/src/tabs/createTabs.ts +140 -67
  1307. package/src/tag/createTag.ts +157 -180
  1308. package/src/tag/createTagGroup.ts +160 -105
  1309. package/src/tag/intl/ar-AE.json +4 -0
  1310. package/src/tag/intl/bg-BG.json +4 -0
  1311. package/src/tag/intl/cs-CZ.json +4 -0
  1312. package/src/tag/intl/da-DK.json +4 -0
  1313. package/src/tag/intl/de-DE.json +4 -0
  1314. package/src/tag/intl/el-GR.json +4 -0
  1315. package/src/tag/intl/en-US.json +4 -0
  1316. package/src/tag/intl/es-ES.json +4 -0
  1317. package/src/tag/intl/et-EE.json +4 -0
  1318. package/src/tag/intl/fi-FI.json +4 -0
  1319. package/src/tag/intl/fr-FR.json +4 -0
  1320. package/src/tag/intl/he-IL.json +4 -0
  1321. package/src/tag/intl/hr-HR.json +4 -0
  1322. package/src/tag/intl/hu-HU.json +4 -0
  1323. package/src/tag/intl/index.ts +123 -0
  1324. package/src/tag/intl/it-IT.json +4 -0
  1325. package/src/tag/intl/ja-JP.json +4 -0
  1326. package/src/tag/intl/ko-KR.json +4 -0
  1327. package/src/tag/intl/lt-LT.json +4 -0
  1328. package/src/tag/intl/lv-LV.json +4 -0
  1329. package/src/tag/intl/nb-NO.json +4 -0
  1330. package/src/tag/intl/nl-NL.json +4 -0
  1331. package/src/tag/intl/pl-PL.json +4 -0
  1332. package/src/tag/intl/pt-BR.json +4 -0
  1333. package/src/tag/intl/pt-PT.json +4 -0
  1334. package/src/tag/intl/ro-RO.json +4 -0
  1335. package/src/tag/intl/ru-RU.json +4 -0
  1336. package/src/tag/intl/sk-SK.json +4 -0
  1337. package/src/tag/intl/sl-SI.json +4 -0
  1338. package/src/tag/intl/sr-SP.json +4 -0
  1339. package/src/tag/intl/sv-SE.json +4 -0
  1340. package/src/tag/intl/tr-TR.json +4 -0
  1341. package/src/tag/intl/uk-UA.json +4 -0
  1342. package/src/tag/intl/zh-CN.json +4 -0
  1343. package/src/tag/intl/zh-TW.json +4 -0
  1344. package/src/textfield/createTextField.ts +120 -14
  1345. package/src/toast/createToast.ts +72 -22
  1346. package/src/toast/createToastRegion.ts +60 -24
  1347. package/src/toast/intl/ar-AE.json +4 -0
  1348. package/src/toast/intl/bg-BG.json +4 -0
  1349. package/src/toast/intl/cs-CZ.json +4 -0
  1350. package/src/toast/intl/da-DK.json +4 -0
  1351. package/src/toast/intl/de-DE.json +4 -0
  1352. package/src/toast/intl/el-GR.json +4 -0
  1353. package/src/toast/intl/en-US.json +4 -0
  1354. package/src/toast/intl/es-ES.json +4 -0
  1355. package/src/toast/intl/et-EE.json +4 -0
  1356. package/src/toast/intl/fi-FI.json +4 -0
  1357. package/src/toast/intl/fr-FR.json +4 -0
  1358. package/src/toast/intl/he-IL.json +4 -0
  1359. package/src/toast/intl/hr-HR.json +4 -0
  1360. package/src/toast/intl/hu-HU.json +4 -0
  1361. package/src/toast/intl/index.ts +123 -0
  1362. package/src/toast/intl/it-IT.json +4 -0
  1363. package/src/toast/intl/ja-JP.json +4 -0
  1364. package/src/toast/intl/ko-KR.json +4 -0
  1365. package/src/toast/intl/lt-LT.json +4 -0
  1366. package/src/toast/intl/lv-LV.json +4 -0
  1367. package/src/toast/intl/nb-NO.json +4 -0
  1368. package/src/toast/intl/nl-NL.json +4 -0
  1369. package/src/toast/intl/pl-PL.json +4 -0
  1370. package/src/toast/intl/pt-BR.json +4 -0
  1371. package/src/toast/intl/pt-PT.json +4 -0
  1372. package/src/toast/intl/ro-RO.json +4 -0
  1373. package/src/toast/intl/ru-RU.json +4 -0
  1374. package/src/toast/intl/sk-SK.json +4 -0
  1375. package/src/toast/intl/sl-SI.json +4 -0
  1376. package/src/toast/intl/sr-SP.json +4 -0
  1377. package/src/toast/intl/sv-SE.json +4 -0
  1378. package/src/toast/intl/tr-TR.json +4 -0
  1379. package/src/toast/intl/uk-UA.json +4 -0
  1380. package/src/toast/intl/zh-CN.json +4 -0
  1381. package/src/toast/intl/zh-TW.json +4 -0
  1382. package/src/toggle/createToggle.ts +169 -21
  1383. package/src/tokenfield/createToken.ts +100 -0
  1384. package/src/tokenfield/createTokenField.ts +955 -0
  1385. package/src/tokenfield/index.ts +10 -0
  1386. package/src/toolbar/createToolbar.ts +26 -5
  1387. package/src/tooltip/createPreviewTrigger.ts +301 -0
  1388. package/src/tooltip/createSafeArea.ts +165 -0
  1389. package/src/tooltip/createTooltip.ts +15 -1
  1390. package/src/tooltip/createTooltipTrigger.ts +25 -11
  1391. package/src/tooltip/index.ts +7 -0
  1392. package/src/tooltip/intl/index.ts +76 -0
  1393. package/src/tree/createTree.ts +83 -48
  1394. package/src/tree/createTreeItem.ts +92 -35
  1395. package/src/tree/createTreeSelectionCheckbox.ts +34 -30
  1396. package/src/tree/intl/ar-AE.json +4 -0
  1397. package/src/tree/intl/bg-BG.json +4 -0
  1398. package/src/tree/intl/cs-CZ.json +4 -0
  1399. package/src/tree/intl/da-DK.json +4 -0
  1400. package/src/tree/intl/de-DE.json +4 -0
  1401. package/src/tree/intl/el-GR.json +4 -0
  1402. package/src/tree/intl/en-US.json +4 -0
  1403. package/src/tree/intl/es-ES.json +4 -0
  1404. package/src/tree/intl/et-EE.json +4 -0
  1405. package/src/tree/intl/fi-FI.json +4 -0
  1406. package/src/tree/intl/fr-FR.json +4 -0
  1407. package/src/tree/intl/he-IL.json +4 -0
  1408. package/src/tree/intl/hr-HR.json +4 -0
  1409. package/src/tree/intl/hu-HU.json +4 -0
  1410. package/src/tree/intl/index.ts +123 -0
  1411. package/src/tree/intl/it-IT.json +4 -0
  1412. package/src/tree/intl/ja-JP.json +4 -0
  1413. package/src/tree/intl/ko-KR.json +4 -0
  1414. package/src/tree/intl/lt-LT.json +4 -0
  1415. package/src/tree/intl/lv-LV.json +4 -0
  1416. package/src/tree/intl/nb-NO.json +4 -0
  1417. package/src/tree/intl/nl-NL.json +4 -0
  1418. package/src/tree/intl/pl-PL.json +4 -0
  1419. package/src/tree/intl/pt-BR.json +4 -0
  1420. package/src/tree/intl/pt-PT.json +4 -0
  1421. package/src/tree/intl/ro-RO.json +4 -0
  1422. package/src/tree/intl/ru-RU.json +4 -0
  1423. package/src/tree/intl/sk-SK.json +4 -0
  1424. package/src/tree/intl/sl-SI.json +4 -0
  1425. package/src/tree/intl/sr-SP.json +4 -0
  1426. package/src/tree/intl/sv-SE.json +4 -0
  1427. package/src/tree/intl/tr-TR.json +4 -0
  1428. package/src/tree/intl/uk-UA.json +4 -0
  1429. package/src/tree/intl/zh-CN.json +4 -0
  1430. package/src/tree/intl/zh-TW.json +4 -0
  1431. package/src/tree/types.ts +37 -3
  1432. package/src/utils/ShadowTreeWalker.ts +249 -0
  1433. package/src/utils/animation.ts +84 -107
  1434. package/src/utils/callEventHandler.ts +23 -0
  1435. package/src/utils/capture.ts +68 -0
  1436. package/src/utils/createDescription.ts +31 -8
  1437. package/src/utils/dom.ts +382 -72
  1438. package/src/utils/domAttrs.ts +84 -0
  1439. package/src/utils/env.ts +34 -3
  1440. package/src/utils/events.ts +39 -3
  1441. package/src/utils/filterDOMProps.ts +34 -2
  1442. package/src/utils/focus.ts +165 -78
  1443. package/src/utils/focusWithoutScrolling.ts +95 -0
  1444. package/src/utils/geometry.ts +15 -1
  1445. package/src/utils/getMetaValue.ts +57 -0
  1446. package/src/utils/getNonce.ts +40 -0
  1447. package/src/utils/globalListeners.ts +16 -3
  1448. package/src/utils/index.ts +40 -1
  1449. package/src/utils/keyboard.ts +15 -1
  1450. package/src/utils/mergeProps.ts +149 -16
  1451. package/src/utils/openLink.ts +241 -0
  1452. package/src/utils/owner.ts +26 -0
  1453. package/src/utils/platform.ts +81 -35
  1454. package/src/utils/reactivity.ts +2 -0
  1455. package/src/utils/refs.ts +53 -0
  1456. package/src/utils/runAfterTransition.ts +117 -0
  1457. package/src/utils/scrollIntoView.ts +14 -0
  1458. package/src/utils/splitProps.ts +70 -0
  1459. package/src/utils/textSelection.ts +53 -66
  1460. package/src/virtualizer/ScrollView.ts +210 -0
  1461. package/src/virtualizer/index.ts +2 -0
  1462. package/src/virtualizer/utils.ts +100 -0
  1463. package/src/visually-hidden/createVisuallyHidden.ts +20 -4
  1464. package/dist/_chunk/createFormValidation.js +0 -135
  1465. package/dist/_chunk/createFormValidation.js.map +0 -1
  1466. package/dist/_chunk/createFormValidation.jsx +0 -135
  1467. package/dist/_chunk/createFormValidation.jsx.map +0 -1
  1468. package/dist/_chunk/focus2.js +0 -631
  1469. package/dist/_chunk/focus2.js.map +0 -1
  1470. package/dist/_chunk/focus2.jsx +0 -631
  1471. package/dist/_chunk/focus2.jsx.map +0 -1
  1472. package/dist/_chunk/visually-hidden.js.map +0 -1
  1473. package/dist/_chunk/visually-hidden.jsx.map +0 -1
  1474. package/dist/checkbox/createCheckboxGroupState.d.ts +0 -71
  1475. package/dist/checkbox/createCheckboxGroupState.d.ts.map +0 -1
  1476. package/dist/radio/createRadioGroupState.d.ts +0 -77
  1477. package/dist/radio/createRadioGroupState.d.ts.map +0 -1
  1478. package/dist/toggle/createToggleState.d.ts +0 -34
  1479. package/dist/toggle/createToggleState.d.ts.map +0 -1
  1480. package/src/checkbox/createCheckboxGroupState.ts +0 -174
  1481. package/src/radio/createRadioGroupState.ts +0 -177
  1482. package/src/toggle/createToggleState.ts +0 -86
@@ -1,7 +1,120 @@
1
- import { A as isMac, p as isVirtualClick } from "./utils.jsx";
2
- import { b as openLink, c as getOwnerWindow, s as getOwnerDocument } from "./focus.jsx";
3
- import { createEffect, createSignal, onCleanup } from "solid-js";
4
- import { isServer } from "solid-js/web";
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/interactions/useFocusVisible.ts
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
+ /*
25
+ * Copyright 2022 Adobe. All rights reserved.
26
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
27
+ * you may not use this file except in compliance with the License. You may obtain a copy
28
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
29
+ *
30
+ * Unless required by applicable law or agreed to in writing, software distributed under
31
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
32
+ * OF ANY KIND, either express or implied. See the License for the specific language
33
+ * governing permissions and limitations under the License.
34
+ */
35
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/interactions/utils.ts
36
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/utils/chain.ts
37
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/utils/isVirtualEvent.ts
38
+ import { F as isMac, O as isAndroid, S as openLink, a as getEventTarget, c as getOwnerWindow, s as getOwnerDocument } from "./dom.jsx";
39
+ import { createSignal, createTrackedEffect } from "solid-js";
40
+ import { isServer } from "@solidjs/web";
41
+ //#region src/utils/events.ts
42
+ /**
43
+ * Event utilities for detecting virtual clicks and event handling.
44
+ * Based on these pinned React Aria sources:
45
+ * - packages/react-aria/src/utils/isVirtualEvent.ts
46
+ * - packages/react-aria/src/utils/chain.ts
47
+ * - packages/react-aria/src/interactions/utils.ts
48
+ *
49
+ * createMouseEvent is a local event adapter.
50
+ */
51
+ /**
52
+ * Checks if a click event was generated from a virtual source like a screen reader.
53
+ * Virtual clicks typically have detail of 0 and may have zero coordinates.
54
+ */
55
+ function isVirtualClick(event) {
56
+ if (event.pointerType === "" && event.isTrusted) return true;
57
+ if (isAndroid() && event.pointerType) return event.type === "click" && event.buttons === 1;
58
+ return event.detail === 0 && !event.pointerType;
59
+ }
60
+ /**
61
+ * Checks if a pointer event was generated by a virtual source.
62
+ * iOS VoiceOver fires pointer events with incorrect coordinates.
63
+ * These events have zero width/height.
64
+ */
65
+ function isVirtualPointerEvent(event) {
66
+ return !isAndroid() && event.width === 0 && event.height === 0 || isAndroid() && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse";
67
+ }
68
+ /**
69
+ * Creates a synthetic mouse event for programmatic clicking.
70
+ */
71
+ function createMouseEvent(type, nativeEvent) {
72
+ const init = {
73
+ bubbles: true,
74
+ cancelable: true,
75
+ view: window
76
+ };
77
+ if (nativeEvent) {
78
+ const e = nativeEvent;
79
+ init.screenX = e.screenX;
80
+ init.screenY = e.screenY;
81
+ init.clientX = e.clientX;
82
+ init.clientY = e.clientY;
83
+ init.ctrlKey = e.ctrlKey;
84
+ init.shiftKey = e.shiftKey;
85
+ init.altKey = e.altKey;
86
+ init.metaKey = e.metaKey;
87
+ init.button = e.button;
88
+ init.buttons = e.buttons;
89
+ init.relatedTarget = e.relatedTarget;
90
+ }
91
+ return new MouseEvent(type, init);
92
+ }
93
+ /**
94
+ * Creates a chain of event handlers that calls each in sequence.
95
+ */
96
+ function chain(...callbacks) {
97
+ return ((...args) => {
98
+ for (const callback of callbacks) if (typeof callback === "function") callback(...args);
99
+ });
100
+ }
101
+ /**
102
+ * Sets the target property on an event object.
103
+ * Used for synthetic events where target needs to be modified.
104
+ */
105
+ function setEventTarget(event, target) {
106
+ Object.defineProperty(event, "target", {
107
+ value: target,
108
+ writable: false,
109
+ configurable: true
110
+ });
111
+ Object.defineProperty(event, "currentTarget", {
112
+ value: target,
113
+ writable: false,
114
+ configurable: true
115
+ });
116
+ }
117
+ //#endregion
5
118
  //#region src/interactions/createInteractionModality.ts
6
119
  /**
7
120
  * createInteractionModality + focus-visible tracking for solidaria
@@ -10,13 +123,26 @@ import { isServer } from "solid-js/web";
10
123
  * Tracks the current interaction modality (keyboard, pointer, or virtual) and
11
124
  * provides focus-visible state and listeners.
12
125
  */
13
- let currentModality = null;
126
+ let currentModalityValue = null;
127
+ const [modalityEpoch, bumpModalityEpoch] = createSignal(0, { ownedWrite: true });
14
128
  let currentPointerType = "keyboard";
129
+ function writeModality(next) {
130
+ currentModalityValue = next;
131
+ }
132
+ function publishModality(next) {
133
+ currentModalityValue = next;
134
+ bumpModalityEpoch((n) => n + 1);
135
+ }
15
136
  const changeHandlers = /* @__PURE__ */ new Set();
16
137
  let hasSetupGlobalListeners = /* @__PURE__ */ new Map();
17
138
  let hasEventBeforeFocus = false;
18
139
  let hasBlurredWindowRecently = false;
140
+ /** @private Set by `preventFocus` so programmatic refocus is not treated as a modality change. */
19
141
  let ignoreFocusEvent = false;
142
+ /** @private */
143
+ function setIgnoreFocusEvent(value) {
144
+ ignoreFocusEvent = value;
145
+ }
20
146
  const FOCUS_VISIBLE_INPUT_KEYS = {
21
147
  Tab: true,
22
148
  Escape: true
@@ -30,36 +156,38 @@ function isValidKey(e) {
30
156
  function handleKeyboardEvent(e) {
31
157
  hasEventBeforeFocus = true;
32
158
  if (!openLink.isOpening && isValidKey(e)) {
33
- currentModality = "keyboard";
159
+ publishModality("keyboard");
34
160
  currentPointerType = "keyboard";
35
161
  triggerChangeHandlers("keyboard", e);
36
162
  }
37
163
  }
38
164
  function handlePointerEvent(e) {
39
- currentModality = "pointer";
40
165
  currentPointerType = "pointerType" in e ? e.pointerType : "mouse";
41
166
  if (e.type === "mousedown" || e.type === "pointerdown") {
167
+ publishModality("pointer");
42
168
  hasEventBeforeFocus = true;
43
169
  triggerChangeHandlers("pointer", e);
44
- }
170
+ } else writeModality("pointer");
45
171
  }
46
172
  function handleClickEvent(e) {
47
- if (!e.isTrusted) return;
48
173
  if (!openLink.isOpening && isVirtualClick(e)) {
49
174
  hasEventBeforeFocus = true;
50
- currentModality = "virtual";
175
+ publishModality("virtual");
51
176
  currentPointerType = "virtual";
52
177
  }
53
178
  }
54
179
  function handleFocusEvent(e) {
55
- if (!e.isTrusted || ignoreFocusEvent) return;
56
- const target = e.target;
57
- const targetElement = target && target.nodeType ? target : null;
58
- const ownerWindow = targetElement ? getOwnerWindow(targetElement) : window;
59
- const ownerDocument = targetElement ? getOwnerDocument(targetElement) : document;
60
- if (target === ownerWindow || target === ownerDocument) return;
180
+ if (ignoreFocusEvent) return;
181
+ const target = getEventTarget(e);
182
+ const ownerWindow = getOwnerWindow(target);
183
+ const ownerDocument = getOwnerDocument(target);
184
+ if (target === ownerWindow) {
185
+ hasBlurredWindowRecently = true;
186
+ return;
187
+ }
188
+ if (target === ownerDocument || !e.isTrusted) return;
61
189
  if (!hasEventBeforeFocus && !hasBlurredWindowRecently) {
62
- currentModality = "virtual";
190
+ publishModality("virtual");
63
191
  currentPointerType = "virtual";
64
192
  triggerChangeHandlers("virtual", e);
65
193
  }
@@ -67,6 +195,7 @@ function handleFocusEvent(e) {
67
195
  hasBlurredWindowRecently = false;
68
196
  }
69
197
  function handleWindowBlur() {
198
+ if (ignoreFocusEvent) return;
70
199
  hasEventBeforeFocus = false;
71
200
  hasBlurredWindowRecently = true;
72
201
  }
@@ -150,28 +279,36 @@ function setupGlobalFocusListeners() {
150
279
  addWindowFocusTracking();
151
280
  }
152
281
  if (typeof document !== "undefined") addWindowFocusTracking();
282
+ function focusVisibleSnapshot() {
283
+ return currentModalityValue !== "pointer";
284
+ }
153
285
  /**
154
- * If true, keyboard focus is visible.
286
+ * If true, keyboard focus is visible. The only tracked read of modality:
287
+ * useOption's render predicate re-reads this on every render.
155
288
  */
156
289
  function isFocusVisible() {
157
- return currentModality !== "pointer";
290
+ modalityEpoch();
291
+ return focusVisibleSnapshot();
158
292
  }
159
293
  /**
160
294
  * Gets the current interaction modality.
295
+ * The module let, not the signal. An effect that calls this does not re-run
296
+ * when modality changes; upstream's query is a plain variable.
161
297
  */
162
298
  function getInteractionModality() {
163
- return currentModality;
299
+ return currentModalityValue;
164
300
  }
165
301
  /**
166
302
  * Sets the current interaction modality.
167
303
  */
168
304
  function setInteractionModality(modality) {
169
- currentModality = modality;
305
+ publishModality(modality);
170
306
  currentPointerType = modality === "pointer" ? "mouse" : modality;
171
307
  triggerChangeHandlers(modality, null);
172
308
  }
173
309
  /**
174
- * Gets the current pointer type.
310
+ * Gets the current pointer type. Separate from modality; this let is never
311
+ * the modality signal.
175
312
  */
176
313
  function getPointerType() {
177
314
  return currentPointerType;
@@ -185,7 +322,7 @@ function isKeyboardFocusEvent(isTextInput, modality, e) {
185
322
  const IHTMLTextAreaElement = ownerWindow.HTMLTextAreaElement;
186
323
  const IHTMLElement = ownerWindow.HTMLElement;
187
324
  const IKeyboardEvent = ownerWindow.KeyboardEvent;
188
- const nonTextInputTypes = new Set([
325
+ const nonTextInputTypes = /* @__PURE__ */ new Set([
189
326
  "checkbox",
190
327
  "radio",
191
328
  "range",
@@ -204,9 +341,10 @@ function isKeyboardFocusEvent(isTextInput, modality, e) {
204
341
  */
205
342
  function createFocusVisibleListener(handler, opts) {
206
343
  setupGlobalFocusEvents();
344
+ if (opts?.enabled === false) return () => {};
207
345
  const listener = (modality, e) => {
208
346
  if (!isKeyboardFocusEvent(!!opts?.isTextInput, modality, e)) return;
209
- handler(isFocusVisible());
347
+ handler(focusVisibleSnapshot());
210
348
  };
211
349
  changeHandlers.add(listener);
212
350
  return () => {
@@ -217,10 +355,14 @@ function createFocusVisibleListener(handler, opts) {
217
355
  * Manages focus visible state for the page.
218
356
  */
219
357
  function createFocusVisible(props = {}) {
220
- if (isServer) return { isFocusVisible: () => false };
221
- const [isVisible, setIsVisible] = createSignal(props.autoFocus || isFocusVisible());
222
- createEffect(() => {
223
- onCleanup(createFocusVisibleListener(setIsVisible, { isTextInput: props.isTextInput }));
358
+ const [isVisible, setIsVisible] = createSignal(isServer ? false : props.autoFocus || focusVisibleSnapshot());
359
+ createTrackedEffect(() => {
360
+ const _s2Cleanups = [];
361
+ const cleanup = createFocusVisibleListener(setIsVisible, { isTextInput: props.isTextInput });
362
+ _s2Cleanups.push(cleanup);
363
+ return () => {
364
+ for (const c of _s2Cleanups) c();
365
+ };
224
366
  });
225
367
  return { isFocusVisible: isVisible };
226
368
  }
@@ -228,17 +370,21 @@ function createFocusVisible(props = {}) {
228
370
  * Tracks the current interaction modality.
229
371
  */
230
372
  function createInteractionModality() {
231
- if (isServer) return { modality: () => null };
232
- const [modality, setModality] = createSignal(currentModality);
233
- createEffect(() => {
373
+ const [modality, setModality] = createSignal(isServer ? null : currentModalityValue);
374
+ createTrackedEffect(() => {
375
+ if (isServer) return;
376
+ const _s2Cleanups = [];
234
377
  setupGlobalFocusEvents();
235
378
  const handler = (newModality) => {
236
379
  setModality(newModality);
237
380
  };
238
381
  changeHandlers.add(handler);
239
- onCleanup(() => {
382
+ _s2Cleanups.push(() => {
240
383
  changeHandlers.delete(handler);
241
384
  });
385
+ return () => {
386
+ for (const c of _s2Cleanups) c();
387
+ };
242
388
  });
243
389
  return { modality };
244
390
  }
@@ -258,11 +404,10 @@ function addModalityListener(handler) {
258
404
  * Hook to track whether the user is currently interacting with the keyboard.
259
405
  */
260
406
  function useIsKeyboardFocused() {
261
- if (isServer) return () => false;
262
407
  const { modality } = createInteractionModality();
263
408
  return () => modality() === "keyboard";
264
409
  }
265
410
  //#endregion
266
- export { createInteractionModality as a, isFocusVisible as c, useIsKeyboardFocused as d, createFocusVisibleListener as i, setInteractionModality as l, addWindowFocusTracking as n, getInteractionModality as o, createFocusVisible as r, getPointerType as s, addModalityListener as t, setupGlobalFocusListeners as u };
411
+ export { setEventTarget as _, createInteractionModality as a, isFocusVisible as c, setupGlobalFocusListeners as d, useIsKeyboardFocused as f, isVirtualPointerEvent as g, isVirtualClick as h, createFocusVisibleListener as i, setIgnoreFocusEvent as l, createMouseEvent as m, addWindowFocusTracking as n, getInteractionModality as o, chain as p, createFocusVisible as r, getPointerType as s, addModalityListener as t, setInteractionModality as u };
267
412
 
268
413
  //# sourceMappingURL=createInteractionModality.jsx.map
@@ -1 +1 @@
1
- {"version":3,"file":"createInteractionModality.jsx","names":[],"sources":["../../src/interactions/createInteractionModality.ts"],"sourcesContent":["/**\n * createInteractionModality + focus-visible tracking for solidaria\n *\n * Port of @react-aria/interactions useFocusVisible/useInteractionModality.\n * Tracks the current interaction modality (keyboard, pointer, or virtual) and\n * provides focus-visible state and listeners.\n */\n\nimport { type Accessor, createSignal, createEffect, onCleanup } from \"solid-js\";\nimport { isServer } from \"solid-js/web\";\nimport { getOwnerDocument, getOwnerWindow, isMac, isVirtualClick, openLink } from \"../utils\";\n\nexport type Modality = \"keyboard\" | \"pointer\" | \"virtual\";\nexport type PointerType = \"mouse\" | \"pen\" | \"touch\" | \"keyboard\" | \"virtual\";\ntype HandlerEvent = PointerEvent | MouseEvent | KeyboardEvent | FocusEvent | null;\ntype Handler = (modality: Modality, e: HandlerEvent) => void;\n\nexport type FocusVisibleHandler = (isFocusVisible: boolean) => void;\n\nexport interface FocusVisibleProps {\n /** Whether the element is a text input. */\n isTextInput?: boolean;\n /** Whether the element will be auto focused. */\n autoFocus?: boolean;\n}\n\nexport interface FocusVisibleResult {\n /** Whether keyboard focus is visible globally. */\n isFocusVisible: Accessor<boolean>;\n}\n\nexport interface InteractionModalityResult {\n /** The current interaction modality. */\n modality: Accessor<Modality | null>;\n}\n\nlet currentModality: Modality | null = null;\nlet currentPointerType: PointerType = \"keyboard\";\nconst changeHandlers = new Set<Handler>();\n\nexport let hasSetupGlobalListeners: Map<\n Window,\n { focus: typeof window.HTMLElement.prototype.focus }\n> = new Map();\nlet hasEventBeforeFocus = false;\nlet hasBlurredWindowRecently = false;\nlet ignoreFocusEvent = false;\n\nconst FOCUS_VISIBLE_INPUT_KEYS: Record<string, boolean> = {\n Tab: true,\n Escape: true,\n};\n\nfunction triggerChangeHandlers(modality: Modality, e: HandlerEvent) {\n for (const handler of changeHandlers) {\n handler(modality, e);\n }\n}\n\nfunction isValidKey(e: KeyboardEvent) {\n return !(\n e.metaKey ||\n (!isMac() && e.altKey) ||\n e.ctrlKey ||\n e.key === \"Control\" ||\n e.key === \"Shift\" ||\n e.key === \"Meta\"\n );\n}\n\nfunction handleKeyboardEvent(e: KeyboardEvent) {\n hasEventBeforeFocus = true;\n const isOpening = (openLink as { isOpening?: boolean }).isOpening;\n if (!isOpening && isValidKey(e)) {\n currentModality = \"keyboard\";\n currentPointerType = \"keyboard\";\n triggerChangeHandlers(\"keyboard\", e);\n }\n}\n\nfunction handlePointerEvent(e: PointerEvent | MouseEvent) {\n currentModality = \"pointer\";\n currentPointerType = \"pointerType\" in e ? (e.pointerType as PointerType) : \"mouse\";\n if (e.type === \"mousedown\" || e.type === \"pointerdown\") {\n hasEventBeforeFocus = true;\n triggerChangeHandlers(\"pointer\", e);\n }\n}\n\nfunction handleClickEvent(e: MouseEvent) {\n if (!e.isTrusted) {\n return;\n }\n\n const isOpening = (openLink as { isOpening?: boolean }).isOpening;\n if (!isOpening && isVirtualClick(e)) {\n hasEventBeforeFocus = true;\n currentModality = \"virtual\";\n currentPointerType = \"virtual\";\n }\n}\n\nfunction handleFocusEvent(e: FocusEvent) {\n if (!e.isTrusted || ignoreFocusEvent) {\n return;\n }\n\n const target = e.target as EventTarget | null;\n const targetElement = target && (target as Element).nodeType ? (target as Element) : null;\n const ownerWindow = targetElement ? getOwnerWindow(targetElement) : window;\n const ownerDocument = targetElement ? getOwnerDocument(targetElement) : document;\n\n if (target === ownerWindow || target === ownerDocument) {\n return;\n }\n\n if (!hasEventBeforeFocus && !hasBlurredWindowRecently) {\n currentModality = \"virtual\";\n currentPointerType = \"virtual\";\n triggerChangeHandlers(\"virtual\", e);\n }\n\n hasEventBeforeFocus = false;\n hasBlurredWindowRecently = false;\n}\n\nfunction handleWindowBlur() {\n if (ignoreFocusEvent) {\n return;\n }\n\n hasEventBeforeFocus = false;\n hasBlurredWindowRecently = true;\n}\n\nfunction setupGlobalFocusEvents(element?: HTMLElement | null) {\n if (typeof window === \"undefined\" || typeof document === \"undefined\") {\n return;\n }\n\n const windowObject = getOwnerWindow(element);\n if (hasSetupGlobalListeners.get(windowObject)) {\n return;\n }\n\n const documentObject = getOwnerDocument(element);\n\n // Programmatic focus() calls shouldn't affect the current input modality, so we\n // patch HTMLElement.prototype.focus to record that an event preceded the focus.\n // Use Reflect.defineProperty (not assignment) so this works even when `focus` is\n // currently a getter-only accessor — e.g. when a test library's setup() has\n // instrumented it. Plain assignment throws in that case; Reflect.defineProperty\n // returns false rather than throwing (and succeeds on the configurable prototype).\n const originalFocus = windowObject.HTMLElement.prototype.focus;\n Reflect.defineProperty(windowObject.HTMLElement.prototype, \"focus\", {\n configurable: true,\n writable: true,\n value: function () {\n hasEventBeforeFocus = true;\n originalFocus.apply(this, arguments as unknown as [options?: FocusOptions | undefined]);\n },\n });\n\n documentObject.addEventListener(\"keydown\", handleKeyboardEvent, true);\n documentObject.addEventListener(\"keyup\", handleKeyboardEvent, true);\n documentObject.addEventListener(\"click\", handleClickEvent, true);\n\n windowObject.addEventListener(\"focus\", handleFocusEvent, true);\n windowObject.addEventListener(\"blur\", handleWindowBlur, false);\n\n if (typeof windowObject.PointerEvent !== \"undefined\") {\n documentObject.addEventListener(\"pointerdown\", handlePointerEvent, true);\n documentObject.addEventListener(\"pointermove\", handlePointerEvent, true);\n documentObject.addEventListener(\"pointerup\", handlePointerEvent, true);\n } else {\n documentObject.addEventListener(\"mousedown\", handlePointerEvent, true);\n documentObject.addEventListener(\"mousemove\", handlePointerEvent, true);\n documentObject.addEventListener(\"mouseup\", handlePointerEvent, true);\n }\n\n windowObject.addEventListener(\n \"beforeunload\",\n () => {\n tearDownWindowFocusTracking(element);\n },\n { once: true },\n );\n\n hasSetupGlobalListeners.set(windowObject, { focus: originalFocus });\n}\n\nfunction tearDownWindowFocusTracking(element?: HTMLElement | null, loadListener?: () => void) {\n if (typeof window === \"undefined\" || typeof document === \"undefined\") {\n return;\n }\n\n const windowObject = getOwnerWindow(element);\n const documentObject = getOwnerDocument(element);\n\n if (loadListener) {\n documentObject.removeEventListener(\"DOMContentLoaded\", loadListener);\n }\n\n if (!hasSetupGlobalListeners.has(windowObject)) {\n return;\n }\n\n const entry = hasSetupGlobalListeners.get(windowObject)!;\n // Mirror the setup path: defineProperty (not assignment) restores the original\n // focus even if it had been replaced with a getter-only accessor.\n Reflect.defineProperty(windowObject.HTMLElement.prototype, \"focus\", {\n configurable: true,\n writable: true,\n value: entry.focus,\n });\n\n documentObject.removeEventListener(\"keydown\", handleKeyboardEvent, true);\n documentObject.removeEventListener(\"keyup\", handleKeyboardEvent, true);\n documentObject.removeEventListener(\"click\", handleClickEvent, true);\n\n windowObject.removeEventListener(\"focus\", handleFocusEvent, true);\n windowObject.removeEventListener(\"blur\", handleWindowBlur, false);\n\n if (typeof windowObject.PointerEvent !== \"undefined\") {\n documentObject.removeEventListener(\"pointerdown\", handlePointerEvent, true);\n documentObject.removeEventListener(\"pointermove\", handlePointerEvent, true);\n documentObject.removeEventListener(\"pointerup\", handlePointerEvent, true);\n } else {\n documentObject.removeEventListener(\"mousedown\", handlePointerEvent, true);\n documentObject.removeEventListener(\"mousemove\", handlePointerEvent, true);\n documentObject.removeEventListener(\"mouseup\", handlePointerEvent, true);\n }\n\n hasSetupGlobalListeners.delete(windowObject);\n}\n\n/**\n * Adds a window (i.e. iframe) to the list of windows that are being tracked for focus visible.\n */\nexport function addWindowFocusTracking(element?: HTMLElement | null): () => void {\n const documentObject = getOwnerDocument(element);\n let loadListener: (() => void) | undefined;\n\n if (documentObject.readyState !== \"loading\") {\n setupGlobalFocusEvents(element);\n } else {\n loadListener = () => {\n setupGlobalFocusEvents(element);\n };\n documentObject.addEventListener(\"DOMContentLoaded\", loadListener);\n }\n\n return () => tearDownWindowFocusTracking(element, loadListener);\n}\n\nexport function setupGlobalFocusListeners(): void {\n addWindowFocusTracking();\n}\n\nif (typeof document !== \"undefined\") {\n addWindowFocusTracking();\n}\n\n/**\n * If true, keyboard focus is visible.\n */\nexport function isFocusVisible(): boolean {\n return currentModality !== \"pointer\";\n}\n\n/**\n * Gets the current interaction modality.\n */\nexport function getInteractionModality(): Modality | null {\n return currentModality;\n}\n\n/**\n * Sets the current interaction modality.\n */\nexport function setInteractionModality(modality: Modality): void {\n currentModality = modality;\n currentPointerType = modality === \"pointer\" ? \"mouse\" : modality;\n triggerChangeHandlers(modality, null);\n}\n\n/**\n * Gets the current pointer type.\n */\nexport function getPointerType(): PointerType {\n return currentPointerType;\n}\n\nfunction isKeyboardFocusEvent(isTextInput: boolean, modality: Modality, e: HandlerEvent): boolean {\n if (!e) {\n return true;\n }\n\n const target = \"target\" in e ? (e.target as Element | null) : null;\n const ownerDocument = target ? getOwnerDocument(target) : document;\n const ownerWindow = target ? getOwnerWindow(target) : window;\n\n const IHTMLInputElement = ownerWindow.HTMLInputElement;\n const IHTMLTextAreaElement = ownerWindow.HTMLTextAreaElement;\n const IHTMLElement = ownerWindow.HTMLElement;\n const IKeyboardEvent = ownerWindow.KeyboardEvent;\n\n const nonTextInputTypes = new Set([\n \"checkbox\",\n \"radio\",\n \"range\",\n \"color\",\n \"file\",\n \"image\",\n \"button\",\n \"submit\",\n \"reset\",\n ]);\n\n isTextInput =\n isTextInput ||\n (ownerDocument.activeElement instanceof IHTMLInputElement &&\n !nonTextInputTypes.has(ownerDocument.activeElement.type)) ||\n ownerDocument.activeElement instanceof IHTMLTextAreaElement ||\n (ownerDocument.activeElement instanceof IHTMLElement &&\n ownerDocument.activeElement.isContentEditable);\n\n return !(\n isTextInput &&\n modality === \"keyboard\" &&\n e instanceof IKeyboardEvent &&\n !FOCUS_VISIBLE_INPUT_KEYS[e.key]\n );\n}\n\n/**\n * Listens for trigger change and reports if focus is visible.\n */\nexport function createFocusVisibleListener(\n handler: FocusVisibleHandler,\n opts?: { isTextInput?: boolean },\n): () => void {\n setupGlobalFocusEvents();\n const listener: Handler = (modality: Modality, e: HandlerEvent) => {\n if (!isKeyboardFocusEvent(!!opts?.isTextInput, modality, e)) {\n return;\n }\n handler(isFocusVisible());\n };\n changeHandlers.add(listener);\n return () => {\n changeHandlers.delete(listener);\n };\n}\n\n/**\n * Manages focus visible state for the page.\n */\nexport function createFocusVisible(props: FocusVisibleProps = {}): FocusVisibleResult {\n if (isServer) {\n return { isFocusVisible: () => false };\n }\n\n // autoFocus seeds the initial value once; isTextInput is read inside the effect\n // so it re-subscribes reactively (a top-level destructure would freeze it — the\n // body runs once). Mirrors upstream useFocusVisible's [isTextInput] dep.\n const [isVisible, setIsVisible] = createSignal<boolean>(props.autoFocus || isFocusVisible());\n\n createEffect(() => {\n const cleanup = createFocusVisibleListener(setIsVisible, { isTextInput: props.isTextInput });\n onCleanup(cleanup);\n });\n\n return { isFocusVisible: isVisible };\n}\n\n/**\n * Tracks the current interaction modality.\n */\nexport function createInteractionModality(): InteractionModalityResult {\n if (isServer) {\n return {\n modality: () => null,\n };\n }\n\n const [modality, setModality] = createSignal<Modality | null>(currentModality);\n\n createEffect(() => {\n setupGlobalFocusEvents();\n const handler: Handler = (newModality: Modality) => {\n setModality(newModality);\n };\n changeHandlers.add(handler);\n onCleanup(() => {\n changeHandlers.delete(handler);\n });\n });\n\n return {\n modality,\n };\n}\n\n/**\n * Adds a listener for modality changes.\n */\nexport function addModalityListener(handler: (modality: Modality) => void): () => void {\n const wrapped: Handler = (modality) => {\n handler(modality);\n };\n changeHandlers.add(wrapped);\n return () => {\n changeHandlers.delete(wrapped);\n };\n}\n\n/**\n * Hook to track whether the user is currently interacting with the keyboard.\n */\nexport function useIsKeyboardFocused(): Accessor<boolean> {\n if (isServer) {\n return () => false;\n }\n\n const { modality } = createInteractionModality();\n return () => modality() === \"keyboard\";\n}\n"],"mappings":";;;;;;;;;;;;AAoCA,IAAI,kBAAmC;AACvC,IAAI,qBAAkC;AACtC,MAAM,iCAAiB,IAAI,IAAa;AAExC,IAAW,0CAGP,IAAI,IAAI;AACZ,IAAI,sBAAsB;AAC1B,IAAI,2BAA2B;AAC/B,IAAI,mBAAmB;AAEvB,MAAM,2BAAoD;CACxD,KAAK;CACL,QAAQ;AACV;AAEA,SAAS,sBAAsB,UAAoB,GAAiB;CAClE,KAAK,MAAM,WAAW,gBACpB,QAAQ,UAAU,CAAC;AAEvB;AAEA,SAAS,WAAW,GAAkB;CACpC,OAAO,EACL,EAAE,WACD,CAAC,MAAM,KAAK,EAAE,UACf,EAAE,WACF,EAAE,QAAQ,aACV,EAAE,QAAQ,WACV,EAAE,QAAQ;AAEd;AAEA,SAAS,oBAAoB,GAAkB;CAC7C,sBAAsB;CAEtB,IAAI,CADe,SAAqC,aACtC,WAAW,CAAC,GAAG;EAC/B,kBAAkB;EAClB,qBAAqB;EACrB,sBAAsB,YAAY,CAAC;CACrC;AACF;AAEA,SAAS,mBAAmB,GAA8B;CACxD,kBAAkB;CAClB,qBAAqB,iBAAiB,IAAK,EAAE,cAA8B;CAC3E,IAAI,EAAE,SAAS,eAAe,EAAE,SAAS,eAAe;EACtD,sBAAsB;EACtB,sBAAsB,WAAW,CAAC;CACpC;AACF;AAEA,SAAS,iBAAiB,GAAe;CACvC,IAAI,CAAC,EAAE,WACL;CAIF,IAAI,CADe,SAAqC,aACtC,eAAe,CAAC,GAAG;EACnC,sBAAsB;EACtB,kBAAkB;EAClB,qBAAqB;CACvB;AACF;AAEA,SAAS,iBAAiB,GAAe;CACvC,IAAI,CAAC,EAAE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QAAQ,eAAe,CAAC;CAC1B;CACA,eAAe,IAAI,QAAQ;CAC3B,aAAa;EACX,eAAe,OAAO,QAAQ;CAChC;AACF;;;;AAKA,SAAgB,mBAAmB,QAA2B,CAAC,GAAuB;CACpF,IAAI,UACF,OAAO,EAAE,sBAAsB,MAAM;CAMvC,MAAM,CAAC,WAAW,gBAAgB,aAAsB,MAAM,aAAa,eAAe,CAAC;CAE3F,mBAAmB;EAEjB,UADgB,2BAA2B,cAAc,EAAE,aAAa,MAAM,YAAY,CAC1E,CAAC;CACnB,CAAC;CAED,OAAO,EAAE,gBAAgB,UAAU;AACrC;;;;AAKA,SAAgB,4BAAuD;CACrE,IAAI,UACF,OAAO,EACL,gBAAgB,KAClB;CAGF,MAAM,CAAC,UAAU,eAAe,aAA8B,eAAe;CAE7E,mBAAmB;EACjB,uBAAuB;EACvB,MAAM,WAAoB,gBAA0B;GAClD,YAAY,WAAW;EACzB;EACA,eAAe,IAAI,OAAO;EAC1B,gBAAgB;GACd,eAAe,OAAO,OAAO;EAC/B,CAAC;CACH,CAAC;CAED,OAAO,EACL,SACF;AACF;;;;AAKA,SAAgB,oBAAoB,SAAmD;CACrF,MAAM,WAAoB,aAAa;EACrC,QAAQ,QAAQ;CAClB;CACA,eAAe,IAAI,OAAO;CAC1B,aAAa;EACX,eAAe,OAAO,OAAO;CAC/B;AACF;;;;AAKA,SAAgB,uBAA0C;CACxD,IAAI,UACF,aAAa;CAGf,MAAM,EAAE,aAAa,0BAA0B;CAC/C,aAAa,SAAS,MAAM;AAC9B"}
1
+ {"version":3,"file":"createInteractionModality.jsx","names":[],"sources":["../../src/utils/events.ts","../../src/interactions/createInteractionModality.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/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/interactions/utils.ts\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/utils/chain.ts\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria/src/utils/isVirtualEvent.ts\n\n/**\n * Event utilities for detecting virtual clicks and event handling.\n * Based on these pinned React Aria sources:\n * - packages/react-aria/src/utils/isVirtualEvent.ts\n * - packages/react-aria/src/utils/chain.ts\n * - packages/react-aria/src/interactions/utils.ts\n *\n * createMouseEvent is a local event adapter.\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 // instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush\n // Talkback double tap from Windows Firefox touch screen press\n return (\n (!isAndroid() && event.width === 0 && event.height === 0) ||\n (isAndroid() &&\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 * 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/useFocusVisible.ts\n\n/**\n * createInteractionModality + focus-visible tracking for solidaria\n *\n * Port of @react-aria/interactions useFocusVisible/useInteractionModality.\n * Tracks the current interaction modality (keyboard, pointer, or virtual) and\n * provides focus-visible state and listeners.\n */\n\nimport { createSignal, createTrackedEffect } from \"solid-js\";\nimport type { Accessor } from \"solid-js\";\nimport { isServer } from \"@solidjs/web\";\nimport { getEventTarget, getOwnerDocument, getOwnerWindow, openLink } from \"../utils/dom\";\nimport { isVirtualClick } from \"../utils/events\";\nimport { isMac } from \"../utils/platform\";\n\nexport type Modality = \"keyboard\" | \"pointer\" | \"virtual\";\nexport type PointerType = \"mouse\" | \"pen\" | \"touch\" | \"keyboard\" | \"virtual\";\ntype HandlerEvent = PointerEvent | MouseEvent | KeyboardEvent | FocusEvent | null;\ntype Handler = (modality: Modality, e: HandlerEvent) => void;\n\nexport type FocusVisibleHandler = (isFocusVisible: boolean) => void;\n\nexport interface FocusVisibleProps {\n /** Whether the element is a text input. */\n isTextInput?: boolean;\n /** Whether the element will be auto focused. */\n autoFocus?: boolean;\n}\n\nexport interface FocusVisibleResult {\n /** Whether keyboard focus is visible globally. */\n isFocusVisible: Accessor<boolean>;\n}\n\nexport interface InteractionModalityResult {\n /** The current interaction modality. */\n modality: Accessor<Modality | null>;\n}\n\n// react-aria keeps `currentModality` in a module `let` that the same turn can\n// read (useFocusVisible.ts). `currentModalityValue` is that let: every read\n// returns it. The signal is a notification counter, not a copy of the word.\n// `writeModality` updates the let. `publishModality` updates the let and bumps\n// the counter. Bump where upstream calls `triggerChangeHandlers`\n// (keyboard, pointerdown/mousedown, virtual focus, setInteractionModality)\n// and on handleClickEvent's virtual write. That click handler\n// (useFocusVisible.ts:105-111) stays silent because React re-renders after\n// the click; #612 exists because Solid must notify instead. pointermove and\n// pointerup write the let only. Listener notification stays on\n// `triggerChangeHandlers`. `ownedWrite`: a module DOM listener and\n// `setInteractionModality` can write re-entrantly from an owned scope.\n// `untrack` stops tracking; it does not exempt the write.\nlet currentModalityValue: Modality | null = null;\nconst [modalityEpoch, bumpModalityEpoch] = createSignal(0, {\n ownedWrite: true,\n});\nlet currentPointerType: PointerType = \"keyboard\";\n\nfunction writeModality(next: Modality): void {\n currentModalityValue = next;\n}\n\nfunction publishModality(next: Modality): void {\n currentModalityValue = next;\n bumpModalityEpoch((n) => n + 1);\n}\n\nconst changeHandlers = new Set<Handler>();\n\nexport let hasSetupGlobalListeners: Map<\n Window,\n { focus: typeof window.HTMLElement.prototype.focus }\n> = new Map();\nlet hasEventBeforeFocus = false;\nlet hasBlurredWindowRecently = false;\n/** @private Set by `preventFocus` so programmatic refocus is not treated as a modality change. */\nexport let ignoreFocusEvent = false;\n\n/** @private */\nexport function setIgnoreFocusEvent(value: boolean): void {\n ignoreFocusEvent = value;\n}\n\nconst FOCUS_VISIBLE_INPUT_KEYS: Record<string, boolean> = {\n Tab: true,\n Escape: true,\n};\n\nfunction triggerChangeHandlers(modality: Modality, e: HandlerEvent) {\n for (const handler of changeHandlers) {\n handler(modality, e);\n }\n}\n\nfunction isValidKey(e: KeyboardEvent) {\n return !(\n e.metaKey ||\n (!isMac() && e.altKey) ||\n e.ctrlKey ||\n e.key === \"Control\" ||\n e.key === \"Shift\" ||\n e.key === \"Meta\"\n );\n}\n\nfunction handleKeyboardEvent(e: KeyboardEvent) {\n hasEventBeforeFocus = true;\n const isOpening = (openLink as { isOpening?: boolean }).isOpening;\n if (!isOpening && isValidKey(e)) {\n publishModality(\"keyboard\");\n currentPointerType = \"keyboard\";\n triggerChangeHandlers(\"keyboard\", e);\n }\n}\n\nfunction handlePointerEvent(e: PointerEvent | MouseEvent) {\n currentPointerType = \"pointerType\" in e ? (e.pointerType as PointerType) : \"mouse\";\n // useFocusVisible.ts:94-101. Move and up write the let. Down is the notify.\n if (e.type === \"mousedown\" || e.type === \"pointerdown\") {\n publishModality(\"pointer\");\n hasEventBeforeFocus = true;\n triggerChangeHandlers(\"pointer\", e);\n } else {\n writeModality(\"pointer\");\n }\n}\n\nfunction handleClickEvent(e: MouseEvent) {\n // react-aria 3.52.0 useFocusVisible.ts:105-111. No isTrusted guard and no\n // listener notification: keyboards, AT, and element.click() are virtual\n // clicks (detail === 0). React re-renders after the click, so that silent\n // write is enough there. Solid must notify tracked readers instead (#612).\n const isOpening = (openLink as { isOpening?: boolean }).isOpening;\n if (!isOpening && isVirtualClick(e)) {\n hasEventBeforeFocus = true;\n publishModality(\"virtual\");\n currentPointerType = \"virtual\";\n }\n}\n\nfunction handleFocusEvent(e: FocusEvent) {\n if (ignoreFocusEvent) {\n return;\n }\n\n const target = getEventTarget(e);\n const ownerWindow = getOwnerWindow(target);\n const ownerDocument = getOwnerDocument(target);\n\n // When the window regains focus, the browser restores focus to the element that was focused\n // before, firing a focus event the user did not initiate. handleWindowBlur sets\n // hasBlurredWindowRecently so restored focus doesn't switch to virtual modality below, but\n // Safari fires the window/element focus pair twice when returning to a tab or app and the first\n // element focus event clears the flag, so re-arm it whenever the window itself is focused.\n // Like handleWindowBlur, this intentionally doesn't check isTrusted.\n if (target === ownerWindow) {\n hasBlurredWindowRecently = true;\n return;\n }\n\n // Firefox fires two extra focus events when the user first clicks into an iframe:\n // first on the window, then on the document. We ignore these events so they don't\n // cause keyboard focus rings to appear.\n if (target === ownerDocument || !e.isTrusted) {\n return;\n }\n\n // If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.\n // This occurs, for example, when navigating a form with the next/previous buttons on iOS.\n if (!hasEventBeforeFocus && !hasBlurredWindowRecently) {\n publishModality(\"virtual\");\n currentPointerType = \"virtual\";\n triggerChangeHandlers(\"virtual\", e);\n }\n\n hasEventBeforeFocus = false;\n hasBlurredWindowRecently = false;\n}\n\nfunction handleWindowBlur() {\n if (ignoreFocusEvent) {\n return;\n }\n\n hasEventBeforeFocus = false;\n hasBlurredWindowRecently = true;\n}\n\nfunction setupGlobalFocusEvents(element?: HTMLElement | null) {\n if (typeof window === \"undefined\" || typeof document === \"undefined\") {\n return;\n }\n\n const windowObject = getOwnerWindow(element);\n if (hasSetupGlobalListeners.get(windowObject)) {\n return;\n }\n\n const documentObject = getOwnerDocument(element);\n\n // Programmatic focus() calls shouldn't affect the current input modality, so we\n // patch HTMLElement.prototype.focus to record that an event preceded the focus.\n // Use Reflect.defineProperty (not assignment) so this works even when `focus` is\n // currently a getter-only accessor — e.g. when a test library's setup() has\n // instrumented it. Plain assignment throws in that case; Reflect.defineProperty\n // returns false rather than throwing (and succeeds on the configurable prototype).\n const originalFocus = windowObject.HTMLElement.prototype.focus;\n Reflect.defineProperty(windowObject.HTMLElement.prototype, \"focus\", {\n configurable: true,\n writable: true,\n value: function () {\n hasEventBeforeFocus = true;\n originalFocus.apply(this, arguments as unknown as [options?: FocusOptions | undefined]);\n },\n });\n\n documentObject.addEventListener(\"keydown\", handleKeyboardEvent, true);\n documentObject.addEventListener(\"keyup\", handleKeyboardEvent, true);\n documentObject.addEventListener(\"click\", handleClickEvent, true);\n\n windowObject.addEventListener(\"focus\", handleFocusEvent, true);\n windowObject.addEventListener(\"blur\", handleWindowBlur, false);\n\n if (typeof windowObject.PointerEvent !== \"undefined\") {\n documentObject.addEventListener(\"pointerdown\", handlePointerEvent, true);\n documentObject.addEventListener(\"pointermove\", handlePointerEvent, true);\n documentObject.addEventListener(\"pointerup\", handlePointerEvent, true);\n } else {\n documentObject.addEventListener(\"mousedown\", handlePointerEvent, true);\n documentObject.addEventListener(\"mousemove\", handlePointerEvent, true);\n documentObject.addEventListener(\"mouseup\", handlePointerEvent, true);\n }\n\n windowObject.addEventListener(\n \"beforeunload\",\n () => {\n tearDownWindowFocusTracking(element);\n },\n { once: true },\n );\n\n hasSetupGlobalListeners.set(windowObject, { focus: originalFocus });\n}\n\nfunction tearDownWindowFocusTracking(element?: HTMLElement | null, loadListener?: () => void) {\n if (typeof window === \"undefined\" || typeof document === \"undefined\") {\n return;\n }\n\n const windowObject = getOwnerWindow(element);\n const documentObject = getOwnerDocument(element);\n\n if (loadListener) {\n documentObject.removeEventListener(\"DOMContentLoaded\", loadListener);\n }\n\n if (!hasSetupGlobalListeners.has(windowObject)) {\n return;\n }\n\n const entry = hasSetupGlobalListeners.get(windowObject)!;\n // Mirror the setup path: defineProperty (not assignment) restores the original\n // focus even if it had been replaced with a getter-only accessor.\n Reflect.defineProperty(windowObject.HTMLElement.prototype, \"focus\", {\n configurable: true,\n writable: true,\n value: entry.focus,\n });\n\n documentObject.removeEventListener(\"keydown\", handleKeyboardEvent, true);\n documentObject.removeEventListener(\"keyup\", handleKeyboardEvent, true);\n documentObject.removeEventListener(\"click\", handleClickEvent, true);\n\n windowObject.removeEventListener(\"focus\", handleFocusEvent, true);\n windowObject.removeEventListener(\"blur\", handleWindowBlur, false);\n\n if (typeof windowObject.PointerEvent !== \"undefined\") {\n documentObject.removeEventListener(\"pointerdown\", handlePointerEvent, true);\n documentObject.removeEventListener(\"pointermove\", handlePointerEvent, true);\n documentObject.removeEventListener(\"pointerup\", handlePointerEvent, true);\n } else {\n documentObject.removeEventListener(\"mousedown\", handlePointerEvent, true);\n documentObject.removeEventListener(\"mousemove\", handlePointerEvent, true);\n documentObject.removeEventListener(\"mouseup\", handlePointerEvent, true);\n }\n\n hasSetupGlobalListeners.delete(windowObject);\n}\n\n/**\n * Adds a window (i.e. iframe) to the list of windows that are being tracked for focus visible.\n */\nexport function addWindowFocusTracking(element?: HTMLElement | null): () => void {\n const documentObject = getOwnerDocument(element);\n let loadListener: (() => void) | undefined;\n\n if (documentObject.readyState !== \"loading\") {\n setupGlobalFocusEvents(element);\n } else {\n loadListener = () => {\n setupGlobalFocusEvents(element);\n };\n documentObject.addEventListener(\"DOMContentLoaded\", loadListener);\n }\n\n return () => tearDownWindowFocusTracking(element, loadListener);\n}\n\nexport function setupGlobalFocusListeners(): void {\n addWindowFocusTracking();\n}\n\nif (typeof document !== \"undefined\") {\n addWindowFocusTracking();\n}\n\nfunction focusVisibleSnapshot(): boolean {\n return currentModalityValue !== \"pointer\";\n}\n\n/**\n * If true, keyboard focus is visible. The only tracked read of modality:\n * useOption's render predicate re-reads this on every render.\n */\nexport function isFocusVisible(): boolean {\n modalityEpoch();\n return focusVisibleSnapshot();\n}\n\n/**\n * Gets the current interaction modality.\n * The module let, not the signal. An effect that calls this does not re-run\n * when modality changes; upstream's query is a plain variable.\n */\nexport function getInteractionModality(): Modality | null {\n return currentModalityValue;\n}\n\n/**\n * Sets the current interaction modality.\n */\nexport function setInteractionModality(modality: Modality): void {\n publishModality(modality);\n currentPointerType = modality === \"pointer\" ? \"mouse\" : modality;\n triggerChangeHandlers(modality, null);\n}\n\n/**\n * Gets the current pointer type. Separate from modality; this let is never\n * the modality signal.\n */\nexport function getPointerType(): PointerType {\n return currentPointerType;\n}\n\nfunction isKeyboardFocusEvent(isTextInput: boolean, modality: Modality, e: HandlerEvent): boolean {\n if (!e) {\n return true;\n }\n\n const target = \"target\" in e ? (e.target as Element | null) : null;\n const ownerDocument = target ? getOwnerDocument(target) : document;\n const ownerWindow = target ? getOwnerWindow(target) : window;\n\n const IHTMLInputElement = ownerWindow.HTMLInputElement;\n const IHTMLTextAreaElement = ownerWindow.HTMLTextAreaElement;\n const IHTMLElement = ownerWindow.HTMLElement;\n const IKeyboardEvent = ownerWindow.KeyboardEvent;\n\n const nonTextInputTypes = new Set([\n \"checkbox\",\n \"radio\",\n \"range\",\n \"color\",\n \"file\",\n \"image\",\n \"button\",\n \"submit\",\n \"reset\",\n ]);\n\n isTextInput =\n isTextInput ||\n (ownerDocument.activeElement instanceof IHTMLInputElement &&\n !nonTextInputTypes.has(ownerDocument.activeElement.type)) ||\n ownerDocument.activeElement instanceof IHTMLTextAreaElement ||\n (ownerDocument.activeElement instanceof IHTMLElement &&\n ownerDocument.activeElement.isContentEditable);\n\n return !(\n isTextInput &&\n modality === \"keyboard\" &&\n e instanceof IKeyboardEvent &&\n !FOCUS_VISIBLE_INPUT_KEYS[e.key]\n );\n}\n\n/**\n * Listens for trigger change and reports if focus is visible.\n */\nexport function createFocusVisibleListener(\n handler: FocusVisibleHandler,\n opts?: { isTextInput?: boolean; enabled?: boolean },\n): () => void {\n setupGlobalFocusEvents();\n if (opts?.enabled === false) {\n return () => {};\n }\n const listener: Handler = (modality: Modality, e: HandlerEvent) => {\n if (!isKeyboardFocusEvent(!!opts?.isTextInput, modality, e)) {\n return;\n }\n // Upstream's listener read is a plain variable (useFocusVisible.ts:424); the listener runs synchronously inside setInteractionModality, which an effect may call.\n handler(focusVisibleSnapshot());\n };\n changeHandlers.add(listener);\n return () => {\n changeHandlers.delete(listener);\n };\n}\n\n/**\n * Manages focus visible state for the page.\n */\nexport function createFocusVisible(props: FocusVisibleProps = {}): FocusVisibleResult {\n // autoFocus seeds the initial value once; isTextInput is read inside the effect\n // so it re-subscribes reactively (a top-level destructure would freeze it — the\n // body runs once). Mirrors upstream useFocusVisible's [isTextInput] dep.\n // The let, not isFocusVisible(). During hydration that signal can still hold\n // an unflushed write; reading it markLateLinker's the computing owner\n // (REACTIVE_MISSED_WAKE) and the surrounding memo re-runs, so the second\n // span misses its hydration key. The let is the same answer, written\n // synchronously.\n const [isVisible, setIsVisible] = createSignal<boolean>(\n isServer ? false : props.autoFocus || focusVisibleSnapshot(),\n );\n\n // Reserve the effect owner during SSR too; its callback runs only on client.\n createTrackedEffect(() => {\n const _s2Cleanups: Array<() => void> = [];\n\n const cleanup = createFocusVisibleListener(setIsVisible, { isTextInput: props.isTextInput });\n _s2Cleanups.push(cleanup);\n\n return () => {\n for (const c of _s2Cleanups) c();\n };\n });\n\n return { isFocusVisible: isVisible };\n}\n\n/**\n * Tracks the current interaction modality.\n */\nexport function createInteractionModality(): InteractionModalityResult {\n const [modality, setModality] = createSignal<Modality | null>(\n isServer ? null : currentModalityValue,\n );\n\n // Register the owner on both sides; only the browser subscribes to events.\n createTrackedEffect(() => {\n if (isServer) return;\n const _s2Cleanups: Array<() => void> = [];\n\n setupGlobalFocusEvents();\n const handler: Handler = (newModality: Modality) => {\n setModality(newModality);\n };\n changeHandlers.add(handler);\n _s2Cleanups.push(() => {\n changeHandlers.delete(handler);\n });\n\n return () => {\n for (const c of _s2Cleanups) c();\n };\n });\n\n return {\n modality,\n };\n}\n\n/**\n * Adds a listener for modality changes.\n */\nexport function addModalityListener(handler: (modality: Modality) => void): () => void {\n const wrapped: Handler = (modality) => {\n handler(modality);\n };\n changeHandlers.add(wrapped);\n return () => {\n changeHandlers.delete(wrapped);\n };\n}\n\n/**\n * Hook to track whether the user is currently interacting with the keyboard.\n */\nexport function useIsKeyboardFocused(): Accessor<boolean> {\n const { modality } = createInteractionModality();\n return () => modality() === \"keyboard\";\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,SAAgB,eAAe,OAA2C;CAExE,IAAK,MAAuB,gBAAgB,MAAM,MAAM,WACtD,OAAO;CAKT,IAAI,UAAU,KAAM,MAAuB,aACzC,OAAO,MAAM,SAAS,WAAY,MAAqB,YAAY;CAGrE,OAAO,MAAM,WAAW,KAAK,CAAE,MAAuB;AACxD;;;;;;AAOA,SAAgB,sBAAsB,OAA8B;CAOlE,OACG,CAAC,UAAU,KAAK,MAAM,UAAU,KAAK,MAAM,WAAW,KACtD,UAAU,KACT,MAAM,UAAU,KAChB,MAAM,WAAW,KACjB,MAAM,aAAa,KACnB,MAAM,WAAW,KACjB,MAAM,gBAAgB;AAE5B;;;;AAKA,SAAgB,iBAAiB,MAAc,aAAiC;CAC9E,MAAM,OAAuB;EAC3B,SAAS;EACT,YAAY;EACZ,MAAM;CACR;CAGA,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aAAa,EAAE;EACjC;CACF,CAAC;CAED,OAAO,EAAE,gBAAgB,UAAU;AACrC;;;;AAKA,SAAgB,4BAAuD;CACrE,MAAM,CAAC,UAAU,eAAe,aAC9B,WAAW,OAAO,oBACpB;CAGA,0BAA0B;EACxB,IAAI,UAAU;EACd,MAAM,cAAiC,CAAC;EAExC,uBAAuB;EACvB,MAAM,WAAoB,gBAA0B;GAClD,YAAY,WAAW;EACzB;EACA,eAAe,IAAI,OAAO;EAC1B,YAAY,WAAW;GACrB,eAAe,OAAO,OAAO;EAC/B,CAAC;EAED,aAAa;GACX,KAAK,MAAM,KAAK,aAAa,EAAE;EACjC;CACF,CAAC;CAED,OAAO,EACL,SACF;AACF;;;;AAKA,SAAgB,oBAAoB,SAAmD;CACrF,MAAM,WAAoB,aAAa;EACrC,QAAQ,QAAQ;CAClB;CACA,eAAe,IAAI,OAAO;CAC1B,aAAa;EACX,eAAe,OAAO,OAAO;CAC/B;AACF;;;;AAKA,SAAgB,uBAA0C;CACxD,MAAM,EAAE,aAAa,0BAA0B;CAC/C,aAAa,SAAS,MAAM;AAC9B"}
@@ -0,0 +1,206 @@
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/interactions/useKeyboard.ts
13
+ /*
14
+ * Copyright 2025 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/interactions/createKeyboardShortcutHandler.ts
25
+ import { t as access } from "./reactivity.js";
26
+ import { F as isMac, r as eventPathContains } from "./dom.js";
27
+ import { p as chain } from "./createInteractionModality.js";
28
+ //#region src/interactions/createKeyboardShortcutHandler.ts
29
+ /**
30
+ * Keyboard shortcut parsing and exact-match dispatch.
31
+ *
32
+ * Port of React Aria's createKeyboardShortcutHandler.
33
+ */
34
+ const modifierNames = /* @__PURE__ */ new Set([
35
+ "shift",
36
+ "alt",
37
+ "control",
38
+ "meta",
39
+ "mod"
40
+ ]);
41
+ const canonicalModifierOrder = [
42
+ "Alt",
43
+ "Control",
44
+ "Meta",
45
+ "Shift"
46
+ ];
47
+ function modifierSetFromParsed(parsed) {
48
+ const modifiers = /* @__PURE__ */ new Set();
49
+ if (parsed.alt) modifiers.add("Alt");
50
+ if (parsed.shift) modifiers.add("Shift");
51
+ if (parsed.ctrl) modifiers.add("Control");
52
+ if (parsed.meta) modifiers.add("Meta");
53
+ if (parsed.mod) modifiers.add(isMac() ? "Meta" : "Control");
54
+ return modifiers;
55
+ }
56
+ function modifierSetFromEvent(event) {
57
+ const modifiers = /* @__PURE__ */ new Set();
58
+ if (event.altKey) modifiers.add("Alt");
59
+ if (event.ctrlKey) modifiers.add("Control");
60
+ if (event.metaKey) modifiers.add("Meta");
61
+ if (event.shiftKey) modifiers.add("Shift");
62
+ return modifiers;
63
+ }
64
+ function sortedModifierTokens(modifiers) {
65
+ return canonicalModifierOrder.filter((name) => modifiers.has(name));
66
+ }
67
+ /** Parses a shortcut. Modifier names are case-insensitive and order-independent. */
68
+ function parseKeyboardShortcut(specification) {
69
+ const parsed = specification.split("+").reduce((result, part) => {
70
+ const lowerPart = part.toLowerCase();
71
+ if (modifierNames.has(lowerPart)) {
72
+ if (lowerPart === "shift") result.shift = true;
73
+ else if (lowerPart === "alt") result.alt = true;
74
+ else if (lowerPart === "control") result.ctrl = true;
75
+ else if (lowerPart === "meta") result.meta = true;
76
+ else if (lowerPart === "mod") result.mod = true;
77
+ } else result.key = part;
78
+ return result;
79
+ }, {
80
+ shift: false,
81
+ alt: false,
82
+ ctrl: false,
83
+ meta: false,
84
+ mod: false,
85
+ key: ""
86
+ });
87
+ if (parsed.key === "") throw new Error(`Invalid keyboard shortcut: "${specification}". Must include exactly one non-modifier key (e.g. "a", "Enter", "ArrowDown"). Combine any of Shift, Alt, Ctrl, Meta, and Mod.`);
88
+ return parsed;
89
+ }
90
+ function normalizeEventKey(key) {
91
+ return key.toLowerCase();
92
+ }
93
+ const keyAliases = {
94
+ space: " ",
95
+ esc: "escape",
96
+ del: "delete",
97
+ ins: "insert",
98
+ left: "arrowleft",
99
+ right: "arrowright",
100
+ up: "arrowup",
101
+ down: "arrowdown",
102
+ pageup: "pageup",
103
+ pagedown: "pagedown"
104
+ };
105
+ function canonicalKeyFromSpecification(key) {
106
+ const normalizedKey = normalizeEventKey(key);
107
+ return keyAliases[normalizedKey] ?? normalizedKey;
108
+ }
109
+ function canonicalKeyboardShortcut(parsed) {
110
+ const modifiers = sortedModifierTokens(modifierSetFromParsed(parsed));
111
+ const key = canonicalKeyFromSpecification(parsed.key);
112
+ return modifiers.length > 0 ? `${modifiers.join("+")}+${key}` : key;
113
+ }
114
+ function keyboardEventToCanonicalShortcut(event) {
115
+ const modifiers = sortedModifierTokens(modifierSetFromEvent(event));
116
+ const key = normalizeEventKey(event.key);
117
+ return modifiers.length > 0 ? `${modifiers.join("+")}+${key}` : key;
118
+ }
119
+ /** Returns a keydown handler that runs an action for an exact shortcut match. */
120
+ function createKeyboardShortcutHandler(bindings) {
121
+ const actions = /* @__PURE__ */ new Map();
122
+ for (const [specification, action] of Object.entries(bindings)) actions.set(canonicalKeyboardShortcut(parseKeyboardShortcut(specification)), action);
123
+ return (event) => {
124
+ const action = actions.get(keyboardEventToCanonicalShortcut(event));
125
+ let result = action?.(event);
126
+ if (result === void 0 && action !== void 0) result = {
127
+ shouldContinuePropagation: false,
128
+ shouldPreventDefault: true
129
+ };
130
+ else if (typeof result === "boolean") result = {
131
+ shouldContinuePropagation: !result,
132
+ shouldPreventDefault: result
133
+ };
134
+ if (result?.shouldPreventDefault) event.preventDefault();
135
+ if (!action || result?.shouldContinuePropagation) event.continuePropagation();
136
+ };
137
+ }
138
+ //#endregion
139
+ //#region src/interactions/createKeyboard.ts
140
+ /**
141
+ * Wraps a keyboard event handler to make stopPropagation the default,
142
+ * and support continuePropagation instead.
143
+ */
144
+ function createEventHandler(handler) {
145
+ if (!handler) return;
146
+ return (e) => {
147
+ let shouldStopPropagation = true;
148
+ const parentContinuePropagation = e.continuePropagation;
149
+ handler(Object.assign(e, { continuePropagation() {
150
+ shouldStopPropagation = false;
151
+ if (typeof parentContinuePropagation === "function") parentContinuePropagation.call(e);
152
+ } }));
153
+ if (shouldStopPropagation) e.stopPropagation();
154
+ };
155
+ }
156
+ /**
157
+ * Handles keyboard interactions for a focusable element.
158
+ *
159
+ * Based on react-aria's useKeyboard but adapted for SolidJS.
160
+ */
161
+ function createKeyboard(props = {}) {
162
+ let onKeyDown;
163
+ let onKeyUp;
164
+ if (props.shortcuts) {
165
+ const shortcutHandler = createKeyboardShortcutHandler(props.shortcuts);
166
+ const shortcutOnKeyDown = createEventHandler((event) => {
167
+ if (!eventPathContains(event.currentTarget, event)) {
168
+ event.continuePropagation();
169
+ return;
170
+ }
171
+ if (event.repeat && !(props.allowRepeats ?? false) || event.isComposing && !(props.allowComposing ?? false)) {
172
+ event.continuePropagation();
173
+ return;
174
+ }
175
+ shortcutHandler(event);
176
+ });
177
+ const shortcutOnKeyUp = createEventHandler((event) => {
178
+ if (!eventPathContains(event.currentTarget, event)) {
179
+ event.continuePropagation();
180
+ return;
181
+ }
182
+ if (event.repeat && !(props.allowRepeats ?? false) || event.isComposing && !(props.allowComposing ?? false)) {
183
+ event.continuePropagation();
184
+ return;
185
+ }
186
+ event.continuePropagation();
187
+ });
188
+ onKeyDown = props.onKeyDown ? chain(props.onKeyDown, shortcutOnKeyDown) : shortcutOnKeyDown;
189
+ onKeyUp = props.onKeyUp ? chain(props.onKeyUp, shortcutOnKeyUp) : shortcutOnKeyUp;
190
+ } else {
191
+ onKeyDown = createEventHandler(props.onKeyDown);
192
+ onKeyUp = createEventHandler(props.onKeyUp);
193
+ }
194
+ return { keyboardProps: {
195
+ get onKeyDown() {
196
+ return access(props.isDisabled) ? void 0 : onKeyDown;
197
+ },
198
+ get onKeyUp() {
199
+ return access(props.isDisabled) ? void 0 : onKeyUp;
200
+ }
201
+ } };
202
+ }
203
+ //#endregion
204
+ export { createKeyboard as t };
205
+
206
+ //# sourceMappingURL=createKeyboard.js.map