@proyecto-viviana/solidaria 0.2.0 → 0.2.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 (387) hide show
  1. package/dist/autocomplete/createAutocomplete.d.ts +109 -0
  2. package/dist/autocomplete/createAutocomplete.d.ts.map +1 -0
  3. package/dist/autocomplete/index.d.ts +2 -0
  4. package/dist/autocomplete/index.d.ts.map +1 -0
  5. package/dist/breadcrumbs/createBreadcrumbs.d.ts +43 -0
  6. package/dist/breadcrumbs/createBreadcrumbs.d.ts.map +1 -0
  7. package/dist/breadcrumbs/index.d.ts +2 -0
  8. package/dist/breadcrumbs/index.d.ts.map +1 -0
  9. package/dist/button/createButton.d.ts +29 -0
  10. package/dist/button/createButton.d.ts.map +1 -0
  11. package/dist/button/createToggleButton.d.ts +41 -0
  12. package/dist/button/createToggleButton.d.ts.map +1 -0
  13. package/dist/button/index.d.ts +5 -0
  14. package/dist/button/index.d.ts.map +1 -0
  15. package/dist/button/types.d.ts +77 -0
  16. package/dist/button/types.d.ts.map +1 -0
  17. package/dist/calendar/createCalendar.d.ts +41 -0
  18. package/dist/calendar/createCalendar.d.ts.map +1 -0
  19. package/dist/calendar/createCalendarCell.d.ts +41 -0
  20. package/dist/calendar/createCalendarCell.d.ts.map +1 -0
  21. package/dist/calendar/createCalendarGrid.d.ts +29 -0
  22. package/dist/calendar/createCalendarGrid.d.ts.map +1 -0
  23. package/dist/calendar/createRangeCalendar.d.ts +39 -0
  24. package/dist/calendar/createRangeCalendar.d.ts.map +1 -0
  25. package/dist/calendar/createRangeCalendarCell.d.ts +45 -0
  26. package/dist/calendar/createRangeCalendarCell.d.ts.map +1 -0
  27. package/dist/calendar/index.d.ts +6 -0
  28. package/dist/calendar/index.d.ts.map +1 -0
  29. package/dist/checkbox/createCheckbox.d.ts +56 -0
  30. package/dist/checkbox/createCheckbox.d.ts.map +1 -0
  31. package/dist/checkbox/createCheckboxGroup.d.ts +53 -0
  32. package/dist/checkbox/createCheckboxGroup.d.ts.map +1 -0
  33. package/dist/checkbox/createCheckboxGroupItem.d.ts +25 -0
  34. package/dist/checkbox/createCheckboxGroupItem.d.ts.map +1 -0
  35. package/dist/checkbox/createCheckboxGroupState.d.ts +71 -0
  36. package/dist/checkbox/createCheckboxGroupState.d.ts.map +1 -0
  37. package/dist/checkbox/index.d.ts +9 -0
  38. package/dist/checkbox/index.d.ts.map +1 -0
  39. package/dist/color/createColorArea.d.ts +13 -0
  40. package/dist/color/createColorArea.d.ts.map +1 -0
  41. package/dist/color/createColorField.d.ts +13 -0
  42. package/dist/color/createColorField.d.ts.map +1 -0
  43. package/dist/color/createColorSlider.d.ts +13 -0
  44. package/dist/color/createColorSlider.d.ts.map +1 -0
  45. package/dist/color/createColorSwatch.d.ts +12 -0
  46. package/dist/color/createColorSwatch.d.ts.map +1 -0
  47. package/dist/color/createColorWheel.d.ts +13 -0
  48. package/dist/color/createColorWheel.d.ts.map +1 -0
  49. package/dist/color/index.d.ts +10 -0
  50. package/dist/color/index.d.ts.map +1 -0
  51. package/dist/color/types.d.ts +106 -0
  52. package/dist/color/types.d.ts.map +1 -0
  53. package/dist/combobox/createComboBox.d.ts +77 -0
  54. package/dist/combobox/createComboBox.d.ts.map +1 -0
  55. package/dist/combobox/index.d.ts +2 -0
  56. package/dist/combobox/index.d.ts.map +1 -0
  57. package/dist/combobox/intl/index.d.ts +14 -0
  58. package/dist/combobox/intl/index.d.ts.map +1 -0
  59. package/dist/datepicker/createDateField.d.ts +51 -0
  60. package/dist/datepicker/createDateField.d.ts.map +1 -0
  61. package/dist/datepicker/createDatePicker.d.ts +65 -0
  62. package/dist/datepicker/createDatePicker.d.ts.map +1 -0
  63. package/dist/datepicker/createDateSegment.d.ts +29 -0
  64. package/dist/datepicker/createDateSegment.d.ts.map +1 -0
  65. package/dist/datepicker/createTimeField.d.ts +51 -0
  66. package/dist/datepicker/createTimeField.d.ts.map +1 -0
  67. package/dist/datepicker/index.d.ts +5 -0
  68. package/dist/datepicker/index.d.ts.map +1 -0
  69. package/dist/dialog/createDialog.d.ts +25 -0
  70. package/dist/dialog/createDialog.d.ts.map +1 -0
  71. package/dist/dialog/index.d.ts +3 -0
  72. package/dist/dialog/index.d.ts.map +1 -0
  73. package/dist/dialog/types.d.ts +18 -0
  74. package/dist/dialog/types.d.ts.map +1 -0
  75. package/dist/disclosure/createDisclosure.d.ts +52 -0
  76. package/dist/disclosure/createDisclosure.d.ts.map +1 -0
  77. package/dist/disclosure/createDisclosureGroup.d.ts +39 -0
  78. package/dist/disclosure/createDisclosureGroup.d.ts.map +1 -0
  79. package/dist/disclosure/index.d.ts +3 -0
  80. package/dist/disclosure/index.d.ts.map +1 -0
  81. package/dist/dnd/createDrag.d.ts +16 -0
  82. package/dist/dnd/createDrag.d.ts.map +1 -0
  83. package/dist/dnd/createDraggableCollection.d.ts +27 -0
  84. package/dist/dnd/createDraggableCollection.d.ts.map +1 -0
  85. package/dist/dnd/createDraggableItem.d.ts +37 -0
  86. package/dist/dnd/createDraggableItem.d.ts.map +1 -0
  87. package/dist/dnd/createDrop.d.ts +16 -0
  88. package/dist/dnd/createDrop.d.ts.map +1 -0
  89. package/dist/dnd/createDroppableCollection.d.ts +76 -0
  90. package/dist/dnd/createDroppableCollection.d.ts.map +1 -0
  91. package/dist/dnd/createDroppableItem.d.ts +31 -0
  92. package/dist/dnd/createDroppableItem.d.ts.map +1 -0
  93. package/dist/dnd/index.d.ts +18 -0
  94. package/dist/dnd/index.d.ts.map +1 -0
  95. package/dist/dnd/types.d.ts +66 -0
  96. package/dist/dnd/types.d.ts.map +1 -0
  97. package/dist/dnd/utils.d.ts +57 -0
  98. package/dist/dnd/utils.d.ts.map +1 -0
  99. package/dist/focus/FocusScope.d.ts +57 -0
  100. package/dist/focus/FocusScope.d.ts.map +1 -0
  101. package/dist/focus/createAutoFocus.d.ts +120 -0
  102. package/dist/focus/createAutoFocus.d.ts.map +1 -0
  103. package/dist/focus/createFocusRestore.d.ts +116 -0
  104. package/dist/focus/createFocusRestore.d.ts.map +1 -0
  105. package/dist/focus/createVirtualFocus.d.ts +170 -0
  106. package/dist/focus/createVirtualFocus.d.ts.map +1 -0
  107. package/dist/focus/index.d.ts +5 -0
  108. package/dist/focus/index.d.ts.map +1 -0
  109. package/dist/form/createFormReset.d.ts +27 -0
  110. package/dist/form/createFormReset.d.ts.map +1 -0
  111. package/dist/form/createFormValidation.d.ts +56 -0
  112. package/dist/form/createFormValidation.d.ts.map +1 -0
  113. package/dist/form/index.d.ts +3 -0
  114. package/dist/form/index.d.ts.map +1 -0
  115. package/dist/grid/GridKeyboardDelegate.d.ts +79 -0
  116. package/dist/grid/GridKeyboardDelegate.d.ts.map +1 -0
  117. package/dist/grid/createGrid.d.ts +24 -0
  118. package/dist/grid/createGrid.d.ts.map +1 -0
  119. package/dist/grid/createGridCell.d.ts +12 -0
  120. package/dist/grid/createGridCell.d.ts.map +1 -0
  121. package/dist/grid/createGridRow.d.ts +12 -0
  122. package/dist/grid/createGridRow.d.ts.map +1 -0
  123. package/dist/grid/index.d.ts +10 -0
  124. package/dist/grid/index.d.ts.map +1 -0
  125. package/dist/grid/types.d.ts +126 -0
  126. package/dist/grid/types.d.ts.map +1 -0
  127. package/dist/gridlist/createGridList.d.ts +28 -0
  128. package/dist/gridlist/createGridList.d.ts.map +1 -0
  129. package/dist/gridlist/createGridListItem.d.ts +12 -0
  130. package/dist/gridlist/createGridListItem.d.ts.map +1 -0
  131. package/dist/gridlist/createGridListSelectionCheckbox.d.ts +12 -0
  132. package/dist/gridlist/createGridListSelectionCheckbox.d.ts.map +1 -0
  133. package/dist/gridlist/index.d.ts +8 -0
  134. package/dist/gridlist/index.d.ts.map +1 -0
  135. package/dist/gridlist/types.d.ts +75 -0
  136. package/dist/gridlist/types.d.ts.map +1 -0
  137. package/dist/i18n/NumberFormatter.d.ts +43 -0
  138. package/dist/i18n/NumberFormatter.d.ts.map +1 -0
  139. package/dist/i18n/createCollator.d.ts +41 -0
  140. package/dist/i18n/createCollator.d.ts.map +1 -0
  141. package/dist/i18n/createDateFormatter.d.ts +45 -0
  142. package/dist/i18n/createDateFormatter.d.ts.map +1 -0
  143. package/dist/i18n/createFilter.d.ts +57 -0
  144. package/dist/i18n/createFilter.d.ts.map +1 -0
  145. package/dist/i18n/createNumberFormatter.d.ts +43 -0
  146. package/dist/i18n/createNumberFormatter.d.ts.map +1 -0
  147. package/dist/i18n/createStringFormatter.d.ts +42 -0
  148. package/dist/i18n/createStringFormatter.d.ts.map +1 -0
  149. package/dist/i18n/index.d.ts +9 -0
  150. package/dist/i18n/index.d.ts.map +1 -0
  151. package/dist/i18n/locale.d.ts +66 -0
  152. package/dist/i18n/locale.d.ts.map +1 -0
  153. package/dist/i18n/utils.d.ts +17 -0
  154. package/dist/i18n/utils.d.ts.map +1 -0
  155. package/dist/index.d.ts +50 -6135
  156. package/dist/index.d.ts.map +1 -0
  157. package/dist/index.js +1120 -485
  158. package/dist/index.js.map +7 -0
  159. package/dist/{index.jsx → index.ssr.js} +143 -89
  160. package/dist/index.ssr.js.map +7 -0
  161. package/dist/interactions/FocusableProvider.d.ts +26 -0
  162. package/dist/interactions/FocusableProvider.d.ts.map +1 -0
  163. package/dist/interactions/PressEvent.d.ts +73 -0
  164. package/dist/interactions/PressEvent.d.ts.map +1 -0
  165. package/dist/interactions/createFocus.d.ts +31 -0
  166. package/dist/interactions/createFocus.d.ts.map +1 -0
  167. package/dist/interactions/createFocusRing.d.ts +37 -0
  168. package/dist/interactions/createFocusRing.d.ts.map +1 -0
  169. package/dist/interactions/createFocusWithin.d.ts +27 -0
  170. package/dist/interactions/createFocusWithin.d.ts.map +1 -0
  171. package/dist/interactions/createFocusable.d.ts +65 -0
  172. package/dist/interactions/createFocusable.d.ts.map +1 -0
  173. package/dist/interactions/createHover.d.ts +43 -0
  174. package/dist/interactions/createHover.d.ts.map +1 -0
  175. package/dist/interactions/createInteractionModality.d.ts +73 -0
  176. package/dist/interactions/createInteractionModality.d.ts.map +1 -0
  177. package/dist/interactions/createKeyboard.d.ts +35 -0
  178. package/dist/interactions/createKeyboard.d.ts.map +1 -0
  179. package/dist/interactions/createLongPress.d.ts +63 -0
  180. package/dist/interactions/createLongPress.d.ts.map +1 -0
  181. package/dist/interactions/createMove.d.ts +40 -0
  182. package/dist/interactions/createMove.d.ts.map +1 -0
  183. package/dist/interactions/createPress.d.ts +55 -0
  184. package/dist/interactions/createPress.d.ts.map +1 -0
  185. package/dist/interactions/index.d.ts +13 -0
  186. package/dist/interactions/index.d.ts.map +1 -0
  187. package/dist/label/createField.d.ts +51 -0
  188. package/dist/label/createField.d.ts.map +1 -0
  189. package/dist/label/createLabel.d.ts +49 -0
  190. package/dist/label/createLabel.d.ts.map +1 -0
  191. package/dist/label/createLabels.d.ts +16 -0
  192. package/dist/label/createLabels.d.ts.map +1 -0
  193. package/dist/label/index.d.ts +6 -0
  194. package/dist/label/index.d.ts.map +1 -0
  195. package/dist/landmark/createLandmark.d.ts +79 -0
  196. package/dist/landmark/createLandmark.d.ts.map +1 -0
  197. package/dist/landmark/index.d.ts +2 -0
  198. package/dist/landmark/index.d.ts.map +1 -0
  199. package/dist/link/createLink.d.ts +65 -0
  200. package/dist/link/createLink.d.ts.map +1 -0
  201. package/dist/link/index.d.ts +2 -0
  202. package/dist/link/index.d.ts.map +1 -0
  203. package/dist/listbox/createListBox.d.ts +58 -0
  204. package/dist/listbox/createListBox.d.ts.map +1 -0
  205. package/dist/listbox/createOption.d.ts +42 -0
  206. package/dist/listbox/createOption.d.ts.map +1 -0
  207. package/dist/listbox/index.d.ts +3 -0
  208. package/dist/listbox/index.d.ts.map +1 -0
  209. package/dist/live-announcer/announce.d.ts +113 -0
  210. package/dist/live-announcer/announce.d.ts.map +1 -0
  211. package/dist/live-announcer/index.d.ts +2 -0
  212. package/dist/live-announcer/index.d.ts.map +1 -0
  213. package/dist/menu/createMenu.d.ts +57 -0
  214. package/dist/menu/createMenu.d.ts.map +1 -0
  215. package/dist/menu/createMenuItem.d.ts +42 -0
  216. package/dist/menu/createMenuItem.d.ts.map +1 -0
  217. package/dist/menu/createMenuTrigger.d.ts +29 -0
  218. package/dist/menu/createMenuTrigger.d.ts.map +1 -0
  219. package/dist/menu/index.d.ts +4 -0
  220. package/dist/menu/index.d.ts.map +1 -0
  221. package/dist/meter/createMeter.d.ts +44 -0
  222. package/dist/meter/createMeter.d.ts.map +1 -0
  223. package/dist/meter/index.d.ts +2 -0
  224. package/dist/meter/index.d.ts.map +1 -0
  225. package/dist/numberfield/createNumberField.d.ts +56 -0
  226. package/dist/numberfield/createNumberField.d.ts.map +1 -0
  227. package/dist/numberfield/index.d.ts +2 -0
  228. package/dist/numberfield/index.d.ts.map +1 -0
  229. package/dist/overlays/ariaHideOutside.d.ts +25 -0
  230. package/dist/overlays/ariaHideOutside.d.ts.map +1 -0
  231. package/dist/overlays/createInteractOutside.d.ts +20 -0
  232. package/dist/overlays/createInteractOutside.d.ts.map +1 -0
  233. package/dist/overlays/createModal.d.ts +70 -0
  234. package/dist/overlays/createModal.d.ts.map +1 -0
  235. package/dist/overlays/createOverlay.d.ts +43 -0
  236. package/dist/overlays/createOverlay.d.ts.map +1 -0
  237. package/dist/overlays/createOverlayTrigger.d.ts +30 -0
  238. package/dist/overlays/createOverlayTrigger.d.ts.map +1 -0
  239. package/dist/overlays/createPreventScroll.d.ts +15 -0
  240. package/dist/overlays/createPreventScroll.d.ts.map +1 -0
  241. package/dist/overlays/index.d.ts +7 -0
  242. package/dist/overlays/index.d.ts.map +1 -0
  243. package/dist/popover/calculatePosition.d.ts +67 -0
  244. package/dist/popover/calculatePosition.d.ts.map +1 -0
  245. package/dist/popover/createOverlayPosition.d.ts +109 -0
  246. package/dist/popover/createOverlayPosition.d.ts.map +1 -0
  247. package/dist/popover/createPopover.d.ts +88 -0
  248. package/dist/popover/createPopover.d.ts.map +1 -0
  249. package/dist/popover/index.d.ts +4 -0
  250. package/dist/popover/index.d.ts.map +1 -0
  251. package/dist/progress/createProgressBar.d.ts +47 -0
  252. package/dist/progress/createProgressBar.d.ts.map +1 -0
  253. package/dist/progress/index.d.ts +2 -0
  254. package/dist/progress/index.d.ts.map +1 -0
  255. package/dist/radio/createRadio.d.ts +68 -0
  256. package/dist/radio/createRadio.d.ts.map +1 -0
  257. package/dist/radio/createRadioGroup.d.ts +85 -0
  258. package/dist/radio/createRadioGroup.d.ts.map +1 -0
  259. package/dist/radio/createRadioGroupState.d.ts +77 -0
  260. package/dist/radio/createRadioGroupState.d.ts.map +1 -0
  261. package/dist/radio/index.d.ts +4 -0
  262. package/dist/radio/index.d.ts.map +1 -0
  263. package/dist/searchfield/createSearchField.d.ts +32 -0
  264. package/dist/searchfield/createSearchField.d.ts.map +1 -0
  265. package/dist/searchfield/index.d.ts +3 -0
  266. package/dist/searchfield/index.d.ts.map +1 -0
  267. package/dist/select/createHiddenSelect.d.ts +69 -0
  268. package/dist/select/createHiddenSelect.d.ts.map +1 -0
  269. package/dist/select/createSelect.d.ts +70 -0
  270. package/dist/select/createSelect.d.ts.map +1 -0
  271. package/dist/select/index.d.ts +3 -0
  272. package/dist/select/index.d.ts.map +1 -0
  273. package/dist/selection/createTypeSelect.d.ts +43 -0
  274. package/dist/selection/createTypeSelect.d.ts.map +1 -0
  275. package/dist/selection/index.d.ts +6 -0
  276. package/dist/selection/index.d.ts.map +1 -0
  277. package/dist/separator/createSeparator.d.ts +38 -0
  278. package/dist/separator/createSeparator.d.ts.map +1 -0
  279. package/dist/separator/index.d.ts +2 -0
  280. package/dist/separator/index.d.ts.map +1 -0
  281. package/dist/slider/createSlider.d.ts +43 -0
  282. package/dist/slider/createSlider.d.ts.map +1 -0
  283. package/dist/slider/index.d.ts +3 -0
  284. package/dist/slider/index.d.ts.map +1 -0
  285. package/dist/ssr/index.d.ts +221 -0
  286. package/dist/ssr/index.d.ts.map +1 -0
  287. package/dist/switch/createSwitch.d.ts +34 -0
  288. package/dist/switch/createSwitch.d.ts.map +1 -0
  289. package/dist/switch/index.d.ts +2 -0
  290. package/dist/switch/index.d.ts.map +1 -0
  291. package/dist/table/createTable.d.ts +24 -0
  292. package/dist/table/createTable.d.ts.map +1 -0
  293. package/dist/table/createTableCell.d.ts +12 -0
  294. package/dist/table/createTableCell.d.ts.map +1 -0
  295. package/dist/table/createTableColumnHeader.d.ts +12 -0
  296. package/dist/table/createTableColumnHeader.d.ts.map +1 -0
  297. package/dist/table/createTableHeaderRow.d.ts +12 -0
  298. package/dist/table/createTableHeaderRow.d.ts.map +1 -0
  299. package/dist/table/createTableRow.d.ts +12 -0
  300. package/dist/table/createTableRow.d.ts.map +1 -0
  301. package/dist/table/createTableRowGroup.d.ts +11 -0
  302. package/dist/table/createTableRowGroup.d.ts.map +1 -0
  303. package/dist/table/createTableSelectAllCheckbox.d.ts +12 -0
  304. package/dist/table/createTableSelectAllCheckbox.d.ts.map +1 -0
  305. package/dist/table/createTableSelectionCheckbox.d.ts +12 -0
  306. package/dist/table/createTableSelectionCheckbox.d.ts.map +1 -0
  307. package/dist/table/index.d.ts +14 -0
  308. package/dist/table/index.d.ts.map +1 -0
  309. package/dist/table/types.d.ts +150 -0
  310. package/dist/table/types.d.ts.map +1 -0
  311. package/dist/tabs/createTabs.d.ts +123 -0
  312. package/dist/tabs/createTabs.d.ts.map +1 -0
  313. package/dist/tabs/index.d.ts +2 -0
  314. package/dist/tabs/index.d.ts.map +1 -0
  315. package/dist/tag/createTag.d.ts +42 -0
  316. package/dist/tag/createTag.d.ts.map +1 -0
  317. package/dist/tag/createTagGroup.d.ts +54 -0
  318. package/dist/tag/createTagGroup.d.ts.map +1 -0
  319. package/dist/tag/index.d.ts +3 -0
  320. package/dist/tag/index.d.ts.map +1 -0
  321. package/dist/textfield/createTextField.d.ts +73 -0
  322. package/dist/textfield/createTextField.d.ts.map +1 -0
  323. package/dist/textfield/index.d.ts +2 -0
  324. package/dist/textfield/index.d.ts.map +1 -0
  325. package/dist/toast/createToast.d.ts +58 -0
  326. package/dist/toast/createToast.d.ts.map +1 -0
  327. package/dist/toast/createToastRegion.d.ts +49 -0
  328. package/dist/toast/createToastRegion.d.ts.map +1 -0
  329. package/dist/toast/index.d.ts +3 -0
  330. package/dist/toast/index.d.ts.map +1 -0
  331. package/dist/toggle/createToggle.d.ts +94 -0
  332. package/dist/toggle/createToggle.d.ts.map +1 -0
  333. package/dist/toggle/createToggleState.d.ts +34 -0
  334. package/dist/toggle/createToggleState.d.ts.map +1 -0
  335. package/dist/toggle/index.d.ts +5 -0
  336. package/dist/toggle/index.d.ts.map +1 -0
  337. package/dist/toolbar/createToolbar.d.ts +49 -0
  338. package/dist/toolbar/createToolbar.d.ts.map +1 -0
  339. package/dist/toolbar/index.d.ts +2 -0
  340. package/dist/toolbar/index.d.ts.map +1 -0
  341. package/dist/tooltip/createTooltip.d.ts +48 -0
  342. package/dist/tooltip/createTooltip.d.ts.map +1 -0
  343. package/dist/tooltip/createTooltipTrigger.d.ts +64 -0
  344. package/dist/tooltip/createTooltipTrigger.d.ts.map +1 -0
  345. package/dist/tooltip/index.d.ts +3 -0
  346. package/dist/tooltip/index.d.ts.map +1 -0
  347. package/dist/tree/createTree.d.ts +28 -0
  348. package/dist/tree/createTree.d.ts.map +1 -0
  349. package/dist/tree/createTreeItem.d.ts +12 -0
  350. package/dist/tree/createTreeItem.d.ts.map +1 -0
  351. package/dist/tree/createTreeSelectionCheckbox.d.ts +12 -0
  352. package/dist/tree/createTreeSelectionCheckbox.d.ts.map +1 -0
  353. package/dist/tree/index.d.ts +8 -0
  354. package/dist/tree/index.d.ts.map +1 -0
  355. package/dist/tree/types.d.ts +81 -0
  356. package/dist/tree/types.d.ts.map +1 -0
  357. package/dist/utils/createDescription.d.ts +56 -0
  358. package/dist/utils/createDescription.d.ts.map +1 -0
  359. package/dist/utils/dom.d.ts +68 -0
  360. package/dist/utils/dom.d.ts.map +1 -0
  361. package/dist/utils/env.d.ts +18 -0
  362. package/dist/utils/env.d.ts.map +1 -0
  363. package/dist/utils/events.d.ts +29 -0
  364. package/dist/utils/events.d.ts.map +1 -0
  365. package/dist/utils/filterDOMProps.d.ts +29 -0
  366. package/dist/utils/filterDOMProps.d.ts.map +1 -0
  367. package/dist/utils/focus.d.ts +20 -0
  368. package/dist/utils/focus.d.ts.map +1 -0
  369. package/dist/utils/geometry.d.ts +40 -0
  370. package/dist/utils/geometry.d.ts.map +1 -0
  371. package/dist/utils/globalListeners.d.ts +36 -0
  372. package/dist/utils/globalListeners.d.ts.map +1 -0
  373. package/dist/utils/index.d.ts +13 -0
  374. package/dist/utils/index.d.ts.map +1 -0
  375. package/dist/utils/mergeProps.d.ts +11 -0
  376. package/dist/utils/mergeProps.d.ts.map +1 -0
  377. package/dist/utils/platform.d.ts +14 -0
  378. package/dist/utils/platform.d.ts.map +1 -0
  379. package/dist/utils/reactivity.d.ts +28 -0
  380. package/dist/utils/reactivity.d.ts.map +1 -0
  381. package/dist/utils/textSelection.d.ts +19 -0
  382. package/dist/utils/textSelection.d.ts.map +1 -0
  383. package/dist/visually-hidden/createVisuallyHidden.d.ts +60 -0
  384. package/dist/visually-hidden/createVisuallyHidden.d.ts.map +1 -0
  385. package/dist/visually-hidden/index.d.ts +2 -0
  386. package/dist/visually-hidden/index.d.ts.map +1 -0
  387. package/package.json +4 -4
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Drag and Drop ARIA types for solidaria.
3
+ */
4
+ import type { JSX } from 'solid-js';
5
+ import type { DragItem, DragStartEvent, DragMoveEvent, DragEndEvent, DropEnterEvent, DropMoveEvent, DropActivateEvent, DropExitEvent, DropEvent, DropOperation, DragTypes, DragPreviewRenderer } from '@proyecto-viviana/solid-stately';
6
+ export interface AriaDragOptions {
7
+ /** A function that returns the items being dragged. */
8
+ getItems: () => DragItem[];
9
+ /** Function that returns the allowed drop operations. */
10
+ getAllowedDropOperations?: () => DropOperation[];
11
+ /** Handler that is called when a drag operation is started. */
12
+ onDragStart?: (e: DragStartEvent) => void;
13
+ /** Handler that is called when the drag is moved. */
14
+ onDragMove?: (e: DragMoveEvent) => void;
15
+ /** Handler that is called when the drag operation ends. */
16
+ onDragEnd?: (e: DragEndEvent) => void;
17
+ /** Whether there is a separate drag button affordance. */
18
+ hasDragButton?: boolean;
19
+ /** Whether the drag operation is disabled. */
20
+ isDisabled?: boolean;
21
+ /** Preview renderer function ref. */
22
+ preview?: {
23
+ current: DragPreviewRenderer | null;
24
+ };
25
+ }
26
+ export interface DragAria {
27
+ /** Props for the draggable element. */
28
+ dragProps: JSX.HTMLAttributes<HTMLElement>;
29
+ /** Props for the explicit drag button affordance, if any. */
30
+ dragButtonProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
31
+ /** Whether the element is currently being dragged. */
32
+ isDragging: boolean;
33
+ }
34
+ export interface AriaDropOptions {
35
+ /**
36
+ * A function returning the drop operation to be performed.
37
+ */
38
+ getDropOperation?: (types: DragTypes, allowedOperations: DropOperation[]) => DropOperation;
39
+ /**
40
+ * A function returning the drop operation for a specific point.
41
+ */
42
+ getDropOperationForPoint?: (types: DragTypes, allowedOperations: DropOperation[], x: number, y: number) => DropOperation;
43
+ /** Handler that is called when a valid drag enters the drop target. */
44
+ onDropEnter?: (e: DropEnterEvent) => void;
45
+ /** Handler that is called when a valid drag is moved within the drop target. */
46
+ onDropMove?: (e: DropMoveEvent) => void;
47
+ /** Handler that is called after a valid drag is held over the drop target. */
48
+ onDropActivate?: (e: DropActivateEvent) => void;
49
+ /** Handler that is called when a valid drag exits the drop target. */
50
+ onDropExit?: (e: DropExitEvent) => void;
51
+ /** Handler that is called when a valid drag is dropped on the drop target. */
52
+ onDrop?: (e: DropEvent) => void;
53
+ /** Whether there is a separate drop button affordance. */
54
+ hasDropButton?: boolean;
55
+ /** Whether the drop target is disabled. */
56
+ isDisabled?: boolean;
57
+ }
58
+ export interface DropAria {
59
+ /** Props for the droppable element. */
60
+ dropProps: JSX.HTMLAttributes<HTMLElement>;
61
+ /** Whether the drop target is currently being hovered or focused. */
62
+ isDropTarget: boolean;
63
+ /** Props for the explicit drop button affordance, if any. */
64
+ dropButtonProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
65
+ }
66
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dnd/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd,aAAa,EACb,YAAY,EACZ,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,aAAa,EACb,SAAS,EACT,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,WAAW,eAAe;IAC9B,uDAAuD;IACvD,QAAQ,EAAE,MAAM,QAAQ,EAAE,CAAC;IAC3B,yDAAyD;IACzD,wBAAwB,CAAC,EAAE,MAAM,aAAa,EAAE,CAAC;IACjD,+DAA+D;IAC/D,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,qDAAqD;IACrD,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,2DAA2D;IAC3D,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,IAAI,CAAC;IACtC,0DAA0D;IAC1D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qCAAqC;IACrC,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAA;KAAE,CAAC;CACnD;AAED,MAAM,WAAW,QAAQ;IACvB,uCAAuC;IACvC,SAAS,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC3C,6DAA6D;IAC7D,eAAe,EAAE,GAAG,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IAC7D,sDAAsD;IACtD,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,gBAAgB,CAAC,EAAE,CACjB,KAAK,EAAE,SAAS,EAChB,iBAAiB,EAAE,aAAa,EAAE,KAC/B,aAAa,CAAC;IACnB;;OAEG;IACH,wBAAwB,CAAC,EAAE,CACzB,KAAK,EAAE,SAAS,EAChB,iBAAiB,EAAE,aAAa,EAAE,EAClC,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,KACN,aAAa,CAAC;IACnB,uEAAuE;IACvE,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,gFAAgF;IAChF,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,8EAA8E;IAC9E,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAChD,sEAAsE;IACtE,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,8EAA8E;IAC9E,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;IAChC,0DAA0D;IAC1D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,uCAAuC;IACvC,SAAS,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC3C,qEAAqE;IACrE,YAAY,EAAE,OAAO,CAAC;IACtB,6DAA6D;IAC7D,eAAe,EAAE,GAAG,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;CAC9D"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Drag and Drop utilities for solidaria.
3
+ */
4
+ import type { DragItem, DropItem, TextDropItem, FileDropItem, DirectoryDropItem, DropOperation } from '@proyecto-viviana/solid-stately';
5
+ export declare const NATIVE_DRAG_TYPES: Set<string>;
6
+ export declare const CUSTOM_DRAG_TYPE = "application/vnd.solidaria.items+json";
7
+ export declare const GENERIC_TYPE = "application/octet-stream";
8
+ export declare enum DROP_OPERATION {
9
+ none = 0,
10
+ cancel = 0,
11
+ move = 1,
12
+ copy = 2,
13
+ link = 4,
14
+ all = 7
15
+ }
16
+ export declare const DROP_OPERATION_ALLOWED: Record<string, number>;
17
+ export declare const EFFECT_ALLOWED: Record<number, string>;
18
+ export declare const DROP_EFFECT_TO_DROP_OPERATION: Record<string, DropOperation>;
19
+ export declare const DROP_OPERATION_TO_DROP_EFFECT: Record<DropOperation, string>;
20
+ /**
21
+ * Get the types present in drag items.
22
+ */
23
+ export declare function getTypes(items: DragItem[]): Set<string>;
24
+ /**
25
+ * Write drag items to a DataTransfer object.
26
+ */
27
+ export declare function writeToDataTransfer(dataTransfer: DataTransfer, items: DragItem[]): void;
28
+ /**
29
+ * Read drop items from a DataTransfer object.
30
+ */
31
+ export declare function readFromDataTransfer(dataTransfer: DataTransfer): DropItem[];
32
+ /**
33
+ * DragTypes implementation for checking drag types.
34
+ */
35
+ export declare class DragTypesImpl {
36
+ private types;
37
+ private includesUnknownTypes;
38
+ constructor(dataTransfer: DataTransfer);
39
+ has(type: string | symbol): boolean;
40
+ }
41
+ /**
42
+ * Check if a drop item is a text item.
43
+ */
44
+ export declare function isTextDropItem(dropItem: DropItem): dropItem is TextDropItem;
45
+ /**
46
+ * Check if a drop item is a file item.
47
+ */
48
+ export declare function isFileDropItem(dropItem: DropItem): dropItem is FileDropItem;
49
+ /**
50
+ * Check if a drop item is a directory item.
51
+ */
52
+ export declare function isDirectoryDropItem(dropItem: DropItem): dropItem is DirectoryDropItem;
53
+ export declare function setGlobalDropEffect(effect: string | undefined): void;
54
+ export declare function getGlobalDropEffect(): string | undefined;
55
+ export declare function setGlobalAllowedDropOperations(ops: number): void;
56
+ export declare function getGlobalAllowedDropOperations(): number;
57
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/dnd/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACd,MAAM,iCAAiC,CAAC;AAGzC,eAAO,MAAM,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAIxC,CAAC;AAGH,eAAO,MAAM,gBAAgB,yCAAyC,CAAC;AAGvE,eAAO,MAAM,YAAY,6BAA6B,CAAC;AAGvD,oBAAY,cAAc;IACxB,IAAI,IAAI;IACR,MAAM,IAAI;IACV,IAAI,IAAS;IACb,IAAI,IAAS;IACb,IAAI,IAAS;IACb,GAAG,IAAiC;CACrC;AAGD,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAUzD,CAAC;AAGF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CASjD,CAAC;AAGF,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAKvE,CAAC;AAGF,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAKvE,CAAC;AAEF;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAQvD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,QAAQ,EAAE,GAChB,IAAI,CA4CN;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,YAAY,GAAG,QAAQ,EAAE,CAoD3E;AAeD;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,oBAAoB,CAAU;gBAE1B,YAAY,EAAE,YAAY;IAsBtC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO;CASpC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,IAAI,YAAY,CAE3E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,IAAI,YAAY,CAE3E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,QAAQ,GACjB,QAAQ,IAAI,iBAAiB,CAE/B;AAMD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAEpE;AAED,wBAAgB,mBAAmB,IAAI,MAAM,GAAG,SAAS,CAExD;AAED,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEhE;AAED,wBAAgB,8BAA8B,IAAI,MAAM,CAEvD"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * FocusScope component for managing focus containment, restoration, and auto-focus.
3
+ * Based on @react-aria/focus FocusScope.
4
+ */
5
+ import { type JSX, type ParentComponent } from 'solid-js';
6
+ export interface FocusScopeProps {
7
+ /** The contents of the focus scope. */
8
+ children: JSX.Element;
9
+ /**
10
+ * Whether to contain focus inside the scope, so users cannot
11
+ * move focus outside, for example in a modal dialog.
12
+ */
13
+ contain?: boolean;
14
+ /**
15
+ * Whether to restore focus back to the element that was focused
16
+ * when the focus scope mounted, after the focus scope unmounts.
17
+ */
18
+ restoreFocus?: boolean;
19
+ /** Whether to auto focus the first focusable element in the focus scope on mount. */
20
+ autoFocus?: boolean;
21
+ }
22
+ export interface FocusManagerOptions {
23
+ /** The element to start searching from. The currently focused element by default. */
24
+ from?: Element;
25
+ /** Whether to only include tabbable elements, or all focusable elements. */
26
+ tabbable?: boolean;
27
+ /** Whether focus should wrap around when it reaches the end of the scope. */
28
+ wrap?: boolean;
29
+ /** A callback that determines whether the given element is focused. */
30
+ accept?: (node: Element) => boolean;
31
+ }
32
+ export interface FocusManager {
33
+ /** Moves focus to the next focusable or tabbable element in the focus scope. */
34
+ focusNext(opts?: FocusManagerOptions): HTMLElement | null;
35
+ /** Moves focus to the previous focusable or tabbable element in the focus scope. */
36
+ focusPrevious(opts?: FocusManagerOptions): HTMLElement | null;
37
+ /** Moves focus to the first focusable or tabbable element in the focus scope. */
38
+ focusFirst(opts?: FocusManagerOptions): HTMLElement | null;
39
+ /** Moves focus to the last focusable or tabbable element in the focus scope. */
40
+ focusLast(opts?: FocusManagerOptions): HTMLElement | null;
41
+ }
42
+ /**
43
+ * Returns a FocusManager interface for the parent FocusScope.
44
+ * A FocusManager can be used to programmatically move focus within
45
+ * a FocusScope, e.g. in response to user events like keyboard navigation.
46
+ */
47
+ export declare function useFocusManager(): FocusManager | undefined;
48
+ /**
49
+ * A FocusScope manages focus for its descendants. It supports containing focus inside
50
+ * the scope, restoring focus to the previously focused element on unmount, and auto
51
+ * focusing children on mount. It also acts as a container for a programmatic focus
52
+ * management interface that can be used to move focus forward and back in response
53
+ * to user events.
54
+ */
55
+ export declare const FocusScope: ParentComponent<FocusScopeProps>;
56
+ export default FocusScope;
57
+ //# sourceMappingURL=FocusScope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FocusScope.d.ts","sourceRoot":"","sources":["../../src/focus/FocusScope.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAKL,KAAK,GAAG,EAER,KAAK,eAAe,EAGrB,MAAM,UAAU,CAAA;AASjB,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAA;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,qFAAqF;IACrF,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,qFAAqF;IACrF,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,uEAAuE;IACvE,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,gFAAgF;IAChF,SAAS,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG,WAAW,GAAG,IAAI,CAAA;IACzD,oFAAoF;IACpF,aAAa,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG,WAAW,GAAG,IAAI,CAAA;IAC7D,iFAAiF;IACjF,UAAU,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG,WAAW,GAAG,IAAI,CAAA;IAC1D,gFAAgF;IAChF,SAAS,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG,WAAW,GAAG,IAAI,CAAA;CAC1D;AAaD;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,YAAY,GAAG,SAAS,CAE1D;AAwED;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,eAAe,CAqPvD,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Auto-focus management for solidaria
3
+ *
4
+ * Provides priority-based auto-focus with deferred execution
5
+ * and conflict resolution for multiple auto-focus elements.
6
+ */
7
+ export interface AutoFocusOptions {
8
+ /**
9
+ * Whether auto-focus is enabled.
10
+ * @default true
11
+ */
12
+ isEnabled?: boolean;
13
+ /**
14
+ * Priority level (higher = more important).
15
+ * When multiple elements request auto-focus, the highest priority wins.
16
+ * @default 0
17
+ */
18
+ priority?: number;
19
+ /**
20
+ * Delay in milliseconds before focusing.
21
+ * Useful for animations or transitions.
22
+ * @default 0
23
+ */
24
+ delay?: number;
25
+ /**
26
+ * Whether to focus even if another element is already focused.
27
+ * @default false
28
+ */
29
+ force?: boolean;
30
+ /**
31
+ * Whether to prevent scrolling when focusing.
32
+ * @default true
33
+ */
34
+ preventScroll?: boolean;
35
+ /**
36
+ * Callback when focus is applied.
37
+ */
38
+ onFocus?: (element: HTMLElement) => void;
39
+ /**
40
+ * Callback when focus is skipped (due to lower priority or other reasons).
41
+ */
42
+ onSkip?: () => void;
43
+ }
44
+ export interface AutoFocusResult {
45
+ /**
46
+ * Manually trigger the auto-focus.
47
+ */
48
+ focus: () => void;
49
+ /**
50
+ * Cancel any pending auto-focus.
51
+ */
52
+ cancel: () => void;
53
+ }
54
+ /**
55
+ * Creates auto-focus behavior for an element.
56
+ *
57
+ * This hook registers the element for auto-focus when mounted. If multiple
58
+ * elements request auto-focus, the one with the highest priority wins.
59
+ *
60
+ * @param ref - Accessor for the element to focus
61
+ * @param options - Auto-focus options
62
+ *
63
+ * @example
64
+ * ```tsx
65
+ * function Dialog(props) {
66
+ * let contentRef: HTMLDivElement | undefined;
67
+ *
68
+ * createAutoFocus(() => contentRef, {
69
+ * priority: 10, // High priority for dialogs
70
+ * onFocus: () => console.log('Dialog focused'),
71
+ * });
72
+ *
73
+ * return (
74
+ * <div ref={contentRef} tabIndex={-1}>
75
+ * {props.children}
76
+ * </div>
77
+ * );
78
+ * }
79
+ * ```
80
+ *
81
+ * @example
82
+ * ```tsx
83
+ * // With delay for animations
84
+ * function AnimatedPanel() {
85
+ * let panelRef: HTMLDivElement | undefined;
86
+ *
87
+ * createAutoFocus(() => panelRef, {
88
+ * delay: 300, // Wait for animation
89
+ * });
90
+ *
91
+ * return <div ref={panelRef} class="animated-panel">...</div>;
92
+ * }
93
+ * ```
94
+ *
95
+ * @example
96
+ * ```tsx
97
+ * // Conditional auto-focus
98
+ * function Input(props) {
99
+ * let inputRef: HTMLInputElement | undefined;
100
+ *
101
+ * createAutoFocus(() => inputRef, {
102
+ * isEnabled: props.autoFocus,
103
+ * });
104
+ *
105
+ * return <input ref={inputRef} />;
106
+ * }
107
+ * ```
108
+ */
109
+ export declare function createAutoFocus(ref: () => HTMLElement | null | undefined, options?: AutoFocusOptions): AutoFocusResult;
110
+ /**
111
+ * Clears all pending auto-focus requests.
112
+ * Useful for testing or when navigating away.
113
+ */
114
+ export declare function clearAutoFocusQueue(): void;
115
+ /**
116
+ * Gets the current auto-focus queue length.
117
+ * Useful for debugging.
118
+ */
119
+ export declare function getAutoFocusQueueLength(): number;
120
+ //# sourceMappingURL=createAutoFocus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAutoFocus.d.ts","sourceRoot":"","sources":["../../src/focus/createAutoFocus.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAgHD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,WAAW,GAAG,IAAI,GAAG,SAAS,EACzC,OAAO,GAAE,gBAAqB,GAC7B,eAAe,CAgEjB;AAMD;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAM1C;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD"}
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Focus restoration utilities for solidaria
3
+ *
4
+ * Provides enhanced focus restoration with retry logic, cross-scope tracking,
5
+ * and safe restoration patterns.
6
+ */
7
+ export interface FocusRestoreOptions {
8
+ /**
9
+ * Whether to restore focus when the component unmounts.
10
+ * @default true
11
+ */
12
+ restoreOnUnmount?: boolean;
13
+ /**
14
+ * Maximum number of retries if the element is not in the DOM.
15
+ * @default 3
16
+ */
17
+ maxRetries?: number;
18
+ /**
19
+ * Delay between retries in milliseconds.
20
+ * @default 50
21
+ */
22
+ retryDelay?: number;
23
+ /**
24
+ * Callback when focus is successfully restored.
25
+ */
26
+ onRestore?: (element: HTMLElement) => void;
27
+ /**
28
+ * Callback when focus restoration fails.
29
+ */
30
+ onRestoreFailed?: () => void;
31
+ /**
32
+ * Whether to prevent scrolling when restoring focus.
33
+ * @default true
34
+ */
35
+ preventScroll?: boolean;
36
+ }
37
+ export interface FocusRestoreResult {
38
+ /**
39
+ * Manually restore focus to the saved element.
40
+ */
41
+ restore: () => boolean;
42
+ /**
43
+ * Get the saved element (if any).
44
+ */
45
+ getSavedElement: () => HTMLElement | null;
46
+ /**
47
+ * Save the currently focused element.
48
+ */
49
+ saveCurrentFocus: () => void;
50
+ /**
51
+ * Clear the saved element without restoring.
52
+ */
53
+ clear: () => void;
54
+ }
55
+ /**
56
+ * Push an element onto the focus stack.
57
+ */
58
+ export declare function pushFocusStack(element: HTMLElement): void;
59
+ /**
60
+ * Pop the last element from the focus stack.
61
+ */
62
+ export declare function popFocusStack(): HTMLElement | undefined;
63
+ /**
64
+ * Get the current focus stack length.
65
+ */
66
+ export declare function getFocusStackLength(): number;
67
+ /**
68
+ * Clear the entire focus stack.
69
+ */
70
+ export declare function clearFocusStack(): void;
71
+ /**
72
+ * Creates a focus restoration manager.
73
+ *
74
+ * This hook saves the currently focused element when mounted and provides
75
+ * methods to restore focus later, with retry logic for reliability.
76
+ *
77
+ * @example
78
+ * ```tsx
79
+ * function Modal(props) {
80
+ * const focusRestore = createFocusRestore({
81
+ * restoreOnUnmount: true,
82
+ * onRestore: () => console.log('Focus restored'),
83
+ * });
84
+ *
85
+ * return (
86
+ * <div role="dialog">
87
+ * {props.children}
88
+ * <button onClick={() => focusRestore.restore()}>
89
+ * Close
90
+ * </button>
91
+ * </div>
92
+ * );
93
+ * }
94
+ * ```
95
+ *
96
+ * @example
97
+ * ```tsx
98
+ * // Manual focus management
99
+ * function Dropdown() {
100
+ * const focusRestore = createFocusRestore({ restoreOnUnmount: false });
101
+ *
102
+ * const onOpen = () => {
103
+ * focusRestore.saveCurrentFocus();
104
+ * // Focus dropdown content
105
+ * };
106
+ *
107
+ * const onClose = () => {
108
+ * focusRestore.restore();
109
+ * };
110
+ *
111
+ * return <div>...</div>;
112
+ * }
113
+ * ```
114
+ */
115
+ export declare function createFocusRestore(options?: FocusRestoreOptions): FocusRestoreResult;
116
+ //# sourceMappingURL=createFocusRestore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createFocusRestore.d.ts","sourceRoot":"","sources":["../../src/focus/createFocusRestore.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB;;OAEG;IACH,eAAe,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;IAC1C;;OAEG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AASD;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAEzD;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,WAAW,GAAG,SAAS,CAEvD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAuED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,GAAE,mBAAwB,GAChC,kBAAkB,CAgGpB"}
@@ -0,0 +1,170 @@
1
+ /**
2
+ * Virtual focus management for solidaria
3
+ *
4
+ * Provides virtual focus for large collections where tracking DOM focus
5
+ * on every item is impractical. Instead, a single element receives real
6
+ * focus while aria-activedescendant indicates the virtually focused item.
7
+ *
8
+ * This is commonly used in:
9
+ * - Virtualized lists (where not all items are in the DOM)
10
+ * - Large trees
11
+ * - Autocomplete/combobox suggestions
12
+ * - Grid/table navigation
13
+ */
14
+ import { type Accessor } from 'solid-js';
15
+ export interface VirtualFocusOptions<T> {
16
+ /**
17
+ * The items in the collection.
18
+ */
19
+ items: Accessor<T[]>;
20
+ /**
21
+ * Function to get a unique key for each item.
22
+ */
23
+ getKey: (item: T) => string;
24
+ /**
25
+ * Function to check if an item is disabled.
26
+ */
27
+ isDisabled?: (item: T) => boolean;
28
+ /**
29
+ * Initial focused key.
30
+ */
31
+ defaultFocusedKey?: string;
32
+ /**
33
+ * Controlled focused key.
34
+ */
35
+ focusedKey?: Accessor<string | null>;
36
+ /**
37
+ * Callback when focused key changes.
38
+ */
39
+ onFocusChange?: (key: string | null) => void;
40
+ /**
41
+ * Whether to wrap focus at the edges.
42
+ * @default true
43
+ */
44
+ wrap?: boolean;
45
+ /**
46
+ * Whether to loop through disabled items.
47
+ * @default false
48
+ */
49
+ skipDisabled?: boolean;
50
+ /**
51
+ * Orientation for keyboard navigation.
52
+ * @default 'vertical'
53
+ */
54
+ orientation?: 'horizontal' | 'vertical' | 'both';
55
+ }
56
+ export interface VirtualFocusResult<T> {
57
+ /**
58
+ * The currently focused key.
59
+ */
60
+ focusedKey: Accessor<string | null>;
61
+ /**
62
+ * The currently focused item (if any).
63
+ */
64
+ focusedItem: Accessor<T | null>;
65
+ /**
66
+ * Set the focused key.
67
+ */
68
+ setFocusedKey: (key: string | null) => void;
69
+ /**
70
+ * Move focus to the next item.
71
+ */
72
+ focusNext: () => void;
73
+ /**
74
+ * Move focus to the previous item.
75
+ */
76
+ focusPrevious: () => void;
77
+ /**
78
+ * Move focus to the first item.
79
+ */
80
+ focusFirst: () => void;
81
+ /**
82
+ * Move focus to the last item.
83
+ */
84
+ focusLast: () => void;
85
+ /**
86
+ * Move focus by a page (for large lists).
87
+ */
88
+ focusPageDown: (pageSize?: number) => void;
89
+ /**
90
+ * Move focus up by a page (for large lists).
91
+ */
92
+ focusPageUp: (pageSize?: number) => void;
93
+ /**
94
+ * Check if a key is the currently focused key.
95
+ */
96
+ isFocused: (key: string) => boolean;
97
+ /**
98
+ * Props to spread on the container element.
99
+ */
100
+ containerProps: {
101
+ 'aria-activedescendant': Accessor<string | undefined>;
102
+ onKeyDown: (e: KeyboardEvent) => void;
103
+ };
104
+ /**
105
+ * Get props for an item element.
106
+ */
107
+ getItemProps: (key: string) => {
108
+ id: string;
109
+ 'aria-selected'?: boolean;
110
+ };
111
+ }
112
+ /**
113
+ * Creates virtual focus management for a collection.
114
+ *
115
+ * Virtual focus uses aria-activedescendant to indicate which item is
116
+ * "focused" while keeping real DOM focus on a container element. This
117
+ * is more performant for large collections and required for virtualized
118
+ * lists where items may not be in the DOM.
119
+ *
120
+ * @example
121
+ * ```tsx
122
+ * function Listbox(props) {
123
+ * const virtualFocus = createVirtualFocus({
124
+ * items: () => props.items,
125
+ * getKey: (item) => item.id,
126
+ * isDisabled: (item) => item.disabled,
127
+ * });
128
+ *
129
+ * return (
130
+ * <ul
131
+ * role="listbox"
132
+ * tabIndex={0}
133
+ * aria-activedescendant={virtualFocus.containerProps['aria-activedescendant']()}
134
+ * onKeyDown={virtualFocus.containerProps.onKeyDown}
135
+ * >
136
+ * <For each={props.items}>
137
+ * {(item) => (
138
+ * <li
139
+ * {...virtualFocus.getItemProps(item.id)}
140
+ * role="option"
141
+ * aria-selected={virtualFocus.isFocused(item.id)}
142
+ * >
143
+ * {item.name}
144
+ * </li>
145
+ * )}
146
+ * </For>
147
+ * </ul>
148
+ * );
149
+ * }
150
+ * ```
151
+ *
152
+ * @example
153
+ * ```tsx
154
+ * // With controlled focus
155
+ * function ControlledListbox() {
156
+ * const [focusedKey, setFocusedKey] = createSignal<string | null>(null);
157
+ *
158
+ * const virtualFocus = createVirtualFocus({
159
+ * items: () => items,
160
+ * getKey: (item) => item.id,
161
+ * focusedKey: focusedKey,
162
+ * onFocusChange: setFocusedKey,
163
+ * });
164
+ *
165
+ * return <ul>...</ul>;
166
+ * }
167
+ * ```
168
+ */
169
+ export declare function createVirtualFocus<T>(options: VirtualFocusOptions<T>): VirtualFocusResult<T>;
170
+ //# sourceMappingURL=createVirtualFocus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createVirtualFocus.d.ts","sourceRoot":"","sources":["../../src/focus/createVirtualFocus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,QAAQ,EAAyC,MAAM,UAAU,CAAC;AAOhF,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC;;OAEG;IACH,KAAK,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;IACrB;;OAEG;IACH,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAC5B;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC;IAClC;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACrC;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7C;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;CAClD;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC;;OAEG;IACH,UAAU,EAAE,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACpC;;OAEG;IACH,WAAW,EAAE,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAChC;;OAEG;IACH,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,aAAa,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C;;OAEG;IACH,WAAW,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC;;OAEG;IACH,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACpC;;OAEG;IACH,cAAc,EAAE;QACd,uBAAuB,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;QACtD,SAAS,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;KACvC,CAAC;IACF;;OAEG;IACH,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK;QAC7B,EAAE,EAAE,MAAM,CAAC;QACX,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,CAAC;CACH;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAC9B,kBAAkB,CAAC,CAAC,CAAC,CA8MvB"}
@@ -0,0 +1,5 @@
1
+ export { FocusScope, useFocusManager, type FocusScopeProps, type FocusManager, type FocusManagerOptions, } from './FocusScope';
2
+ export { createFocusRestore, pushFocusStack, popFocusStack, getFocusStackLength, clearFocusStack, type FocusRestoreOptions, type FocusRestoreResult, } from './createFocusRestore';
3
+ export { createVirtualFocus, type VirtualFocusOptions, type VirtualFocusResult, } from './createVirtualFocus';
4
+ export { createAutoFocus, clearAutoFocusQueue, getAutoFocusQueueLength, type AutoFocusOptions, type AutoFocusResult, } from './createAutoFocus';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/focus/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,mBAAmB,GACzB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * createFormReset - Handles form reset events for form fields.
3
+ *
4
+ * Resets the field value to its default when the containing form is reset.
5
+ * Port of @react-aria/utils useFormReset.
6
+ */
7
+ import { type Accessor } from 'solid-js';
8
+ export interface FormResetOptions<T> {
9
+ /** The default value to reset to. */
10
+ defaultValue: T;
11
+ /** Function to set the current value. */
12
+ onReset: (value: T) => void;
13
+ }
14
+ /**
15
+ * Listens for form reset events and resets the field value to its default.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * createFormReset(
20
+ * () => inputRef,
21
+ * { label: 'Default' },
22
+ * (value) => state.setSelectedKey(value.key)
23
+ * );
24
+ * ```
25
+ */
26
+ export declare function createFormReset<T>(ref: Accessor<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | undefined>, defaultValue: T, onReset: (value: T) => void): void;
27
+ //# sourceMappingURL=createFormReset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createFormReset.d.ts","sourceRoot":"","sources":["../../src/form/createFormReset.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,QAAQ,EAA2B,MAAM,UAAU,CAAC;AAElE,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,qCAAqC;IACrC,YAAY,EAAE,CAAC,CAAC;IAChB,yCAAyC;IACzC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;CAC7B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,GAAG,EAAE,QAAQ,CAAC,gBAAgB,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,SAAS,CAAC,EACrF,YAAY,EAAE,CAAC,EACf,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAC1B,IAAI,CAkBN"}